# atul-adhikari/expense-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/atul-adhikari/expense-tracker
- Repository: https://github.com/atul-adhikari/expense-tracker

## Overview

This is a Django personal-finance application, with accounts, transactions, budgets, analytics, and a dashboard as its apparent product areas. A visible user workflow is viewing the dashboard, where the request handler reads accounts and transactions and calculates balances when visibility is enabled; users can also manage budgets and recurring transaction schedules. Recurring generation is a distinct maintenance workflow that creates due transactions. The excerpts establish several calls and reads, but routes, analytics behavior, and most account and transaction views were not sampled, so those relationships are left unspecified.

Main entry points: [`budgets/views.py`](https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/views.py) (Budget management), [`transactions/models.py`](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/models.py) (Transactions & transfers), [`core/views.py`](https://github.com/atul-adhikari/expense-tracker/blob/main/core/views.py) (Dashboard & visibility), [`transactions/services.py`](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/services.py) (Recurring generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_overview["Dashboard &amp; security"]
  node_dashboard["Dashboard &amp; visibility<br/>[views.py]"]
  node_financial_security["Visibility checks<br/>[security.py]"]
end

subgraph group_finance["Finance records"]
  node_accounts[("Accounts<br/>[models.py]")]
  node_transactions[("Transactions &amp; transfers<br/>[models.py]")]
  node_transaction_views["Transaction workflows<br/>[views.py]"]
  node_recurring["Recurring generation<br/>[services.py]"]
  node_recurring_command["Generation command"]
end

subgraph group_planning["Budgets"]
  node_budgets[("Budget records<br/>[models.py]")]
  node_budget_forms["Budget forms<br/>[forms.py]"]
  node_budget_views["Budget management<br/>[views.py]"]
end

subgraph group_insights["Analytics &amp; dates"]
  node_date_utils["Date formatting<br/>[date_utils.py]"]
  node_date_tags["Date template tag<br/>[date_tags.py]"]
  node_analytics["Analytics views<br/>[views.py]"]
end

node_dashboard -->|"reads accounts"| node_accounts
node_dashboard -->|"reads transactions"| node_transactions
node_budget_views -->|"checks visibility"| node_financial_security
node_budget_views -->|"queries spending"| node_transactions
node_budget_views -->|"reads and writes"| node_budgets
node_budget_views -->|"validates input"| node_budget_forms
node_recurring -->|"creates transactions"| node_transactions
node_recurring_command -->|"invokes generation"| node_recurring
node_date_tags -->|"formats dates"| node_date_utils

click node_dashboard "https://github.com/atul-adhikari/expense-tracker/blob/main/core/views.py"
click node_accounts "https://github.com/atul-adhikari/expense-tracker/blob/main/accounts/models.py"
click node_transactions "https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/models.py"
click node_transaction_views "https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/views.py"
click node_recurring "https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/services.py"
click node_recurring_command "https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/management/commands/generate_recurring.py"
click node_budgets "https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/models.py"
click node_budget_forms "https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/forms.py"
click node_budget_views "https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/views.py"
click node_financial_security "https://github.com/atul-adhikari/expense-tracker/blob/main/core/security.py"
click node_date_utils "https://github.com/atul-adhikari/expense-tracker/blob/main/core/date_utils.py"
click node_date_tags "https://github.com/atul-adhikari/expense-tracker/blob/main/core/templatetags/date_tags.py"
click node_analytics "https://github.com/atul-adhikari/expense-tracker/blob/main/analytics/views.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_dashboard,node_financial_security toneBlue
class node_accounts,node_transactions,node_transaction_views,node_recurring,node_recurring_command toneAmber
class node_budgets,node_budget_forms,node_budget_views toneMint
class node_date_utils,node_date_tags,node_analytics toneRose
```

## Components

### Dashboard & security

- [Dashboard & visibility](https://github.com/atul-adhikari/expense-tracker/blob/main/core/views.py): `core/views.py`
- [Visibility checks](https://github.com/atul-adhikari/expense-tracker/blob/main/core/security.py): `core/security.py`

### Finance records

- [Accounts](https://github.com/atul-adhikari/expense-tracker/blob/main/accounts/models.py): `accounts/models.py`
- [Transactions & transfers](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/models.py): `transactions/models.py`
- [Transaction workflows](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/views.py): `transactions/views.py`
- [Recurring generation](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/services.py): `transactions/services.py`
- [Generation command](https://github.com/atul-adhikari/expense-tracker/blob/main/transactions/management/commands/generate_recurring.py): `transactions/management/commands/generate_recurring.py`

### Budgets

- [Budget records](https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/models.py): `budgets/models.py`
- [Budget forms](https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/forms.py): `budgets/forms.py`
- [Budget management](https://github.com/atul-adhikari/expense-tracker/blob/main/budgets/views.py): `budgets/views.py`

### Analytics & dates

- [Date formatting](https://github.com/atul-adhikari/expense-tracker/blob/main/core/date_utils.py): `core/date_utils.py`
- [Date template tag](https://github.com/atul-adhikari/expense-tracker/blob/main/core/templatetags/date_tags.py): `core/templatetags/date_tags.py`
- [Analytics views](https://github.com/atul-adhikari/expense-tracker/blob/main/analytics/views.py): `analytics/views.py`

## Connections

- Dashboard & visibility → Accounts: reads accounts (evidence: `core/views.py`)
- Dashboard & visibility → Transactions & transfers: reads transactions (evidence: `core/views.py`)
- Budget management → Visibility checks: checks visibility (evidence: `budgets/views.py`)
- Budget management → Transactions & transfers: queries spending (evidence: `budgets/views.py`)
- Budget management → Budget records: reads and writes (evidence: `budgets/views.py`)
- Budget management → Budget forms: validates input (evidence: `budgets/views.py`)
- Recurring generation → Transactions & transfers: creates transactions (evidence: `transactions/services.py`)
- Generation command → Recurring generation: invokes generation (evidence: `transactions/management/commands/generate_recurring.py`)
- Date template tag → Date formatting: formats dates (evidence: `core/templatetags/date_tags.py`)
