# rol-py/moneytracker architecture

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

- Interactive diagram: https://gitdiagram.com/rol-py/moneytracker
- Repository: https://github.com/rol-py/moneytracker

## Overview

Money Tracker is a server-rendered Django personal-finance app. A user signs up or logs in, records expenses, and views their balance, dashboard summaries, searchable transactions, and analytics; settings support profile/avatar changes and JSON/CSV backup or restore. The graph preserves these distinct workflows and the shared data layer. Relationships are based on the README and shown source references; unsampled template and route details are not treated as inspected.

Main entry points: [`tracker/forms.py`](https://github.com/rol-py/moneytracker/blob/main/tracker/forms.py) (Forms and validation), [`tracker/services.py`](https://github.com/rol-py/moneytracker/blob/main/tracker/services.py) (Finance services), [`tracker/models.py`](https://github.com/rol-py/moneytracker/blob/main/tracker/models.py) (Profiles and transactions), [`tracker/views.py`](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py) (Settings and theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and access"]
  node_routes["App routes<br/>[urls.py]"]
  node_auth["Account workflows<br/>[views.py]"]
  node_forms["Forms and validation<br/>[forms.py]"]
end

subgraph group_finance["Finance experience"]
  node_dashboard["Dashboard<br/>[views.py]"]
  node_ledger["Transaction ledger<br/>[views.py]"]
  node_analytics["Analytics<br/>[views.py]"]
end

subgraph group_profile["Profile and backups"]
  node_settings["Settings and theme<br/>[views.py]"]
  node_avatar["Avatar cropping<br/>[imaging.py]"]
  node_backup["Data backups<br/>[services.py]"]
end

subgraph group_core["Application core"]
  node_context["Shared template context"]
  node_services["Finance services<br/>[services.py]"]
  node_records[("Profiles and transactions<br/>[models.py]")]
  node_database[("Configured database")]
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_routes
node_routes -->|"dispatches"| node_auth
node_auth -->|"validates with"| node_forms
node_ledger -->|"validates with"| node_forms
node_settings -->|"validates with"| node_forms
node_dashboard -->|"requests stats"| node_services
node_ledger -->|"requests totals"| node_services
node_analytics -->|"requests reports"| node_services
node_backup -->|"uses"| node_services
node_settings -->|"imports and exports"| node_backup
node_settings -->|"saves cropped avatar"| node_avatar
node_forms -->|"validates image"| node_avatar
node_auth -->|"sets theme cookie"| node_context
node_dashboard -.->|"renders with"| node_context
node_services -->|"queries"| node_records
node_context -->|"reads transaction"| node_records
node_forms -->|"saves profile"| node_records
node_records -.->|"persists"| node_database
node_browser -.->|"sends requests"| node_routes

click node_routes "https://github.com/rol-py/moneytracker/blob/main/tracker/urls.py"
click node_auth "https://github.com/rol-py/moneytracker/blob/main/tracker/views.py"
click node_forms "https://github.com/rol-py/moneytracker/blob/main/tracker/forms.py"
click node_dashboard "https://github.com/rol-py/moneytracker/blob/main/tracker/views.py"
click node_ledger "https://github.com/rol-py/moneytracker/blob/main/tracker/views.py"
click node_analytics "https://github.com/rol-py/moneytracker/blob/main/tracker/views.py"
click node_settings "https://github.com/rol-py/moneytracker/blob/main/tracker/views.py"
click node_avatar "https://github.com/rol-py/moneytracker/blob/main/tracker/imaging.py"
click node_backup "https://github.com/rol-py/moneytracker/blob/main/tracker/services.py"
click node_context "https://github.com/rol-py/moneytracker/blob/main/tracker/context_processors.py"
click node_services "https://github.com/rol-py/moneytracker/blob/main/tracker/services.py"
click node_records "https://github.com/rol-py/moneytracker/blob/main/tracker/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_routes,node_auth,node_forms,node_user,node_browser toneBlue
class node_dashboard,node_ledger,node_analytics toneAmber
class node_settings,node_avatar,node_backup toneMint
class node_context,node_services,node_records,node_database toneRose
```

## Components

### Accounts and access

- [App routes](https://github.com/rol-py/moneytracker/blob/main/tracker/urls.py): `tracker/urls.py`
- [Account workflows](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py): `tracker/views.py`
- [Forms and validation](https://github.com/rol-py/moneytracker/blob/main/tracker/forms.py): `tracker/forms.py`

### Finance experience

- [Dashboard](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py): `tracker/views.py`
- [Transaction ledger](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py): `tracker/views.py`
- [Analytics](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py): `tracker/views.py`

### Profile and backups

- [Settings and theme](https://github.com/rol-py/moneytracker/blob/main/tracker/views.py): `tracker/views.py`
- [Avatar cropping](https://github.com/rol-py/moneytracker/blob/main/tracker/imaging.py): `tracker/imaging.py`
- [Data backups](https://github.com/rol-py/moneytracker/blob/main/tracker/services.py): `tracker/services.py`

### Application core

- [Shared template context](https://github.com/rol-py/moneytracker/blob/main/tracker/context_processors.py): `tracker/context_processors.py`
- [Finance services](https://github.com/rol-py/moneytracker/blob/main/tracker/services.py): `tracker/services.py`
- [Profiles and transactions](https://github.com/rol-py/moneytracker/blob/main/tracker/models.py): `tracker/models.py`
- **Configured database**

### Other components

- **User**
- **Browser**

## Connections

- User → App routes: uses (evidence: `tracker/urls.py`)
- App routes → Account workflows: dispatches (evidence: `tracker/urls.py`)
- Account workflows → Forms and validation: validates with (evidence: `tracker/views.py`)
- Transaction ledger → Forms and validation: validates with (evidence: `tracker/views.py`)
- Settings and theme → Forms and validation: validates with (evidence: `tracker/views.py`)
- Dashboard → Finance services: requests stats (evidence: `tracker/views.py`)
- Transaction ledger → Finance services: requests totals (evidence: `tracker/views.py`)
- Analytics → Finance services: requests reports (evidence: `tracker/views.py`)
- Data backups → Finance services: uses (evidence: `tracker/views.py`)
- Settings and theme → Data backups: imports and exports (evidence: `README.md`)
- Settings and theme → Avatar cropping: saves cropped avatar
- Forms and validation → Avatar cropping: validates image (evidence: `tracker/forms.py`)
- Account workflows → Shared template context: sets theme cookie (evidence: `tracker/views.py`)
- Dashboard → Shared template context: renders with (evidence: `tracker/views.py`)
- Finance services → Profiles and transactions: queries (evidence: `tracker/services.py`)
- Shared template context → Profiles and transactions: reads transaction (evidence: `tracker/context_processors.py`)
- Forms and validation → Profiles and transactions: saves profile (evidence: `tracker/forms.py`)
- Profiles and transactions → Configured database: persists
- Browser → App routes: sends requests
