# onetrueasian/penny-worth architecture

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

- Interactive diagram: https://gitdiagram.com/onetrueasian/penny-worth
- Repository: https://github.com/onetrueasian/penny-worth

## Overview

Vault Spend is a local desktop budgeting and transaction-ledger app. The main workflow is opening a profile, viewing and managing financial records, and saving changes to local data; imports, budgeting, forecasting, reports, and investment tracking extend that workflow. The UI communicates with a Tauri backend, while the Rust core provides import, categorization, protection, and storage modules. The README documents additional capabilities whose internal wiring is not shown in the sampled source, so those connections are kept high-level.

Main entry points: [`src/App.tsx`](https://github.com/onetrueasian/penny-worth/blob/main/src/App.tsx) (App shell), [`core/src/importer.rs`](https://github.com/onetrueasian/penny-worth/blob/main/core/src/importer.rs) (Import engine), [`src/main.tsx`](https://github.com/onetrueasian/penny-worth/blob/main/src/main.tsx) (App entry), [`src/StartupGate.tsx`](https://github.com/onetrueasian/penny-worth/blob/main/src/StartupGate.tsx) (Startup gate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Desktop experience"]
  node_entry["App entry<br/>[main.tsx]"]
  node_startup["Startup gate<br/>[StartupGate.tsx]"]
  node_app["App shell<br/>[App.tsx]"]
end

subgraph group_records["Financial records"]
  node_accounts["Accounts<br/>[AccountsView.tsx]"]
  node_ledger["Ledger<br/>[App.tsx]"]
  node_imports["Import workflows"]
  node_import_engine["Import engine<br/>[importer.rs]"]
  node_file_loaders["Statement loaders<br/>[csv_loader.rs]"]
  node_categorization["Categorization<br/>[categorizer.rs]"]
  node_rules["Category rules<br/>[rules.rs]"]
end

subgraph group_analysis["Planning and insights"]
  node_budgets["Budgets and goals<br/>[BudgetView.tsx]"]
  node_cashflow["Cash flow<br/>[CashFlowView.tsx]"]
  node_investments["Investments"]
  node_reports["Reports<br/>[ReportsView.tsx]"]
  node_household["Household<br/>[HouseholdView.tsx]"]
end

subgraph group_platform["Local platform"]
  node_bridge["Tauri commands<br/>[commands.rs]"]
  node_store[("Core store<br/>[store.rs]")]
  node_providers["Price integration"]
  node_updater["Update check<br/>[updater.rs]"]
end

subgraph group_security["Profiles and protection"]
  node_profiles["Profile management<br/>[profiles.rs]"]
  node_protection["Protection lifecycle"]
  node_backup["Backups<br/>[backups.rs]"]
end

node_person(("User"))
node_price_service["Price providers"]
node_github["GitHub releases"]

node_person -->|"opens app"| node_entry
node_entry -->|"renders gate"| node_startup
node_startup -->|"renders app"| node_app
node_person -->|"uses features"| node_app
node_app -->|"invokes commands"| node_bridge
node_bridge -->|"accesses data"| node_store
node_app -->|"shows accounts"| node_accounts
node_app -->|"shows ledger"| node_ledger
node_app -->|"opens import"| node_imports
node_imports -->|"submits import"| node_import_engine
node_import_engine -->|"parses statements"| node_file_loaders
node_import_engine -->|"categorizes records"| node_categorization
node_app -->|"manages rules"| node_rules
node_app -->|"shows planning"| node_budgets
node_app -->|"shows forecasts"| node_cashflow
node_app -->|"shows holdings"| node_investments
node_app -->|"shows reports"| node_reports
node_app -->|"shows breakdowns"| node_household
node_app -->|"manages profiles"| node_profiles
node_profiles -->|"starts protection"| node_protection
node_app -->|"manages backups"| node_backup
node_providers -.->|"fetches prices"| node_price_service
node_app -.->|"requests prices"| node_providers
node_updater -.->|"checks releases"| node_github

click node_entry "https://github.com/onetrueasian/penny-worth/blob/main/src/main.tsx"
click node_startup "https://github.com/onetrueasian/penny-worth/blob/main/src/StartupGate.tsx"
click node_app "https://github.com/onetrueasian/penny-worth/blob/main/src/App.tsx"
click node_accounts "https://github.com/onetrueasian/penny-worth/blob/main/src/AccountsView.tsx"
click node_ledger "https://github.com/onetrueasian/penny-worth/blob/main/src/App.tsx"
click node_imports "https://github.com/onetrueasian/penny-worth/blob/main/src/ImportInboxDialog.tsx"
click node_import_engine "https://github.com/onetrueasian/penny-worth/blob/main/core/src/importer.rs"
click node_file_loaders "https://github.com/onetrueasian/penny-worth/blob/main/core/src/csv_loader.rs"
click node_categorization "https://github.com/onetrueasian/penny-worth/blob/main/core/src/categorizer.rs"
click node_rules "https://github.com/onetrueasian/penny-worth/blob/main/core/src/rules.rs"
click node_budgets "https://github.com/onetrueasian/penny-worth/blob/main/src/BudgetView.tsx"
click node_cashflow "https://github.com/onetrueasian/penny-worth/blob/main/src/CashFlowView.tsx"
click node_investments "https://github.com/onetrueasian/penny-worth/blob/main/src/InvestmentsView.tsx"
click node_reports "https://github.com/onetrueasian/penny-worth/blob/main/src/ReportsView.tsx"
click node_household "https://github.com/onetrueasian/penny-worth/blob/main/src/HouseholdView.tsx"
click node_bridge "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/commands.rs"
click node_store "https://github.com/onetrueasian/penny-worth/blob/main/core/src/store.rs"
click node_profiles "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/profiles.rs"
click node_protection "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/protection_lifecycle.rs"
click node_backup "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/backups.rs"
click node_providers "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/live_price_provider.rs"
click node_updater "https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/updater.rs"

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_entry,node_startup,node_app,node_person toneBlue
class node_accounts,node_ledger,node_imports,node_import_engine,node_file_loaders,node_categorization,node_rules toneAmber
class node_budgets,node_cashflow,node_investments,node_reports,node_household toneMint
class node_bridge,node_store,node_providers,node_updater toneRose
class node_profiles,node_protection,node_backup,node_price_service,node_github toneIndigo
```

## Components

### Desktop experience

- [App entry](https://github.com/onetrueasian/penny-worth/blob/main/src/main.tsx): `src/main.tsx`
- [Startup gate](https://github.com/onetrueasian/penny-worth/blob/main/src/StartupGate.tsx): `src/StartupGate.tsx`
- [App shell](https://github.com/onetrueasian/penny-worth/blob/main/src/App.tsx): `src/App.tsx`

### Financial records

- [Accounts](https://github.com/onetrueasian/penny-worth/blob/main/src/AccountsView.tsx): `src/AccountsView.tsx`
- [Ledger](https://github.com/onetrueasian/penny-worth/blob/main/src/App.tsx): `src/App.tsx`
- [Import workflows](https://github.com/onetrueasian/penny-worth/blob/main/src/ImportInboxDialog.tsx): `src/ImportInboxDialog.tsx`
- [Import engine](https://github.com/onetrueasian/penny-worth/blob/main/core/src/importer.rs): `core/src/importer.rs`
- [Statement loaders](https://github.com/onetrueasian/penny-worth/blob/main/core/src/csv_loader.rs): `core/src/csv_loader.rs`
- [Categorization](https://github.com/onetrueasian/penny-worth/blob/main/core/src/categorizer.rs): `core/src/categorizer.rs`
- [Category rules](https://github.com/onetrueasian/penny-worth/blob/main/core/src/rules.rs): `core/src/rules.rs`

### Planning and insights

- [Budgets and goals](https://github.com/onetrueasian/penny-worth/blob/main/src/BudgetView.tsx): `src/BudgetView.tsx`
- [Cash flow](https://github.com/onetrueasian/penny-worth/blob/main/src/CashFlowView.tsx): `src/CashFlowView.tsx`
- [Investments](https://github.com/onetrueasian/penny-worth/blob/main/src/InvestmentsView.tsx): `src/InvestmentsView.tsx`
- [Reports](https://github.com/onetrueasian/penny-worth/blob/main/src/ReportsView.tsx): `src/ReportsView.tsx`
- [Household](https://github.com/onetrueasian/penny-worth/blob/main/src/HouseholdView.tsx): `src/HouseholdView.tsx`

### Local platform

- [Tauri commands](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [Core store](https://github.com/onetrueasian/penny-worth/blob/main/core/src/store.rs): `core/src/store.rs`
- [Price integration](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/live_price_provider.rs): `src-tauri/src/live_price_provider.rs`
- [Update check](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/updater.rs): `src-tauri/src/updater.rs`

### Profiles and protection

- [Profile management](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/profiles.rs): `src-tauri/src/profiles.rs`
- [Protection lifecycle](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/protection_lifecycle.rs): `src-tauri/src/protection_lifecycle.rs`
- [Backups](https://github.com/onetrueasian/penny-worth/blob/main/src-tauri/src/backups.rs): `src-tauri/src/backups.rs`

### Other components

- **User**
- **Price providers**
- **GitHub releases**

## Connections

- User → App entry: opens app
- App entry → Startup gate: renders gate
- Startup gate → App shell: renders app
- User → App shell: uses features
- App shell → Tauri commands: invokes commands
- Tauri commands → Core store: accesses data
- App shell → Accounts: shows accounts
- App shell → Ledger: shows ledger
- App shell → Import workflows: opens import
- Import workflows → Import engine: submits import
- Import engine → Statement loaders: parses statements
- Import engine → Categorization: categorizes records
- App shell → Category rules: manages rules
- App shell → Budgets and goals: shows planning
- App shell → Cash flow: shows forecasts
- App shell → Investments: shows holdings
- App shell → Reports: shows reports
- App shell → Household: shows breakdowns
- App shell → Profile management: manages profiles
- Profile management → Protection lifecycle: starts protection
- App shell → Backups: manages backups
- Price integration → Price providers: fetches prices
- App shell → Price integration: requests prices
- Update check → GitHub releases: checks releases
