# nethum-dias/simple-expense-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/nethum-dias/simple-expense-tracker
- Repository: https://github.com/nethum-dias/simple-expense-tracker

## Overview

This is a small, interactive personal expense tracker implemented as two standalone Python scripts with the same menu-driven behavior. Each script accepts income and expense amounts, updates an in-memory balance and transaction list, and displays the balance or transaction history. There is no persistence or separate application layer. The graph reflects the behavior shown in the excerpts; both scripts appear identical, and no relationship between them is indicated.

Main entry points: [`SIMPLE EXPENSE TRACKER.py`](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py) (Tracker CLI (spaced)), [`SIMPLE_EXPENSE_TRACKER.py`](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE_EXPENSE_TRACKER.py) (Tracker CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_spaced_cli["Tracker CLI &#40;spaced&#41;"]
node_underscored_cli["Tracker CLI"]
node_income["Income Entry"]
node_expense["Expense Entry"]
node_state["In-Memory State"]
node_balance_view["Balance View"]
node_transaction_view["Transaction View"]

node_user -->|"enters choices"| node_spaced_cli
node_spaced_cli -->|"dispatches income"| node_income
node_spaced_cli -->|"dispatches expense"| node_expense
node_spaced_cli -->|"dispatches balance"| node_balance_view
node_spaced_cli -->|"dispatches history"| node_transaction_view
node_income -->|"updates balance and list"| node_state
node_expense -->|"updates balance and list"| node_state
node_balance_view -->|"reads balance"| node_state
node_transaction_view -->|"reads transactions"| node_state
node_balance_view -->|"displays balance"| node_user
node_transaction_view -->|"displays history"| node_user
node_user -->|"enters choices"| node_underscored_cli

click node_spaced_cli "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py"
click node_underscored_cli "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE_EXPENSE_TRACKER.py"
click node_income "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py"
click node_expense "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py"
click node_state "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py"
click node_balance_view "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py"
click node_transaction_view "https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.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_user,node_balance_view,node_transaction_view toneBlue
class node_spaced_cli,node_underscored_cli,node_income,node_expense,node_state toneTeal
```

## Components

### Other components

- **User**
- [Tracker CLI (spaced)](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`
- [Tracker CLI](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE_EXPENSE_TRACKER.py): `SIMPLE_EXPENSE_TRACKER.py`
- [Income Entry](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`
- [Expense Entry](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`
- [In-Memory State](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`
- [Balance View](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`
- [Transaction View](https://github.com/nethum-dias/simple-expense-tracker/blob/main/SIMPLE%20EXPENSE%20TRACKER.py): `SIMPLE EXPENSE TRACKER.py`

## Connections

- User → Tracker CLI (spaced): enters choices (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Tracker CLI (spaced) → Income Entry: dispatches income (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Tracker CLI (spaced) → Expense Entry: dispatches expense (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Tracker CLI (spaced) → Balance View: dispatches balance (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Tracker CLI (spaced) → Transaction View: dispatches history (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Income Entry → In-Memory State: updates balance and list (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Expense Entry → In-Memory State: updates balance and list (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Balance View → In-Memory State: reads balance (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Transaction View → In-Memory State: reads transactions (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Balance View → User: displays balance (evidence: `SIMPLE EXPENSE TRACKER.py`)
- Transaction View → User: displays history (evidence: `SIMPLE EXPENSE TRACKER.py`)
- User → Tracker CLI: enters choices (evidence: `SIMPLE_EXPENSE_TRACKER.py`)
