# negar-shamaie/persian-simple-finance-manager architecture

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

- Interactive diagram: https://gitdiagram.com/negar-shamaie/persian-simple-finance-manager
- Repository: https://github.com/negar-shamaie/persian-simple-finance-manager

## Overview

A small command-line expense tracker reads commands from standard input, updates in-memory category and subcategory totals, supports removing the latest matching expense, and prints sorted reports. The single source file contains the entire runtime; no README or other product capabilities are documented.

Main entry points: [`A1.810003006.cpp`](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp) (Command loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Expense tracker"]
  node_command_loop["Command loop<br/>[A1.810003006.cpp]"]
  node_expense_state["Expense state<br/>[A1.810003006.cpp]"]
  node_category_setup["Category setup<br/>[A1.810003006.cpp]"]
  node_expense_updates["Expense updates<br/>[A1.810003006.cpp]"]
  node_reporting["Report output<br/>[A1.810003006.cpp]"]
end

node_user(("User"))

node_user -->|"enters commands"| node_command_loop
node_command_loop -->|"dispatches setup"| node_category_setup
node_command_loop -->|"dispatches updates"| node_expense_updates
node_command_loop -->|"dispatches reports"| node_reporting
node_category_setup -->|"initializes totals"| node_expense_state
node_expense_updates -->|"updates totals"| node_expense_state
node_reporting -->|"reads totals"| node_expense_state
node_reporting -->|"prints report"| node_user

click node_command_loop "https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp"
click node_expense_state "https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp"
click node_category_setup "https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp"
click node_expense_updates "https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp"
click node_reporting "https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp"

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_command_loop,node_expense_state,node_category_setup,node_expense_updates,node_reporting,node_user toneBlue
```

## Components

### Expense tracker

- [Command loop](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp): `A1.810003006.cpp`
- [Expense state](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp): `A1.810003006.cpp`
- [Category setup](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp): `A1.810003006.cpp`
- [Expense updates](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp): `A1.810003006.cpp`
- [Report output](https://github.com/negar-shamaie/persian-simple-finance-manager/blob/main/A1.810003006.cpp): `A1.810003006.cpp`

### Other components

- **User**

## Connections

- User → Command loop: enters commands (evidence: `A1.810003006.cpp`)
- Command loop → Category setup: dispatches setup (evidence: `A1.810003006.cpp`)
- Command loop → Expense updates: dispatches updates (evidence: `A1.810003006.cpp`)
- Command loop → Report output: dispatches reports (evidence: `A1.810003006.cpp`)
- Category setup → Expense state: initializes totals (evidence: `A1.810003006.cpp`)
- Expense updates → Expense state: updates totals (evidence: `A1.810003006.cpp`)
- Report output → Expense state: reads totals (evidence: `A1.810003006.cpp`)
- Report output → User: prints report (evidence: `A1.810003006.cpp`)
