# hari1406/personal-finance-mangement-web-application architecture

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

- Interactive diagram: https://gitdiagram.com/hari1406/personal-finance-mangement-web-application
- Repository: https://github.com/hari1406/personal-finance-mangement-web-application

## Overview

Money Manager is a full-stack personal finance app. A user signs up or logs in, then views account balances and period summaries, records income or expenses, transfers funds, and filters or edits transaction history. The React app calls an authenticated Express API, which applies account, transaction, reporting, and time-lock rules and persists user-scoped data through MongoDB. The README documents capabilities whose component-level wiring was not sampled; those links are cited to the README rather than presented as inspected source.

Main entry points: [`backend/server.js`](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/server.js) (HTTP server), [`frontend/src/App.jsx`](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/App.jsx) (App routing), [`frontend/src/pages/Home.jsx`](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/Home.jsx) (Home dashboard), [`backend/routes/transactionRoutes.js`](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/transactionRoutes.js) (Transaction routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web app"]
  node_app["App routing<br/>[App.jsx]"]
  node_authui["Login and signup<br/>[Login.jsx]"]
  node_authstate["Auth state<br/>[AuthContext.jsx]"]
  node_apiclient["API client<br/>[api.js]"]
  node_home["Home dashboard<br/>[Home.jsx]"]
  node_dashboard["Dashboard summaries<br/>[Dashboard.jsx]"]
  node_summary["Category summary<br/>[Summary.jsx]"]
  node_accountsui["Account management<br/>[Accounts.jsx]"]
  node_entryui["Transaction entry"]
  node_historyui["Transaction history"]
  node_filters["History filters<br/>[Filters.jsx]"]
  node_historylist["History list"]
end

subgraph group_api["API and domain"]
  node_server["HTTP server<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_authmiddleware["Token verification<br/>[auth.js]"]
  node_accountroutes["Account routes<br/>[accountRoutes.js]"]
  node_accountcontroller["Account operations"]
  node_transactionroutes["Transaction routes"]
  node_transactioncontroller["Transaction operations"]
  node_timelock["12-hour edit lock<br/>[timeRestriction.js]"]
  node_reportroutes["Report routes<br/>[reportRoutes.js]"]
  node_reportcontroller["Report queries"]
end

subgraph group_storage["Persistence"]
  node_dbconfig["Database connection<br/>[db.js]"]
  node_userstore[("User records<br/>[User.js]")]
  node_accountstore[("Account records<br/>[Account.js]")]
  node_transactionstore[("Transaction records<br/>[Transaction.js]")]
end

node_user(("User"))
node_mongodb[("MongoDB Atlas")]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_authui
node_authui -.->|"authenticates"| node_authstate
node_app -->|"reads state"| node_authstate
node_authstate -->|"calls"| node_apiclient
node_app -->|"renders"| node_home
node_app -->|"renders"| node_historyui
node_home -->|"presents"| node_dashboard
node_home -->|"presents"| node_summary
node_home -->|"presents"| node_accountsui
node_home -->|"opens"| node_entryui
node_historyui -->|"filters"| node_filters
node_historyui -->|"presents"| node_historylist
node_accountsui -->|"calls"| node_apiclient
node_apiclient -->|"requests API"| node_server
node_server -->|"connects"| node_dbconfig
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_accountroutes
node_server -->|"mounts"| node_transactionroutes
node_server -->|"mounts"| node_reportroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects profile"| node_authmiddleware
node_accountroutes -->|"dispatches"| node_accountcontroller
node_accountroutes -->|"protects routes"| node_authmiddleware
node_transactionroutes -->|"dispatches"| node_transactioncontroller
node_transactionroutes -->|"protects routes"| node_authmiddleware
node_transactionroutes -->|"checks edits"| node_timelock
node_reportroutes -->|"dispatches"| node_reportcontroller
node_reportroutes -->|"protects routes"| node_authmiddleware
node_authcontroller -->|"reads and writes"| node_userstore
node_accountcontroller -->|"reads and writes"| node_accountstore
node_accountcontroller -->|"records transfers"| node_transactionstore
node_transactioncontroller -->|"reads and writes"| node_transactionstore
node_transactioncontroller -->|"updates balances"| node_accountstore
node_reportcontroller -->|"queries"| node_transactionstore
node_timelock -->|"checks age"| node_transactionstore
node_dbconfig -.->|"connects"| node_mongodb

click node_app "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/Login.jsx"
click node_authstate "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/context/AuthContext.jsx"
click node_apiclient "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/services/api.js"
click node_home "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/Home.jsx"
click node_dashboard "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Dashboard.jsx"
click node_summary "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Summary.jsx"
click node_accountsui "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Accounts.jsx"
click node_entryui "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/AddTransactionModal.jsx"
click node_historyui "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/TransactionPage.jsx"
click node_filters "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Filters.jsx"
click node_historylist "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/TransactionHistory.jsx"
click node_server "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/server.js"
click node_authroutes "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/authRoutes.js"
click node_authcontroller "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/authController.js"
click node_authmiddleware "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/middleware/auth.js"
click node_accountroutes "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/accountRoutes.js"
click node_accountcontroller "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/accountController.js"
click node_transactionroutes "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/transactionRoutes.js"
click node_transactioncontroller "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/transactionController.js"
click node_timelock "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/middleware/timeRestriction.js"
click node_reportroutes "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/reportRoutes.js"
click node_reportcontroller "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/reportController.js"
click node_dbconfig "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/config/db.js"
click node_userstore "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/User.js"
click node_accountstore "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/Account.js"
click node_transactionstore "https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/Transaction.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_authui,node_authstate,node_apiclient,node_home,node_dashboard,node_summary,node_accountsui,node_entryui,node_historyui,node_filters,node_historylist,node_user toneBlue
class node_server,node_authroutes,node_authcontroller,node_authmiddleware,node_accountroutes,node_accountcontroller,node_transactionroutes,node_transactioncontroller,node_timelock,node_reportroutes,node_reportcontroller,node_mongodb toneAmber
class node_dbconfig,node_userstore,node_accountstore,node_transactionstore toneMint
```

## Components

### Web app

- [App routing](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and signup](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Auth state](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Home dashboard](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Dashboard summaries](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Category summary](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Summary.jsx): `frontend/src/components/Summary.jsx`
- [Account management](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Accounts.jsx): `frontend/src/components/Accounts.jsx`
- [Transaction entry](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/AddTransactionModal.jsx): `frontend/src/components/AddTransactionModal.jsx`
- [Transaction history](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/pages/TransactionPage.jsx): `frontend/src/pages/TransactionPage.jsx`
- [History filters](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/Filters.jsx): `frontend/src/components/Filters.jsx`
- [History list](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/frontend/src/components/TransactionHistory.jsx): `frontend/src/components/TransactionHistory.jsx`

### API and domain

- [HTTP server](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Authentication](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Token verification](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [Account routes](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/accountRoutes.js): `backend/routes/accountRoutes.js`
- [Account operations](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/accountController.js): `backend/controllers/accountController.js`
- [Transaction routes](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/transactionRoutes.js): `backend/routes/transactionRoutes.js`
- [Transaction operations](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/transactionController.js): `backend/controllers/transactionController.js`
- [12-hour edit lock](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/middleware/timeRestriction.js): `backend/middleware/timeRestriction.js`
- [Report routes](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/routes/reportRoutes.js): `backend/routes/reportRoutes.js`
- [Report queries](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/controllers/reportController.js): `backend/controllers/reportController.js`

### Persistence

- [Database connection](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/config/db.js): `backend/config/db.js`
- [User records](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/User.js): `backend/models/User.js`
- [Account records](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/Account.js): `backend/models/Account.js`
- [Transaction records](https://github.com/hari1406/personal-finance-mangement-web-application/blob/main/backend/models/Transaction.js): `backend/models/Transaction.js`

### Other components

- **User**
- **MongoDB Atlas**

## Connections

- User → App routing: uses (evidence: `README.md`)
- App routing → Login and signup: shows (evidence: `frontend/src/App.jsx`)
- Login and signup → Auth state: authenticates
- App routing → Auth state: reads state (evidence: `frontend/src/App.jsx`)
- Auth state → API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- App routing → Home dashboard: renders (evidence: `frontend/src/App.jsx`)
- App routing → Transaction history: renders (evidence: `frontend/src/App.jsx`)
- Home dashboard → Dashboard summaries: presents (evidence: `README.md`)
- Home dashboard → Category summary: presents (evidence: `README.md`)
- Home dashboard → Account management: presents (evidence: `README.md`)
- Home dashboard → Transaction entry: opens (evidence: `README.md`)
- Transaction history → History filters: filters (evidence: `README.md`)
- Transaction history → History list: presents (evidence: `README.md`)
- Account management → API client: calls (evidence: `frontend/src/components/Accounts.jsx`)
- API client → HTTP server: requests API (evidence: `README.md`)
- HTTP server → Database connection: connects (evidence: `backend/server.js`)
- HTTP server → Auth routes: mounts (evidence: `backend/server.js`)
- HTTP server → Account routes: mounts (evidence: `backend/server.js`)
- HTTP server → Transaction routes: mounts (evidence: `backend/server.js`)
- HTTP server → Report routes: mounts (evidence: `backend/server.js`)
- Auth routes → Authentication: dispatches (evidence: `backend/routes/authRoutes.js`)
- Auth routes → Token verification: protects profile (evidence: `backend/routes/authRoutes.js`)
- Account routes → Account operations: dispatches (evidence: `backend/routes/accountRoutes.js`)
- Account routes → Token verification: protects routes (evidence: `backend/routes/accountRoutes.js`)
- Transaction routes → Transaction operations: dispatches (evidence: `backend/routes/transactionRoutes.js`)
- Transaction routes → Token verification: protects routes (evidence: `backend/routes/transactionRoutes.js`)
- Transaction routes → 12-hour edit lock: checks edits (evidence: `backend/routes/transactionRoutes.js`)
- Report routes → Report queries: dispatches (evidence: `backend/routes/reportRoutes.js`)
- Report routes → Token verification: protects routes (evidence: `backend/routes/reportRoutes.js`)
- Authentication → User records: reads and writes (evidence: `backend/controllers/authController.js`)
- Account operations → Account records: reads and writes (evidence: `backend/controllers/accountController.js`)
- Account operations → Transaction records: records transfers (evidence: `backend/controllers/accountController.js`)
- Transaction operations → Transaction records: reads and writes (evidence: `backend/controllers/transactionController.js`)
- Transaction operations → Account records: updates balances (evidence: `backend/controllers/transactionController.js`)
- Report queries → Transaction records: queries (evidence: `backend/controllers/reportController.js`)
- 12-hour edit lock → Transaction records: checks age (evidence: `backend/middleware/timeRestriction.js`)
- Database connection → MongoDB Atlas: connects
