# aakashhh-17/money-manager architecture

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

- Interactive diagram: https://gitdiagram.com/aakashhh-17/money-manager
- Repository: https://github.com/aakashhh-17/money-manager

## Overview

FinMate is a personal-finance and shared-expense application. A user signs in, manages accounts and transactions, reviews dashboard and budget information, and can create groups, record split expenses, see balances, and settle debts. The client exposes these workflows through protected pages and service modules; the server mounts corresponding API route modules and also registers scheduled/event functions. Sampled controllers show database-backed authentication, transactions, expense splitting, group balances, and settlements. Other subsystem connections are limited where implementation excerpts were unavailable.

Main entry points: [`server/index.js`](https://github.com/aakashhh-17/money-manager/blob/main/server/index.js) (Express server), [`client/src/App.jsx`](https://github.com/aakashhh-17/money-manager/blob/main/client/src/App.jsx) (App routes), [`server/db.js`](https://github.com/aakashhh-17/money-manager/blob/main/server/db.js) (Postgres database), [`server/controllers/transaction.controller.js`](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/transaction.controller.js) (Transaction logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App routes<br/>[App.jsx]"]
  node_authcontext["Auth context<br/>[AuthContext.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_transactions["Transactions<br/>[Transactions.jsx]"]
  node_groupspage["Groups pages<br/>[Groups.jsx]"]
  node_groupdetail["Group detail<br/>[GroupDetail.jsx]"]
  node_authsvc["Auth service<br/>[authService.js]"]
  node_accountsvc["Account service<br/>[accountService.js]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and domain"]
  node_account_routes["Account routes<br/>[account.route.js]"]
  node_auth_routes["Auth routes<br/>[auth.route.js]"]
  node_transaction_routes["Transaction routes"]
  node_dashboard_routes["Dashboard routes<br/>[dashboard.route.js]"]
  node_budget_routes["Budget routes<br/>[budget.route.js]"]
  node_category_routes["Category routes<br/>[category.route.js]"]
  node_transaction_controller["Transaction logic"]
  node_auth_controller["Authentication<br/>[auth.controller.js]"]
  node_database[("Postgres database<br/>[db.js]")]
  node_server["Express server<br/>[index.js]"]
end

subgraph group_groups["Shared expenses"]
  node_group_routes["Group routes<br/>[group.route.js]"]
  node_expense_routes["Expense routes<br/>[expense.route.js]"]
  node_expense_controller["Expense logic"]
  node_group_controller["Group logic"]
  node_settlement_controller["Settlement logic"]
  node_splitcalc["Split calculator<br/>[splitCalculator.js]"]
  node_balances["Balance calculation<br/>[balance.service.js]"]
end

subgraph group_automation["Background services"]
  node_inngest["Inngest functions<br/>[functions.js]"]
  node_email["Email service<br/>[email.service.js]"]
  node_inngest_client["Inngest client<br/>[client.js]"]
end

node_user(("User"))
node_gemini{{"Gemini AI"}}
node_resend{{"Resend"}}

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_authcontext
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_transactions
node_app -->|"routes"| node_groupspage
node_app -->|"routes"| node_groupdetail
node_authsvc -->|"sends requests"| node_api_client
node_accountsvc -->|"sends requests"| node_api_client
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_account_routes
node_server -->|"mounts"| node_transaction_routes
node_server -->|"mounts"| node_dashboard_routes
node_server -->|"mounts"| node_budget_routes
node_server -->|"mounts"| node_category_routes
node_server -->|"mounts"| node_group_routes
node_server -->|"mounts"| node_expense_routes
node_auth_controller -->|"reads and writes"| node_database
node_transaction_controller -->|"reads and writes"| node_database
node_transaction_controller -.->|"requests receipt parsing"| node_gemini
node_expense_controller -->|"reads and writes"| node_database
node_expense_controller -->|"computes splits"| node_splitcalc
node_group_controller -->|"reads and writes"| node_database
node_group_controller -->|"computes balances"| node_balances
node_settlement_controller -->|"records settlement"| node_database
node_inngest_client -->|"registers functions"| node_inngest
node_server -->|"serves functions"| node_inngest
node_email -.->|"sends email"| node_resend

click node_app "https://github.com/aakashhh-17/money-manager/blob/main/client/src/App.jsx"
click node_authcontext "https://github.com/aakashhh-17/money-manager/blob/main/client/src/context/AuthContext.jsx"
click node_dashboard "https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Dashboard.jsx"
click node_transactions "https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Transactions.jsx"
click node_groupspage "https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Groups.jsx"
click node_groupdetail "https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/GroupDetail.jsx"
click node_authsvc "https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/authService.js"
click node_accountsvc "https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/accountService.js"
click node_api_client "https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/api.js"
click node_account_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/account.route.js"
click node_auth_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/auth.route.js"
click node_transaction_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/transaction.route.js"
click node_dashboard_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/dashboard.route.js"
click node_budget_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/budget.route.js"
click node_category_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/category.route.js"
click node_group_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/group.route.js"
click node_expense_routes "https://github.com/aakashhh-17/money-manager/blob/main/server/routes/expense.route.js"
click node_transaction_controller "https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/transaction.controller.js"
click node_auth_controller "https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/auth.controller.js"
click node_expense_controller "https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/expense.controller.js"
click node_group_controller "https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/group.controller.js"
click node_settlement_controller "https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/settlement.controller.js"
click node_splitcalc "https://github.com/aakashhh-17/money-manager/blob/main/server/services/splitCalculator.js"
click node_balances "https://github.com/aakashhh-17/money-manager/blob/main/server/services/balance.service.js"
click node_database "https://github.com/aakashhh-17/money-manager/blob/main/server/db.js"
click node_inngest "https://github.com/aakashhh-17/money-manager/blob/main/server/inngest/functions.js"
click node_email "https://github.com/aakashhh-17/money-manager/blob/main/server/services/email.service.js"
click node_server "https://github.com/aakashhh-17/money-manager/blob/main/server/index.js"
click node_inngest_client "https://github.com/aakashhh-17/money-manager/blob/main/server/inngest/client.js"

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_app,node_authcontext,node_dashboard,node_transactions,node_groupspage,node_groupdetail,node_authsvc,node_accountsvc,node_api_client,node_user toneBlue
class node_account_routes,node_auth_routes,node_transaction_routes,node_dashboard_routes,node_budget_routes,node_category_routes,node_transaction_controller,node_auth_controller,node_database,node_server toneAmber
class node_group_routes,node_expense_routes,node_expense_controller,node_group_controller,node_settlement_controller,node_splitcalc,node_balances toneMint
class node_inngest,node_email,node_inngest_client toneRose
class node_gemini,node_resend toneIndigo
```

## Components

### Client experience

- [App routes](https://github.com/aakashhh-17/money-manager/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth context](https://github.com/aakashhh-17/money-manager/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Dashboard](https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Transactions](https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Transactions.jsx): `client/src/pages/Transactions.jsx`
- [Groups pages](https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/Groups.jsx): `client/src/pages/Groups.jsx`
- [Group detail](https://github.com/aakashhh-17/money-manager/blob/main/client/src/pages/GroupDetail.jsx): `client/src/pages/GroupDetail.jsx`
- [Auth service](https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/authService.js): `client/src/services/authService.js`
- [Account service](https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/accountService.js): `client/src/services/accountService.js`
- [API client](https://github.com/aakashhh-17/money-manager/blob/main/client/src/services/api.js): `client/src/services/api.js`

### API and domain

- [Account routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/account.route.js): `server/routes/account.route.js`
- [Auth routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/auth.route.js): `server/routes/auth.route.js`
- [Transaction routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/transaction.route.js): `server/routes/transaction.route.js`
- [Dashboard routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/dashboard.route.js): `server/routes/dashboard.route.js`
- [Budget routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/budget.route.js): `server/routes/budget.route.js`
- [Category routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/category.route.js): `server/routes/category.route.js`
- [Transaction logic](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/transaction.controller.js): `server/controllers/transaction.controller.js`
- [Authentication](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/auth.controller.js): `server/controllers/auth.controller.js`
- [Postgres database](https://github.com/aakashhh-17/money-manager/blob/main/server/db.js): `server/db.js`
- [Express server](https://github.com/aakashhh-17/money-manager/blob/main/server/index.js): `server/index.js`

### Shared expenses

- [Group routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/group.route.js): `server/routes/group.route.js`
- [Expense routes](https://github.com/aakashhh-17/money-manager/blob/main/server/routes/expense.route.js): `server/routes/expense.route.js`
- [Expense logic](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/expense.controller.js): `server/controllers/expense.controller.js`
- [Group logic](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/group.controller.js): `server/controllers/group.controller.js`
- [Settlement logic](https://github.com/aakashhh-17/money-manager/blob/main/server/controllers/settlement.controller.js): `server/controllers/settlement.controller.js`
- [Split calculator](https://github.com/aakashhh-17/money-manager/blob/main/server/services/splitCalculator.js): `server/services/splitCalculator.js`
- [Balance calculation](https://github.com/aakashhh-17/money-manager/blob/main/server/services/balance.service.js): `server/services/balance.service.js`

### Background services

- [Inngest functions](https://github.com/aakashhh-17/money-manager/blob/main/server/inngest/functions.js): `server/inngest/functions.js`
- [Email service](https://github.com/aakashhh-17/money-manager/blob/main/server/services/email.service.js): `server/services/email.service.js`
- [Inngest client](https://github.com/aakashhh-17/money-manager/blob/main/server/inngest/client.js): `server/inngest/client.js`

### Other components

- **User**
- **Gemini AI**
- **Resend**

## Connections

- User → App routes: uses
- App routes → Auth context: provides auth
- App routes → Dashboard: routes
- App routes → Transactions: routes
- App routes → Groups pages: routes
- App routes → Group detail: routes
- Auth service → API client: sends requests
- Account service → API client: sends requests
- Express server → Auth routes: mounts
- Express server → Account routes: mounts
- Express server → Transaction routes: mounts
- Express server → Dashboard routes: mounts
- Express server → Budget routes: mounts
- Express server → Category routes: mounts
- Express server → Group routes: mounts
- Express server → Expense routes: mounts
- Authentication → Postgres database: reads and writes
- Transaction logic → Postgres database: reads and writes
- Transaction logic → Gemini AI: requests receipt parsing
- Expense logic → Postgres database: reads and writes
- Expense logic → Split calculator: computes splits
- Group logic → Postgres database: reads and writes
- Group logic → Balance calculation: computes balances
- Settlement logic → Postgres database: records settlement
- Inngest client → Inngest functions: registers functions
- Express server → Inngest functions: serves functions
- Email service → Resend: sends email
