# devchinmaysamal17/fintrack---personal-finance-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/devchinmaysamal17/fintrack---personal-finance-dashboard
- Repository: https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard

## Overview

FinTrack is a personal-finance dashboard: users register or log in, then manage transactions, categories, and budgets and review their finances in the browser. FastAPI serves the UI and API; authenticated routes use JWT identity and SQLAlchemy sessions to access PostgreSQL. The graph preserves the documented dashboard, transaction, category, and budget experiences. UI/API links rely on the README; source excerpts show backend routing and selected calls, so unsampled frontend implementation details are not inferred.

Main entry points: [`Backend/main.py`](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/main.py) (FastAPI app and static UI), [`Backend/dependencies.py`](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/dependencies.py) (Session lifecycle), [`Backend/models.py`](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/models.py) (Finance data models), [`Backend/routers/users.py`](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/users.py) (Account management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser UI"]
  node_login_ui["Login and signup<br/>[login-script.js]"]
  node_shared_ui["Session utilities<br/>[utils.js]"]
  node_dashboard_ui["Finance dashboard<br/>[dashboard.js]"]
  node_transactions_ui["Transaction view<br/>[transactions.js]"]
  node_budget_ui["Budget view<br/>[budget.js]"]
end

subgraph group_api["API workflows"]
  node_app["FastAPI app and static UI<br/>[main.py]"]
  node_user_routes["Account management<br/>[users.py]"]
  node_transaction_routes["Transaction API<br/>[transactions.py]"]
  node_category_routes["Category API<br/>[categories.py]"]
  node_budget_routes["Budget API<br/>[budgets.py]"]
  node_schemas["Request and response shapes<br/>[schemas.py]"]
end

subgraph group_identity["Identity and sessions"]
  node_auth_routes["Login endpoint<br/>[auth.py]"]
  node_token_service["JWT create and verify<br/>[jwt_token.py]"]
  node_password_hash["Password hashing<br/>[hashing.py]"]
  node_current_user["Current-user authentication<br/>[oauth2.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_session["Session lifecycle<br/>[dependencies.py]"]
  node_db_config["Database engine<br/>[database.py]"]
  node_domain_models["Finance data models<br/>[models.py]"]
end

node_browser(("User browser"))
node_postgres[("PostgreSQL")]

node_browser -->|"requests pages"| node_app
node_app -->|"serves UI"| node_login_ui
node_app -->|"mounts static files"| node_shared_ui
node_login_ui -->|"registers and logs in"| node_app
node_shared_ui -->|"checks session"| node_app
node_dashboard_ui -->|"fetches transactions"| node_app
node_transactions_ui -->|"manages transactions"| node_app
node_budget_ui -->|"fetches budgets and transactions"| node_app
node_app -->|"registers router"| node_auth_routes
node_app -->|"registers router"| node_user_routes
node_app -->|"registers router"| node_transaction_routes
node_app -->|"registers router"| node_category_routes
node_app -->|"registers router"| node_budget_routes
node_app -->|"authenticates /me"| node_current_user
node_user_routes -->|"hashes passwords"| node_password_hash
node_auth_routes -->|"verifies passwords"| node_password_hash
node_auth_routes -->|"issues JWT"| node_token_service
node_current_user -->|"verifies JWT"| node_token_service
node_current_user -->|"loads user"| node_db_session
node_current_user -->|"queries user"| node_domain_models
node_db_session -->|"opens session"| node_db_config
node_app -->|"creates tables"| node_domain_models
node_user_routes -->|"creates user and categories"| node_domain_models
node_auth_routes -->|"queries account"| node_domain_models
node_transaction_routes -->|"reads and writes"| node_domain_models
node_category_routes -->|"reads and writes"| node_domain_models
node_budget_routes -->|"reads and writes"| node_domain_models
node_user_routes -->|"uses session"| node_db_session
node_auth_routes -->|"uses session"| node_db_session
node_transaction_routes -->|"uses session"| node_db_session
node_category_routes -->|"uses session"| node_db_session
node_budget_routes -->|"uses session"| node_db_session
node_user_routes -->|"validates and shapes"| node_schemas
node_transaction_routes -->|"validates and shapes"| node_schemas
node_category_routes -->|"validates and shapes"| node_schemas
node_budget_routes -->|"validates and shapes"| node_schemas
node_db_config -->|"connects to"| node_postgres

click node_login_ui "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/login-script.js"
click node_shared_ui "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/utils.js"
click node_dashboard_ui "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/dashboard.js"
click node_transactions_ui "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/transactions.js"
click node_budget_ui "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/budget.js"
click node_app "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/main.py"
click node_user_routes "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/users.py"
click node_auth_routes "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/auth.py"
click node_transaction_routes "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/transactions.py"
click node_category_routes "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/categories.py"
click node_budget_routes "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/budgets.py"
click node_schemas "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/schemas.py"
click node_token_service "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/jwt_token.py"
click node_password_hash "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/hashing.py"
click node_current_user "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/oauth2.py"
click node_db_session "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/dependencies.py"
click node_db_config "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/database.py"
click node_domain_models "https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/models.py"

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_login_ui,node_shared_ui,node_dashboard_ui,node_transactions_ui,node_budget_ui,node_browser toneBlue
class node_app,node_user_routes,node_transaction_routes,node_category_routes,node_budget_routes,node_schemas,node_postgres toneAmber
class node_auth_routes,node_token_service,node_password_hash,node_current_user toneMint
class node_db_session,node_db_config,node_domain_models toneRose
```

## Components

### Browser UI

- [Login and signup](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/login-script.js): `Frontend/login-script.js`
- [Session utilities](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/utils.js): `Frontend/utils.js`
- [Finance dashboard](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/dashboard.js): `Frontend/dashboard.js`
- [Transaction view](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/transactions.js): `Frontend/transactions.js`
- [Budget view](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Frontend/budget.js): `Frontend/budget.js`

### API workflows

- [FastAPI app and static UI](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/main.py): `Backend/main.py`
- [Account management](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/users.py): `Backend/routers/users.py`
- [Transaction API](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/transactions.py): `Backend/routers/transactions.py`
- [Category API](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/categories.py): `Backend/routers/categories.py`
- [Budget API](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/budgets.py): `Backend/routers/budgets.py`
- [Request and response shapes](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/schemas.py): `Backend/schemas.py`

### Identity and sessions

- [Login endpoint](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/routers/auth.py): `Backend/routers/auth.py`
- [JWT create and verify](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/jwt_token.py): `Backend/jwt_token.py`
- [Password hashing](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/hashing.py): `Backend/hashing.py`
- [Current-user authentication](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/oauth2.py): `Backend/oauth2.py`

### Persistence

- [Session lifecycle](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/dependencies.py): `Backend/dependencies.py`
- [Database engine](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/database.py): `Backend/database.py`
- [Finance data models](https://github.com/devchinmaysamal17/fintrack---personal-finance-dashboard/blob/main/Backend/models.py): `Backend/models.py`

### Other components

- **User browser**
- **PostgreSQL**

## Connections

- User browser → FastAPI app and static UI: requests pages (evidence: `README.md`)
- FastAPI app and static UI → Login and signup: serves UI (evidence: `Backend/main.py`)
- FastAPI app and static UI → Session utilities: mounts static files (evidence: `Backend/main.py`)
- Login and signup → FastAPI app and static UI: registers and logs in (evidence: `README.md`)
- Session utilities → FastAPI app and static UI: checks session (evidence: `README.md`)
- Finance dashboard → FastAPI app and static UI: fetches transactions (evidence: `README.md`)
- Transaction view → FastAPI app and static UI: manages transactions (evidence: `README.md`)
- Budget view → FastAPI app and static UI: fetches budgets and transactions (evidence: `README.md`)
- FastAPI app and static UI → Login endpoint: registers router (evidence: `Backend/main.py`)
- FastAPI app and static UI → Account management: registers router (evidence: `Backend/main.py`)
- FastAPI app and static UI → Transaction API: registers router (evidence: `Backend/main.py`)
- FastAPI app and static UI → Category API: registers router (evidence: `Backend/main.py`)
- FastAPI app and static UI → Budget API: registers router (evidence: `Backend/main.py`)
- FastAPI app and static UI → Current-user authentication: authenticates /me (evidence: `Backend/main.py`)
- Account management → Password hashing: hashes passwords (evidence: `Backend/routers/users.py`)
- Login endpoint → Password hashing: verifies passwords (evidence: `Backend/routers/auth.py`)
- Login endpoint → JWT create and verify: issues JWT (evidence: `Backend/routers/auth.py`)
- Current-user authentication → JWT create and verify: verifies JWT (evidence: `Backend/oauth2.py`)
- Current-user authentication → Session lifecycle: loads user (evidence: `Backend/oauth2.py`)
- Current-user authentication → Finance data models: queries user (evidence: `Backend/oauth2.py`)
- Session lifecycle → Database engine: opens session (evidence: `Backend/dependencies.py`)
- FastAPI app and static UI → Finance data models: creates tables (evidence: `README.md`)
- Account management → Finance data models: creates user and categories (evidence: `Backend/routers/users.py`)
- Login endpoint → Finance data models: queries account (evidence: `Backend/routers/auth.py`)
- Transaction API → Finance data models: reads and writes (evidence: `Backend/routers/transactions.py`)
- Category API → Finance data models: reads and writes (evidence: `Backend/routers/categories.py`)
- Budget API → Finance data models: reads and writes (evidence: `Backend/routers/budgets.py`)
- Account management → Session lifecycle: uses session (evidence: `Backend/routers/users.py`)
- Login endpoint → Session lifecycle: uses session (evidence: `Backend/routers/auth.py`)
- Transaction API → Session lifecycle: uses session (evidence: `Backend/routers/transactions.py`)
- Category API → Session lifecycle: uses session (evidence: `Backend/routers/categories.py`)
- Budget API → Session lifecycle: uses session (evidence: `Backend/routers/budgets.py`)
- Account management → Request and response shapes: validates and shapes (evidence: `Backend/routers/users.py`)
- Transaction API → Request and response shapes: validates and shapes (evidence: `Backend/routers/transactions.py`)
- Category API → Request and response shapes: validates and shapes (evidence: `Backend/routers/categories.py`)
- Budget API → Request and response shapes: validates and shapes (evidence: `Backend/routers/budgets.py`)
- Database engine → PostgreSQL: connects to (evidence: `README.md`)
