# subhansahebshaik/personal-finance-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/subhansahebshaik/personal-finance-tracker
- Repository: https://github.com/subhansahebshaik/personal-finance-tracker

## Overview

This is a personal-finance tracker: users authenticate, review yearly income/expense summaries, browse transactions by month and category, and create, edit, relate, or delete transaction records. The React client calls a Django REST backend, whose views serialize transaction data backed by Django models. The sampled source shows the dashboard and transaction-detail flows and shared API/auth behavior; backend routing and several endpoint implementations were not excerpted, so those relationships are shown only where supported by the source index or explicit API calls.

Main entry points: [`frontend/src/App.js`](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/App.js) (Application routes), [`frontend/src/pages/DashboardPage.jsx`](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/DashboardPage.jsx) (Year dashboard), [`frontend/src/pages/TransactionDetailsPage.jsx`](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/TransactionDetailsPage.jsx) (Transaction details), [`frontend/src/api.js`](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application routes<br/>[App.js]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_login["Login dialog<br/>[LoginModal.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_shell["Page shell<br/>[AppShell.jsx]"]
  node_state["Loading and empty states<br/>[StateMessage.jsx]"]
end

subgraph group_domain["Transaction workflows"]
  node_dashboard["Year dashboard<br/>[DashboardPage.jsx]"]
  node_transactions["Category transactions"]
  node_details["Transaction details"]
  node_editor["Transaction editor"]
  node_finance["Finance formatting<br/>[finance.js]"]
end

subgraph group_backend["Backend API"]
  node_endpoints["Finance API endpoints<br/>[views.py]"]
  node_serializer["Transaction serialization<br/>[serializers.py]"]
end

subgraph group_state["Persistence"]
  node_transaction["Transaction model<br/>[models.py]"]
  node_database[("Django database")]
end

node_user(("Finance user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_transactions
node_app -->|"routes to"| node_details
node_app -->|"provides auth"| node_auth
node_app -->|"renders"| node_login
node_login -->|"uses"| node_auth
node_auth -->|"authenticates through"| node_api
node_dashboard -->|"loads summaries"| node_api
node_transactions -->|"loads entries"| node_api
node_details -->|"reads and updates"| node_api
node_dashboard -->|"opens"| node_editor
node_details -->|"edits through"| node_editor
node_dashboard -->|"formats totals"| node_finance
node_transactions -->|"formats totals"| node_finance
node_details -->|"formats details"| node_finance
node_dashboard -->|"renders within"| node_shell
node_transactions -->|"renders within"| node_shell
node_details -->|"renders within"| node_shell
node_dashboard -->|"shows status"| node_state
node_transactions -->|"shows status"| node_state
node_details -->|"shows status"| node_state
node_editor -->|"creates and updates"| node_api
node_api -->|"sends HTTP requests"| node_endpoints
node_endpoints -->|"serializes records"| node_serializer
node_endpoints -->|"queries and changes"| node_transaction
node_serializer -->|"serializes model"| node_transaction
node_transaction -.->|"persists through"| node_database

click node_app "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/App.js"
click node_auth "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/auth/AuthContext.jsx"
click node_login "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/LoginModal.jsx"
click node_api "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/api.js"
click node_dashboard "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_transactions "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/TransactionsPage.jsx"
click node_details "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/TransactionDetailsPage.jsx"
click node_editor "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/AddTransactionModal.jsx"
click node_shell "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/AppShell.jsx"
click node_state "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/StateMessage.jsx"
click node_finance "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/utils/finance.js"
click node_endpoints "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/views.py"
click node_serializer "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/serializers.py"
click node_transaction "https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/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_app,node_auth,node_login,node_api,node_shell,node_state,node_user toneBlue
class node_dashboard,node_transactions,node_details,node_editor,node_finance toneAmber
class node_endpoints,node_serializer toneMint
class node_transaction,node_database toneRose
```

## Components

### Web client

- [Application routes](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Authentication state](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/auth/AuthContext.jsx): `frontend/src/auth/AuthContext.jsx`
- [Login dialog](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/LoginModal.jsx): `frontend/src/components/LoginModal.jsx`
- [API client](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/api.js): `frontend/src/api.js`
- [Page shell](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/AppShell.jsx): `frontend/src/components/AppShell.jsx`
- [Loading and empty states](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/StateMessage.jsx): `frontend/src/components/StateMessage.jsx`

### Transaction workflows

- [Year dashboard](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Category transactions](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/TransactionsPage.jsx): `frontend/src/pages/TransactionsPage.jsx`
- [Transaction details](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/pages/TransactionDetailsPage.jsx): `frontend/src/pages/TransactionDetailsPage.jsx`
- [Transaction editor](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/components/AddTransactionModal.jsx): `frontend/src/components/AddTransactionModal.jsx`
- [Finance formatting](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/frontend/src/utils/finance.js): `frontend/src/utils/finance.js`

### Backend API

- [Finance API endpoints](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/views.py): `backend/financeApp/views.py`
- [Transaction serialization](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/serializers.py): `backend/financeApp/serializers.py`

### Persistence

- [Transaction model](https://github.com/subhansahebshaik/personal-finance-tracker/blob/main/backend/financeApp/models.py): `backend/financeApp/models.py`
- **Django database**

### Other components

- **Finance user**

## Connections

- Finance user → Application routes: uses (evidence: `frontend/src/App.js`)
- Application routes → Year dashboard: routes to (evidence: `frontend/src/App.js`)
- Application routes → Category transactions: routes to (evidence: `frontend/src/App.js`)
- Application routes → Transaction details: routes to (evidence: `frontend/src/App.js`)
- Application routes → Authentication state: provides auth (evidence: `frontend/src/App.js`)
- Application routes → Login dialog: renders (evidence: `frontend/src/App.js`)
- Login dialog → Authentication state: uses (evidence: `frontend/src/components/LoginModal.jsx`)
- Authentication state → API client: authenticates through (evidence: `frontend/src/auth/AuthContext.jsx`)
- Year dashboard → API client: loads summaries (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Category transactions → API client: loads entries (evidence: `frontend/src/pages/TransactionsPage.jsx`)
- Transaction details → API client: reads and updates (evidence: `frontend/src/pages/TransactionDetailsPage.jsx`)
- Year dashboard → Transaction editor: opens (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Transaction details → Transaction editor: edits through (evidence: `frontend/src/pages/TransactionDetailsPage.jsx`)
- Year dashboard → Finance formatting: formats totals (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Category transactions → Finance formatting: formats totals (evidence: `frontend/src/pages/TransactionsPage.jsx`)
- Transaction details → Finance formatting: formats details (evidence: `frontend/src/pages/TransactionDetailsPage.jsx`)
- Year dashboard → Page shell: renders within (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Category transactions → Page shell: renders within (evidence: `frontend/src/pages/TransactionsPage.jsx`)
- Transaction details → Page shell: renders within (evidence: `frontend/src/pages/TransactionDetailsPage.jsx`)
- Year dashboard → Loading and empty states: shows status (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Category transactions → Loading and empty states: shows status (evidence: `frontend/src/pages/TransactionsPage.jsx`)
- Transaction details → Loading and empty states: shows status (evidence: `frontend/src/pages/TransactionDetailsPage.jsx`)
- Transaction editor → API client: creates and updates (evidence: `frontend/src/components/AddTransactionModal.jsx`)
- API client → Finance API endpoints: sends HTTP requests (evidence: `frontend/src/api.js`)
- Finance API endpoints → Transaction serialization: serializes records (evidence: `backend/financeApp/views.py`)
- Finance API endpoints → Transaction model: queries and changes (evidence: `backend/financeApp/views.py`)
- Transaction serialization → Transaction model: serializes model (evidence: `backend/financeApp/serializers.py`)
- Transaction model → Django database: persists through
