# freddy-hash/pocket architecture

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

- Interactive diagram: https://gitdiagram.com/freddy-hash/pocket
- Repository: https://github.com/freddy-hash/pocket

## Overview

Pocket is described as a personal-finance web app for recording expenses, automatically categorizing them with machine learning, and visualizing spending. The sampled runtime does not yet implement that workflow: app.py only displays a title and setup message, and the src packages contain only empty initializers. The feature nodes below reflect README-documented capabilities, not inspected implementations; dashed links mark unverified wiring.

Main entry points: [`src/ui`](https://github.com/freddy-hash/pocket/tree/main/src/ui) (Expense records), [`app.py`](https://github.com/freddy-hash/pocket/blob/main/app.py) (Streamlit page), [`src/ml`](https://github.com/freddy-hash/pocket/tree/main/src/ml) (ML categorization), [`src/analytics`](https://github.com/freddy-hash/pocket/tree/main/src/analytics) (Spending charts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Current runtime"]
  node_app["Streamlit page<br/>[app.py]"]
end

subgraph group_finance["Finance workflow"]
  node_expense["Expense records"]
  node_categorization["ML categorization"]
  node_analytics["Spending charts"]
end

node_user(("User"))

node_user -->|"views"| node_app
node_user -.->|"records expenses"| node_expense
node_expense -.->|"suggests category"| node_categorization
node_expense -.->|"visualizes spending"| node_analytics

click node_app "https://github.com/freddy-hash/pocket/blob/main/app.py"
click node_expense "https://github.com/freddy-hash/pocket/tree/main/src/ui"
click node_categorization "https://github.com/freddy-hash/pocket/tree/main/src/ml"
click node_analytics "https://github.com/freddy-hash/pocket/tree/main/src/analytics"

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_app,node_user toneBlue
class node_expense,node_categorization,node_analytics toneAmber
```

## Components

### Current runtime

- [Streamlit page](https://github.com/freddy-hash/pocket/blob/main/app.py): `app.py`

### Finance workflow

- [Expense records](https://github.com/freddy-hash/pocket/tree/main/src/ui): `src/ui`
- [ML categorization](https://github.com/freddy-hash/pocket/tree/main/src/ml): `src/ml`
- [Spending charts](https://github.com/freddy-hash/pocket/tree/main/src/analytics): `src/analytics`

### Other components

- **User**

## Connections

- User → Streamlit page: views (evidence: `app.py`)
- User → Expense records: records expenses
- Expense records → ML categorization: suggests category
- Expense records → Spending charts: visualizes spending
