# krushitha30/budgetbuddy architecture

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

- Interactive diagram: https://gitdiagram.com/krushitha30/budgetbuddy
- Repository: https://github.com/krushitha30/budgetbuddy

## Overview

BudgetBuddy is a personal-finance application: users authenticate, record income and expenses, manage budgets and savings goals, and inspect dashboards, reports, and notifications. The frontend routes users to feature pages, whose services communicate with the Django API; backend views expose domain operations and analytics over persisted records. The README documents authenticated expense workflows and JWT authentication. Several domain views and route definitions were not excerpted, so their links to models and endpoints are shown as unverified rather than asserted as inspected calls.

Main entry points: [`frontend/src/App.jsx`](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/App.jsx) (App routes), [`backend/config/urls.py`](https://github.com/krushitha30/budgetbuddy/blob/main/backend/config/urls.py) (Django API routes), [`frontend/src/services/api.js`](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/services/api.js) (HTTP client), [`backend/notifications/signals.py`](https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/signals.py) (Notification signals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routes<br/>[App.jsx]"]
  node_http["HTTP client<br/>[api.js]"]
  node_router["Django API routes<br/>[urls.py]"]
end

subgraph group_identity["Identity"]
  node_authpage["Login and registration<br/>[Login.jsx]"]
  node_authsvc["Auth service<br/>[authService.js]"]
  node_users["User APIs<br/>[views.py]"]
end

subgraph group_finance["Finance records"]
  node_expenseui["Expenses<br/>[Expenses.jsx]"]
  node_incomeui["Income<br/>[Income.jsx]"]
  node_budgetui["Budgets<br/>[Budgets.jsx]"]
  node_savingsui["Savings goals<br/>[Savings.jsx]"]
  node_expenses[("Expense APIs and records<br/>[models.py]")]
  node_income[("Income records<br/>[models.py]")]
  node_budgets[("Budget APIs and records<br/>[models.py]")]
  node_savings[("Savings goals<br/>[models.py]")]
end

subgraph group_insights["Insights and alerts"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_analyticsui["Analytics charts"]
  node_reportsui["Reports<br/>[Reports.jsx]"]
  node_notifyui["Notification bell"]
  node_analytics["Analytics APIs<br/>[views.py]"]
  node_reports["Report APIs<br/>[views.py]"]
  node_notifications[("Notification records<br/>[models.py]")]
  node_signals["Notification signals<br/>[signals.py]"]
  node_email["Email delivery<br/>[email_service.py]"]
end

node_user(("Budget user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_expenseui
node_app -->|"routes to"| node_incomeui
node_app -->|"routes to"| node_budgetui
node_app -->|"routes to"| node_savingsui
node_app -->|"routes to"| node_reportsui
node_authpage -.->|"uses"| node_authsvc
node_authsvc -->|"calls"| node_http
node_authsvc -->|"requests"| node_users
node_user -->|"authenticates"| node_users
node_dashboard -->|"renders"| node_analyticsui
node_dashboard -.->|"requests"| node_http
node_expenseui -.->|"requests"| node_http
node_budgetui -->|"requests"| node_http
node_incomeui -.->|"requests"| node_http
node_savingsui -.->|"requests"| node_http
node_reportsui -.->|"requests"| node_http
node_notifyui -.->|"requests"| node_http
node_http -.->|"calls"| node_router
node_router -->|"routes requests"| node_expenses
node_router -->|"routes requests"| node_users
node_router -.->|"routes requests"| node_budgets
node_router -.->|"routes requests"| node_analytics
node_router -.->|"routes requests"| node_reports
node_router -.->|"routes requests"| node_income
node_router -.->|"routes requests"| node_savings
node_analytics -->|"reads"| node_expenses
node_analytics -->|"reads"| node_income
node_analytics -->|"reads"| node_budgets
node_analytics -->|"reads"| node_savings
node_analytics -->|"reads"| node_notifications
node_reports -->|"reads"| node_expenses
node_reports -->|"reads"| node_income
node_reports -->|"reads"| node_budgets
node_reports -->|"reads"| node_savings
node_reports -->|"serializes"| node_notifications
node_signals -->|"observes"| node_expenses
node_signals -->|"observes"| node_income
node_signals -->|"observes"| node_budgets
node_signals -->|"observes"| node_savings
node_signals -->|"creates"| node_notifications
node_signals -->|"calls"| node_email

click node_app "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/App.jsx"
click node_authpage "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Login.jsx"
click node_authsvc "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/services/authService.js"
click node_http "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/services/api.js"
click node_dashboard "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Dashboard.jsx"
click node_analyticsui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/components/AnalyticsCharts.jsx"
click node_expenseui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Expenses.jsx"
click node_incomeui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Income.jsx"
click node_budgetui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Budgets.jsx"
click node_savingsui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Savings.jsx"
click node_reportsui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Reports.jsx"
click node_notifyui "https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/components/NotificationBell.jsx"
click node_router "https://github.com/krushitha30/budgetbuddy/blob/main/backend/config/urls.py"
click node_users "https://github.com/krushitha30/budgetbuddy/blob/main/backend/users/views.py"
click node_expenses "https://github.com/krushitha30/budgetbuddy/blob/main/backend/expenses/models.py"
click node_income "https://github.com/krushitha30/budgetbuddy/blob/main/backend/income/models.py"
click node_budgets "https://github.com/krushitha30/budgetbuddy/blob/main/backend/budgets/models.py"
click node_savings "https://github.com/krushitha30/budgetbuddy/blob/main/backend/savings/models.py"
click node_analytics "https://github.com/krushitha30/budgetbuddy/blob/main/backend/analytics/views.py"
click node_reports "https://github.com/krushitha30/budgetbuddy/blob/main/backend/reports/views.py"
click node_notifications "https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/models.py"
click node_signals "https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/signals.py"
click node_email "https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/email_service.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_http,node_router,node_user toneBlue
class node_authpage,node_authsvc,node_users toneAmber
class node_expenseui,node_incomeui,node_budgetui,node_savingsui,node_expenses,node_income,node_budgets,node_savings toneMint
class node_dashboard,node_analyticsui,node_reportsui,node_notifyui,node_analytics,node_reports,node_notifications,node_signals,node_email toneRose
```

## Components

### Web client

- [App routes](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [HTTP client](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Django API routes](https://github.com/krushitha30/budgetbuddy/blob/main/backend/config/urls.py): `backend/config/urls.py`

### Identity

- [Login and registration](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Auth service](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [User APIs](https://github.com/krushitha30/budgetbuddy/blob/main/backend/users/views.py): `backend/users/views.py`

### Finance records

- [Expenses](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Expenses.jsx): `frontend/src/pages/Expenses.jsx`
- [Income](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Income.jsx): `frontend/src/pages/Income.jsx`
- [Budgets](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Budgets.jsx): `frontend/src/pages/Budgets.jsx`
- [Savings goals](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Savings.jsx): `frontend/src/pages/Savings.jsx`
- [Expense APIs and records](https://github.com/krushitha30/budgetbuddy/blob/main/backend/expenses/models.py): `backend/expenses/models.py`
- [Income records](https://github.com/krushitha30/budgetbuddy/blob/main/backend/income/models.py): `backend/income/models.py`
- [Budget APIs and records](https://github.com/krushitha30/budgetbuddy/blob/main/backend/budgets/models.py): `backend/budgets/models.py`
- [Savings goals](https://github.com/krushitha30/budgetbuddy/blob/main/backend/savings/models.py): `backend/savings/models.py`

### Insights and alerts

- [Dashboard](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Analytics charts](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/components/AnalyticsCharts.jsx): `frontend/src/components/AnalyticsCharts.jsx`
- [Reports](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/pages/Reports.jsx): `frontend/src/pages/Reports.jsx`
- [Notification bell](https://github.com/krushitha30/budgetbuddy/blob/main/frontend/src/components/NotificationBell.jsx): `frontend/src/components/NotificationBell.jsx`
- [Analytics APIs](https://github.com/krushitha30/budgetbuddy/blob/main/backend/analytics/views.py): `backend/analytics/views.py`
- [Report APIs](https://github.com/krushitha30/budgetbuddy/blob/main/backend/reports/views.py): `backend/reports/views.py`
- [Notification records](https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/models.py): `backend/notifications/models.py`
- [Notification signals](https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/signals.py): `backend/notifications/signals.py`
- [Email delivery](https://github.com/krushitha30/budgetbuddy/blob/main/backend/notifications/email_service.py): `backend/notifications/email_service.py`

### Other components

- **Budget user**

## Connections

- Budget user → App routes: uses (evidence: `README.md`)
- App routes → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Expenses: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Income: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Budgets: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Savings goals: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Reports: routes to (evidence: `frontend/src/App.jsx`)
- Login and registration → Auth service: uses
- Auth service → HTTP client: calls (evidence: `frontend/src/services/authService.js`)
- Auth service → User APIs: requests (evidence: `README.md`)
- Budget user → User APIs: authenticates (evidence: `README.md`)
- Dashboard → Analytics charts: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Dashboard → HTTP client: requests
- Expenses → HTTP client: requests
- Budgets → HTTP client: requests
- Income → HTTP client: requests
- Savings goals → HTTP client: requests
- Reports → HTTP client: requests
- Notification bell → HTTP client: requests
- HTTP client → Django API routes: calls
- Django API routes → Expense APIs and records: routes requests (evidence: `README.md`)
- Django API routes → User APIs: routes requests (evidence: `README.md`)
- Django API routes → Budget APIs and records: routes requests
- Django API routes → Analytics APIs: routes requests
- Django API routes → Report APIs: routes requests
- Django API routes → Income records: routes requests
- Django API routes → Savings goals: routes requests
- Analytics APIs → Expense APIs and records: reads (evidence: `backend/analytics/views.py`)
- Analytics APIs → Income records: reads (evidence: `backend/analytics/views.py`)
- Analytics APIs → Budget APIs and records: reads (evidence: `backend/analytics/views.py`)
- Analytics APIs → Savings goals: reads (evidence: `backend/analytics/views.py`)
- Analytics APIs → Notification records: reads (evidence: `backend/analytics/views.py`)
- Report APIs → Expense APIs and records: reads (evidence: `backend/reports/views.py`)
- Report APIs → Income records: reads (evidence: `backend/reports/views.py`)
- Report APIs → Budget APIs and records: reads (evidence: `backend/reports/views.py`)
- Report APIs → Savings goals: reads (evidence: `backend/reports/views.py`)
- Report APIs → Notification records: serializes (evidence: `backend/reports/views.py`)
- Notification signals → Expense APIs and records: observes (evidence: `backend/notifications/signals.py`)
- Notification signals → Income records: observes (evidence: `backend/notifications/signals.py`)
- Notification signals → Budget APIs and records: observes (evidence: `backend/notifications/signals.py`)
- Notification signals → Savings goals: observes (evidence: `backend/notifications/signals.py`)
- Notification signals → Notification records: creates (evidence: `backend/notifications/signals.py`)
- Notification signals → Email delivery: calls (evidence: `backend/notifications/signals.py`)
