# manchikantihaswitha/student-expense-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/manchikantihaswitha/student-expense-tracker
- Repository: https://github.com/manchikantihaswitha/student-expense-tracker

## Overview

This is a small, single-file, menu-driven student expense tracker. The user chooses to add an expense, view recorded expenses, or exit. Adding collects a name, amount, and category, then updates an in-memory list and a running total; viewing prints the list. The README also describes categorization and amount calculation. The source keeps these behaviors in one file, so the graph separates runtime responsibilities without implying separate modules.

Main entry points: [`expense_tracker.py`](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py) (Menu loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_menu["Menu loop<br/>[expense_tracker.py]"]
node_add["Add expense<br/>[expense_tracker.py]"]
node_expenses["Expense list<br/>[expense_tracker.py]"]
node_total["Running total<br/>[expense_tracker.py]"]
node_view["View expenses<br/>[expense_tracker.py]"]

node_user -->|"chooses option"| node_menu
node_menu -->|"dispatches add"| node_add
node_menu -->|"dispatches view"| node_view
node_add -->|"appends record"| node_expenses
node_add -->|"adds amount"| node_total
node_view -->|"reads records"| node_expenses
node_view -->|"prints records"| node_user

click node_menu "https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py"
click node_add "https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py"
click node_expenses "https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py"
click node_total "https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py"
click node_view "https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.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_view toneBlue
class node_menu,node_add,node_expenses,node_total toneTeal
```

## Components

### Other components

- **User**
- [Menu loop](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py): `expense_tracker.py`
- [Add expense](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py): `expense_tracker.py`
- [Expense list](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py): `expense_tracker.py`
- [Running total](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py): `expense_tracker.py`
- [View expenses](https://github.com/manchikantihaswitha/student-expense-tracker/blob/main/expense_tracker.py): `expense_tracker.py`

## Connections

- User → Menu loop: chooses option (evidence: `expense_tracker.py`)
- Menu loop → Add expense: dispatches add (evidence: `expense_tracker.py`)
- Menu loop → View expenses: dispatches view (evidence: `expense_tracker.py`)
- Add expense → Expense list: appends record (evidence: `expense_tracker.py`)
- Add expense → Running total: adds amount (evidence: `expense_tracker.py`)
- View expenses → Expense list: reads records (evidence: `expense_tracker.py`)
- View expenses → User: prints records (evidence: `expense_tracker.py`)
