# adi-pandit/expensetracker architecture

> Architecture diagram of the GitHub repository adi-pandit/expensetracker, 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/adi-pandit/expensetracker
- Repository: https://github.com/adi-pandit/expensetracker

## Overview

Ledgerly is a full-stack expense tracker. Users authenticate, record and organize expenses across accounts and currencies, then review dashboard analytics and notifications; they can also manage recurring expenses, budgets and exports. The React app routes these workflows through API clients to Django endpoints, with PostgreSQL-backed domain models. The graph preserves README capabilities and core modules; for unsampled routes and services, links are limited to explicit README statements or marked unverified where appropriate.

Main entry points: [`frontend/src/api/client.js`](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/api/client.js) (HTTP client), [`backend/ExpenseTracker/urls.py`](https://github.com/adi-pandit/expensetracker/blob/master/backend/ExpenseTracker/urls.py) (Django API), [`backend/expense/services.py`](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/services.py) (Expense services), [`backend/expense/models.py`](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/models.py) (Expense domain records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route and shell<br/>[App.jsx]"]
  node_authui["Session context<br/>[AuthContext.jsx]"]
  node_authapi["Auth API client<br/>[auth.js]"]
  node_http["HTTP client<br/>[client.js]"]
  node_dashboardui["Dashboard<br/>[Dashboard.jsx]"]
  node_expenseui["Expense management<br/>[Expenses.jsx]"]
  node_accountui["Account management<br/>[Accounts.jsx]"]
  node_recurringui["Recurring expenses<br/>[Recurring.jsx]"]
  node_notifyui["Notifications<br/>[Notifications.jsx]"]
  node_settingsui["Profile settings<br/>[Settings.jsx]"]
  node_expensemodal["Expense editor<br/>[ExpenseModal.jsx]"]
  node_recurringmodal["Recurring editor<br/>[RecurringModal.jsx]"]
end

subgraph group_api["API and identity"]
  node_authviews["Authentication endpoints<br/>[views.py]"]
  node_authserializers["Authentication serializers<br/>[serializers.py]"]
  node_expenseviews["Expense API<br/>[views.py]"]
  node_overviewviews["Dashboard API<br/>[views.py]"]
  node_backend["Django API<br/>[urls.py]"]
end

subgraph group_expense["Expense domain"]
  node_expensemodels[("Expense domain records<br/>[models.py]")]
  node_expense_services["Expense services<br/>[services.py]"]
  node_currency["Currency conversion<br/>[currency.py]"]
end

subgraph group_insights["Analytics and alerts"]
  node_overviewservices["Analytics services<br/>[services.py]"]
  node_notificationjob["Notification generator"]
end

node_user(("Expense tracker user"))
node_database[("PostgreSQL")]

node_user -->|"uses"| node_app
node_app -->|"checks session"| node_authui
node_authui -->|"loads profile"| node_authapi
node_authapi -->|"sends requests"| node_http
node_dashboardui -.->|"requests data"| node_http
node_expenseui -.->|"requests expenses"| node_http
node_accountui -.->|"requests accounts"| node_http
node_recurringui -.->|"requests schedules"| node_http
node_notifyui -.->|"requests alerts"| node_http
node_settingsui -.->|"updates profile"| node_authapi
node_expenseui -->|"opens editor"| node_expensemodal
node_dashboardui -->|"opens editor"| node_expensemodal
node_recurringui -->|"opens editor"| node_recurringmodal
node_http -->|"calls API"| node_backend
node_backend -->|"routes auth"| node_authviews
node_backend -.->|"routes expenses"| node_expenseviews
node_backend -.->|"routes dashboard"| node_overviewviews
node_authviews -->|"validates data"| node_authserializers
node_expenseviews -.->|"uses services"| node_expense_services
node_expenseviews -.->|"reads and writes"| node_expensemodels
node_expense_services -->|"reads and writes"| node_expensemodels
node_expense_services -->|"converts amounts"| node_currency
node_overviewviews -->|"builds insights"| node_overviewservices
node_overviewservices -->|"queries expenses"| node_expensemodels
node_notificationjob -->|"generates alerts"| node_expense_services
node_expensemodels -.->|"persists records"| node_database

click node_app "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/App.jsx"
click node_authui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/context/AuthContext.jsx"
click node_authapi "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/api/auth.js"
click node_http "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/api/client.js"
click node_dashboardui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Dashboard.jsx"
click node_expenseui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Expenses.jsx"
click node_accountui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Accounts.jsx"
click node_recurringui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Recurring.jsx"
click node_notifyui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Notifications.jsx"
click node_settingsui "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Settings.jsx"
click node_expensemodal "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/components/modals/ExpenseModal.jsx"
click node_recurringmodal "https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/components/modals/RecurringModal.jsx"
click node_authviews "https://github.com/adi-pandit/expensetracker/blob/master/backend/authentication/views.py"
click node_authserializers "https://github.com/adi-pandit/expensetracker/blob/master/backend/authentication/serializers.py"
click node_expenseviews "https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/views.py"
click node_overviewviews "https://github.com/adi-pandit/expensetracker/blob/master/backend/overview/views.py"
click node_expensemodels "https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/models.py"
click node_expense_services "https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/services.py"
click node_currency "https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/currency.py"
click node_overviewservices "https://github.com/adi-pandit/expensetracker/blob/master/backend/overview/services.py"
click node_notificationjob "https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/management/commands/generate_notifications.py"
click node_backend "https://github.com/adi-pandit/expensetracker/blob/master/backend/ExpenseTracker/urls.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_authui,node_authapi,node_http,node_dashboardui,node_expenseui,node_accountui,node_recurringui,node_notifyui,node_settingsui,node_expensemodal,node_recurringmodal,node_user toneBlue
class node_authviews,node_authserializers,node_expenseviews,node_overviewviews,node_backend,node_database toneAmber
class node_expensemodels,node_expense_services,node_currency toneMint
class node_overviewservices,node_notificationjob toneRose
```

## Components

### Web application

- [Route and shell](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session context](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Auth API client](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/api/auth.js): `frontend/src/api/auth.js`
- [HTTP client](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Dashboard](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Expense management](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Expenses.jsx): `frontend/src/pages/Expenses.jsx`
- [Account management](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Accounts.jsx): `frontend/src/pages/Accounts.jsx`
- [Recurring expenses](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Recurring.jsx): `frontend/src/pages/Recurring.jsx`
- [Notifications](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Notifications.jsx): `frontend/src/pages/Notifications.jsx`
- [Profile settings](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/pages/Settings.jsx): `frontend/src/pages/Settings.jsx`
- [Expense editor](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/components/modals/ExpenseModal.jsx): `frontend/src/components/modals/ExpenseModal.jsx`
- [Recurring editor](https://github.com/adi-pandit/expensetracker/blob/master/frontend/src/components/modals/RecurringModal.jsx): `frontend/src/components/modals/RecurringModal.jsx`

### API and identity

- [Authentication endpoints](https://github.com/adi-pandit/expensetracker/blob/master/backend/authentication/views.py): `backend/authentication/views.py`
- [Authentication serializers](https://github.com/adi-pandit/expensetracker/blob/master/backend/authentication/serializers.py): `backend/authentication/serializers.py`
- [Expense API](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/views.py): `backend/expense/views.py`
- [Dashboard API](https://github.com/adi-pandit/expensetracker/blob/master/backend/overview/views.py): `backend/overview/views.py`
- [Django API](https://github.com/adi-pandit/expensetracker/blob/master/backend/ExpenseTracker/urls.py): `backend/ExpenseTracker/urls.py`

### Expense domain

- [Expense domain records](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/models.py): `backend/expense/models.py`
- [Expense services](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/services.py): `backend/expense/services.py`
- [Currency conversion](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/currency.py): `backend/expense/currency.py`

### Analytics and alerts

- [Analytics services](https://github.com/adi-pandit/expensetracker/blob/master/backend/overview/services.py): `backend/overview/services.py`
- [Notification generator](https://github.com/adi-pandit/expensetracker/blob/master/backend/expense/management/commands/generate_notifications.py): `backend/expense/management/commands/generate_notifications.py`

### Other components

- **Expense tracker user**
- **PostgreSQL**

## Connections

- Expense tracker user → Route and shell: uses (evidence: `frontend/src/App.jsx`)
- Route and shell → Session context: checks session (evidence: `frontend/src/App.jsx`)
- Session context → Auth API client: loads profile (evidence: `frontend/src/context/AuthContext.jsx`)
- Auth API client → HTTP client: sends requests (evidence: `frontend/src/api/auth.js`)
- Dashboard → HTTP client: requests data
- Expense management → HTTP client: requests expenses
- Account management → HTTP client: requests accounts
- Recurring expenses → HTTP client: requests schedules
- Notifications → HTTP client: requests alerts
- Profile settings → Auth API client: updates profile (evidence: `frontend/src/pages/Settings.jsx`)
- Expense management → Expense editor: opens editor (evidence: `frontend/src/pages/Expenses.jsx`)
- Dashboard → Expense editor: opens editor (evidence: `frontend/src/pages/Dashboard.jsx`)
- Recurring expenses → Recurring editor: opens editor (evidence: `frontend/src/pages/Recurring.jsx`)
- HTTP client → Django API: calls API (evidence: `README.md`)
- Django API → Authentication endpoints: routes auth (evidence: `backend/ExpenseTracker/urls.py`)
- Django API → Expense API: routes expenses
- Django API → Dashboard API: routes dashboard
- Authentication endpoints → Authentication serializers: validates data (evidence: `backend/authentication/views.py`)
- Expense API → Expense services: uses services
- Expense API → Expense domain records: reads and writes
- Expense services → Expense domain records: reads and writes (evidence: `backend/expense/services.py`)
- Expense services → Currency conversion: converts amounts (evidence: `backend/expense/services.py`)
- Dashboard API → Analytics services: builds insights (evidence: `backend/overview/views.py`)
- Analytics services → Expense domain records: queries expenses (evidence: `backend/overview/services.py`)
- Notification generator → Expense services: generates alerts (evidence: `backend/expense/management/commands/generate_notifications.py`)
- Expense domain records → PostgreSQL: persists records
