How shibly/moneymate works
1. MoneyMate is a Laravel 12 monolith for personal finance tracking. It serves HTML pages from Blade templates, persists relational finance data in MySQL, and ships as a traditional PHP app behind Apache/Nginx, with Docker support for local deployment.
2. The request path is layered: routes/web.php sends traffic to controllers, controllers delegate most business logic to services, services use repository interfaces, and repository implementations wrap Eloquent models. This is the main architectural boundary to draw.
3. Validation is isolated in many dedicated Form Request classes. That keeps controllers thin and separates input rules for create/update flows across accounts, budgets, debts, transfers, currencies, and translations.
4. The core domain is organized around finance entities: users, categories, currencies, banks, bank accounts, incomes, expenses, budgets, debt/borrow/lend/repayment records, and account transfers. These are stored as first-class Eloquent models with a shared user-scoped data model in migrations.
5. Money movement is the central data flow. Incomes and expenses feed dashboard totals, budget calculations, and reports; transfers move balances between accounts; debt/lend/borrow records track liabilities and repayments; currency conversion is handled in a dedicated service rather than spread through controllers.
6. Reporting is a separate concern. Expense and income report controllers work with report repositories and export classes, indicating both on-screen analytics and downloadable report output. This is where aggregation, filtering, and export formatting happen.
7. The UI layer lives in resources/views and is split into admin, auth, installer, and shared layout/includes. The app uses a dashboard shell with sidebar/topbar partials, plus dedicated pages for calendar, budgets, reports, languages, profile, and application settings.
8. Front-end behavior is bundled through Vite and resources/js, while public/libs and public/js carry a large set of vendor assets. The interface depends on Tabler/Bootstrap styling, ApexCharts for graphs, FullCalendar for timeline views, DataTables for tabular management, and several form/UI helpers like Select2, Litepicker, Dropzone, SweetAlert, TinyMCE, and Tom Select.
9. Internationalization is a real subsystem, not an afterthought. Language, Translation, and related controllers/repositories support runtime language management, and there are database seeders for default languages, translations, currencies, options, and the initial user.
10. Installation is built into the application. InstallationController, resources/views/installer, and the public installer assets show a first-run setup flow that likely initializes configuration and seed data before the app becomes usable.
11. Cross-cutting persistence and audit concerns are visible in migrations and config. The app includes an activity log table and config/activitylog.php, suggesting recorded user actions, while Option/settings tables provide app-level configuration stored in the database rather than environment-only settings.
12. For an architecture diagram, the key boundaries are: browser/UI assets on one side; Blade views and controllers in the presentation layer; services as business orchestration; repositories as data-access abstraction; Eloquent/MySQL as persistence; and a small set of supporting subsystems for installation, localization, reporting, and dashboard analytics.
Main entry points: Controllers Controllers · Services Finance services · Contracts Repo contracts · Models Models
Components 18
Presentation
HTTP entrypoints, controllers, Blade views, and frontend assets.
- Web routes · Main browser request entrypoint and route definitions.
routes/web.php - Controllers · Thin HTTP controllers for dashboard, finance flows, auth, profile, settings, and installer.
app/Http/Controllers - Form requests · Dedicated request validators for create and update flows.
app/Http/Requests - Blade views · Admin, auth, installer, layout, and shared Blade templates.
resources/views - Frontend assets · Bundled app JavaScript plus vendor UI libraries and static assets.
resources/js
Domain
Core finance entities and business orchestration.
- Finance services · Orchestration for accounts, budgets, categories, incomes, expenses, debts, and transfers.
app/Services - FX service · Central currency conversion logic used across finance flows.
app/Services/CurrencyConversionService.php
Data
Repositories, Eloquent models, migrations, and seed data.
- Repo contracts · Repository interfaces that define the data-access boundary.
app/Repositories/Contracts - Eloquent repos · Eloquent-backed repository implementations.
app/Repositories/Eloquent - Models · Finance, localization, settings, and user models.
app/Models - Migrations · Relational schema for user-scoped finance data and activity log.
database/migrations
Support
Installation, localization, reporting, and operational subsystems.
- Dashboard · Home dashboard, widgets, and summary finance totals.
app/Http/Controllers/DashboardController.php - Seeders · Initial currencies, languages, translations, options, and user data.
database/seeders - Reports · Income and expense reporting plus export formatting.
app/Http/Controllers/ExpenseReportController.php - Exports · Downloadable report output classes for income and expense data.
app/Exports - Installer · First-run installation controller, pages, and public assets.
app/Http/Controllers/InstallationController.php - Localization · Runtime language and translation management.
app/Http/Controllers/LanguageController.php - Settings · Database-backed options and application settings.
app/Http/Controllers/SettingController.php
Connections 22
- Web routes → Controllers: dispatches · Browser routes resolve to presentation controllers.
- Controllers → Form requests: validates with · Controllers delegate input validation to form requests.
- Controllers → Finance services: orchestrates · Finance controllers hand business work to services.
- Controllers → Reports: serves · Report controllers coordinate analytics pages.
- Controllers → Installer: serves · Installation controller handles first-run setup.
- Controllers → Localization: serves · Language and translation controllers manage localization.
- Controllers → Settings: serves · Settings controller manages app configuration.
- Controllers → Dashboard: renders · Dashboard controller feeds the app shell and widgets.
- Controllers → Blade views: renders · Controllers return Blade templates.
- Blade views → Frontend assets: loads · Templates depend on bundled JS and vendor assets.
- Finance services → Repo contracts: depends on · Services program against repository interfaces.
- Repo contracts → Eloquent repos: implemented by · Eloquent classes provide the concrete repository layer.
- Eloquent repos → Models: wraps · Repositories operate through Eloquent models.
- Models → Migrations: persisted by · Model structures correspond to the schema history.
- Seeders → Models: bootstraps · Seeders create initial reference and user data.
- Dashboard → Finance services: aggregates · Dashboard summaries are built from core finance services.
- FX service → Finance services: supports · Currency conversion is used by finance orchestration.
- Reports → Repo contracts: queries via · Reports use dedicated report repositories and filtering queries.
- Reports → Exports: exports · Report controllers hand off downloadable output formatting.
- Installer → Seeders: initializes · Installer likely seeds the application during setup.
- Localization → Repo contracts: uses · Localization management relies on repository-backed persistence.
- Settings → Models: stores via · Settings are stored in database-backed option models.