# nathanlee5163/spending-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/nathanlee5163/spending-dashboard
- Repository: https://github.com/nathanlee5163/spending-dashboard

## Overview

Spending Dashboard accepts bank or budgeting-app CSVs through a web interface or command line, normalizes and organizes transactions, and presents category and monthly spending summaries or an Excel workbook. The graph preserves the documented multi-file, combined-view, expense-filtering, and unused-category capabilities. The excerpts show the web and CLI calls into the core module, but not all internal analysis calls, so those internal relationships are marked unverified rather than asserted.

Main entry points: [`app.py`](https://github.com/nathanlee5163/spending-dashboard/blob/main/app.py) (Flask web app), [`organize_transactions.py`](https://github.com/nathanlee5163/spending-dashboard/blob/main/organize_transactions.py) (CLI organizer), [`finance_organizer.py`](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py) (Transaction analysis), [`templates/index.html`](https://github.com/nathanlee5163/spending-dashboard/blob/main/templates/index.html) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web_ui["Dashboard UI<br/>[index.html]"]
  node_web_app["Flask web app<br/>[app.py]"]
  node_cli["CLI organizer"]
end

subgraph group_processing["Transaction processing"]
  node_csv_loader["CSV loading"]
  node_normalization["Field normalization"]
  node_expense_filter["Expense filtering"]
  node_multi_file["Multi-file merging"]
end

subgraph group_insights["Reports and exports"]
  node_analysis["Transaction analysis"]
  node_category_summary["Category totals"]
  node_monthly_summary["Monthly summaries"]
  node_unused_categories["Unused categories"]
  node_text_report["Text report"]
  node_excel_export["Excel export"]
end

node_browser(("Browser user"))
node_cli_user(("CLI user"))

node_browser -->|"uses"| node_web_ui
node_web_ui -->|"uploads CSVs"| node_web_app
node_web_app -->|"loads uploads"| node_csv_loader
node_web_app -->|"sets filter"| node_expense_filter
node_web_app -->|"merges uploads"| node_multi_file
node_web_app -->|"requests analysis"| node_analysis
node_web_app -->|"requests export"| node_excel_export
node_cli_user -->|"runs"| node_cli
node_cli -->|"loads CSV"| node_csv_loader
node_cli -->|"builds report data"| node_analysis
node_cli -->|"builds report"| node_text_report
node_cli -->|"exports workbook"| node_excel_export
node_csv_loader -.->|"normalizes fields"| node_normalization
node_analysis -.->|"produces totals"| node_category_summary
node_analysis -.->|"summarizes months"| node_monthly_summary
node_analysis -.->|"identifies unused"| node_unused_categories

click node_web_ui "https://github.com/nathanlee5163/spending-dashboard/blob/main/templates/index.html"
click node_web_app "https://github.com/nathanlee5163/spending-dashboard/blob/main/app.py"
click node_cli "https://github.com/nathanlee5163/spending-dashboard/blob/main/organize_transactions.py"
click node_csv_loader "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_normalization "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_expense_filter "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_multi_file "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_analysis "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_category_summary "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_monthly_summary "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_unused_categories "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_text_report "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py"
click node_excel_export "https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.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_web_ui,node_web_app,node_cli,node_browser,node_cli_user toneBlue
class node_csv_loader,node_normalization,node_expense_filter,node_multi_file toneAmber
class node_analysis,node_category_summary,node_monthly_summary,node_unused_categories,node_text_report,node_excel_export toneMint
```

## Components

### User interfaces

- [Dashboard UI](https://github.com/nathanlee5163/spending-dashboard/blob/main/templates/index.html): `templates/index.html`
- [Flask web app](https://github.com/nathanlee5163/spending-dashboard/blob/main/app.py): `app.py`
- [CLI organizer](https://github.com/nathanlee5163/spending-dashboard/blob/main/organize_transactions.py): `organize_transactions.py`

### Transaction processing

- [CSV loading](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Field normalization](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Expense filtering](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Multi-file merging](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`

### Reports and exports

- [Transaction analysis](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Category totals](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Monthly summaries](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Unused categories](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Text report](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`
- [Excel export](https://github.com/nathanlee5163/spending-dashboard/blob/main/finance_organizer.py): `finance_organizer.py`

### Other components

- **Browser user**
- **CLI user**

## Connections

- Browser user → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Flask web app: uploads CSVs (evidence: `README.md`)
- Flask web app → CSV loading: loads uploads (evidence: `app.py`)
- Flask web app → Expense filtering: sets filter (evidence: `app.py`)
- Flask web app → Multi-file merging: merges uploads (evidence: `app.py`)
- Flask web app → Transaction analysis: requests analysis (evidence: `app.py`)
- Flask web app → Excel export: requests export (evidence: `app.py`)
- CLI user → CLI organizer: runs (evidence: `README.md`)
- CLI organizer → CSV loading: loads CSV (evidence: `organize_transactions.py`)
- CLI organizer → Transaction analysis: builds report data (evidence: `organize_transactions.py`)
- CLI organizer → Text report: builds report (evidence: `organize_transactions.py`)
- CLI organizer → Excel export: exports workbook (evidence: `organize_transactions.py`)
- CSV loading → Field normalization: normalizes fields (evidence: `finance_organizer.py`)
- Transaction analysis → Category totals: produces totals (evidence: `finance_organizer.py`)
- Transaction analysis → Monthly summaries: summarizes months (evidence: `finance_organizer.py`)
- Transaction analysis → Unused categories: identifies unused (evidence: `finance_organizer.py`)
