# kravenor/myfinance architecture

> Architecture diagram of the GitHub repository kravenor/myfinance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kravenor/myfinance
- Repository: https://github.com/kravenor/myfinance

## Overview

Finance is a personal-finance web app. Users manage accounts and transactions, organize spending with categories, tags, budgets and recurring rules, then inspect reports and forecasts; they can also import/export transactions, manage investments and savings goals, and receive notifications. The Vue client reaches Laravel through API routes, while controllers coordinate domain services and persistent models. The README establishes the broad capabilities; edges below are limited to explicit route, excerpt, or source-index evidence, so some unsampled feature links are intentionally omitted.

Main entry points: [`backend/routes/api.php`](https://github.com/kravenor/myfinance/blob/master/backend/routes/api.php) (API routes), [`backend/app/Http/Controllers/ReportController.php`](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/ReportController.php) (Report endpoints), [`backend/app/Http/Controllers/TransactionController.php`](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/TransactionController.php) (Transactions), [`backend/app/Services/ReportService.php`](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/ReportService.php) (Reports and trends)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue Client"]
  node_spa["Finance interface<br/>[App.vue]"]
end

subgraph group_api["API and Identity"]
  node_router["API routes<br/>[api.php]"]
  node_auth["Sign-in and security<br/>[AuthController.php]"]
  node_database[("MySQL data store")]
end

subgraph group_money["Money Management"]
  node_accounts["Accounts"]
  node_transactions["Transactions"]
  node_transactiondata[("Transaction records<br/>[Transaction.php]")]
  node_accountdata[("Account records<br/>[Account.php]")]
  node_categories[("Categories and tags<br/>[Category.php]")]
  node_budgets["Budgets"]
  node_budgetdata[("Budget records<br/>[Budget.php]")]
  node_rules["Auto-categorization"]
  node_ruleapplier["Rule application"]
  node_importexport["Import and export"]
  node_recurring[("Recurring transactions")]
end

subgraph group_insights["Insights and Planning"]
  node_reports["Reports and trends<br/>[ReportService.php]"]
  node_reportapi["Report endpoints"]
  node_forecast["Cash-flow forecast"]
  node_periods["Financial periods<br/>[FinancialMonth.php]"]
end

subgraph group_operations["Investments and Alerts"]
  node_investments["Investment management"]
  node_savings["Savings goals"]
  node_notifications["Notifications"]
end

node_person(("Finance user"))

node_person -->|"uses"| node_spa
node_spa -.->|"API requests"| node_router
node_router -->|"routes auth"| node_auth
node_router -->|"routes accounts"| node_accounts
node_router -->|"routes transactions"| node_transactions
node_router -->|"routes budgets"| node_budgets
node_router -->|"routes rules"| node_rules
node_router -->|"routes reports"| node_reportapi
node_transactions -->|"reads and writes"| node_transactiondata
node_transactions -->|"loads accounts"| node_accountdata
node_accounts -->|"manages"| node_accountdata
node_budgets -->|"manages"| node_budgetdata
node_rules -->|"applies rules"| node_ruleapplier
node_reportapi -->|"queries reports"| node_reports
node_reportapi -->|"requests forecast"| node_forecast
node_reportapi -->|"sets date range"| node_periods
node_reports -->|"reads transactions"| node_transactiondata
node_reports -->|"groups periods"| node_periods
node_forecast -.->|"uses periods"| node_periods
node_transactiondata -.->|"persists"| node_database
node_accountdata -.->|"persists"| node_database
node_budgetdata -.->|"persists"| node_database

click node_spa "https://github.com/kravenor/myfinance/blob/master/frontend/src/App.vue"
click node_router "https://github.com/kravenor/myfinance/blob/master/backend/routes/api.php"
click node_auth "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/Auth/AuthController.php"
click node_accounts "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/AccountController.php"
click node_transactions "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/TransactionController.php"
click node_transactiondata "https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Transaction.php"
click node_accountdata "https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Account.php"
click node_categories "https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Category.php"
click node_budgets "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/BudgetController.php"
click node_budgetdata "https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Budget.php"
click node_rules "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/CategorizationRuleController.php"
click node_ruleapplier "https://github.com/kravenor/myfinance/blob/master/backend/app/Services/CategorizationRuleApplier.php"
click node_importexport "https://github.com/kravenor/myfinance/blob/master/backend/app/Services/TransactionImportService.php"
click node_reports "https://github.com/kravenor/myfinance/blob/master/backend/app/Services/ReportService.php"
click node_reportapi "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/ReportController.php"
click node_forecast "https://github.com/kravenor/myfinance/blob/master/backend/app/Services/ExpenseForecastService.php"
click node_periods "https://github.com/kravenor/myfinance/blob/master/backend/app/Support/FinancialMonth.php"
click node_recurring "https://github.com/kravenor/myfinance/blob/master/backend/app/Models/RecurringTransaction.php"
click node_investments "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/InvestmentController.php"
click node_savings "https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/SavingsGoalController.php"
click node_notifications "https://github.com/kravenor/myfinance/blob/master/backend/app/Services/NotificationScanner.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_spa,node_person toneBlue
class node_router,node_auth,node_database toneAmber
class node_accounts,node_transactions,node_transactiondata,node_accountdata,node_categories,node_budgets,node_budgetdata,node_rules,node_ruleapplier,node_importexport,node_recurring toneMint
class node_reports,node_reportapi,node_forecast,node_periods toneRose
class node_investments,node_savings,node_notifications toneIndigo
```

## Components

### Vue Client

- [Finance interface](https://github.com/kravenor/myfinance/blob/master/frontend/src/App.vue): `frontend/src/App.vue`

### API and Identity

- [API routes](https://github.com/kravenor/myfinance/blob/master/backend/routes/api.php): `backend/routes/api.php`
- [Sign-in and security](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/Auth/AuthController.php): `backend/app/Http/Controllers/Auth/AuthController.php`
- **MySQL data store**

### Money Management

- [Accounts](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/AccountController.php): `backend/app/Http/Controllers/AccountController.php`
- [Transactions](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/TransactionController.php): `backend/app/Http/Controllers/TransactionController.php`
- [Transaction records](https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Transaction.php): `backend/app/Models/Transaction.php`
- [Account records](https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Account.php): `backend/app/Models/Account.php`
- [Categories and tags](https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Category.php): `backend/app/Models/Category.php`
- [Budgets](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/BudgetController.php): `backend/app/Http/Controllers/BudgetController.php`
- [Budget records](https://github.com/kravenor/myfinance/blob/master/backend/app/Models/Budget.php): `backend/app/Models/Budget.php`
- [Auto-categorization](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/CategorizationRuleController.php): `backend/app/Http/Controllers/CategorizationRuleController.php`
- [Rule application](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/CategorizationRuleApplier.php): `backend/app/Services/CategorizationRuleApplier.php`
- [Import and export](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/TransactionImportService.php): `backend/app/Services/TransactionImportService.php`
- [Recurring transactions](https://github.com/kravenor/myfinance/blob/master/backend/app/Models/RecurringTransaction.php): `backend/app/Models/RecurringTransaction.php`

### Insights and Planning

- [Reports and trends](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/ReportService.php): `backend/app/Services/ReportService.php`
- [Report endpoints](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/ReportController.php): `backend/app/Http/Controllers/ReportController.php`
- [Cash-flow forecast](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/ExpenseForecastService.php): `backend/app/Services/ExpenseForecastService.php`
- [Financial periods](https://github.com/kravenor/myfinance/blob/master/backend/app/Support/FinancialMonth.php): `backend/app/Support/FinancialMonth.php`

### Investments and Alerts

- [Investment management](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/InvestmentController.php): `backend/app/Http/Controllers/InvestmentController.php`
- [Savings goals](https://github.com/kravenor/myfinance/blob/master/backend/app/Http/Controllers/SavingsGoalController.php): `backend/app/Http/Controllers/SavingsGoalController.php`
- [Notifications](https://github.com/kravenor/myfinance/blob/master/backend/app/Services/NotificationScanner.php): `backend/app/Services/NotificationScanner.php`

### Other components

- **Finance user**

## Connections

- Finance user → Finance interface: uses (evidence: `README.md`)
- Finance interface → API routes: API requests
- API routes → Sign-in and security: routes auth (evidence: `backend/routes/api.php`)
- API routes → Accounts: routes accounts (evidence: `backend/routes/api.php`)
- API routes → Transactions: routes transactions (evidence: `backend/routes/api.php`)
- API routes → Budgets: routes budgets (evidence: `backend/routes/api.php`)
- API routes → Auto-categorization: routes rules (evidence: `backend/routes/api.php`)
- API routes → Report endpoints: routes reports (evidence: `backend/routes/api.php`)
- Transactions → Transaction records: reads and writes (evidence: `backend/app/Http/Controllers/TransactionController.php`)
- Transactions → Account records: loads accounts (evidence: `backend/app/Http/Controllers/TransactionController.php`)
- Accounts → Account records: manages (evidence: `backend/app/Http/Controllers/AccountController.php`)
- Budgets → Budget records: manages (evidence: `backend/app/Http/Controllers/BudgetController.php`)
- Auto-categorization → Rule application: applies rules (evidence: `backend/app/Http/Controllers/CategorizationRuleController.php`)
- Report endpoints → Reports and trends: queries reports (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Report endpoints → Cash-flow forecast: requests forecast (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Report endpoints → Financial periods: sets date range (evidence: `backend/app/Http/Controllers/ReportController.php`)
- Reports and trends → Transaction records: reads transactions (evidence: `backend/app/Services/ReportService.php`)
- Reports and trends → Financial periods: groups periods (evidence: `backend/app/Services/ReportService.php`)
- Cash-flow forecast → Financial periods: uses periods (evidence: `backend/app/Services/ExpenseForecastService.php`)
- Transaction records → MySQL data store: persists
- Account records → MySQL data store: persists
- Budget records → MySQL data store: persists
