# onetrueasian/vault-spend architecture

> Architecture diagram of the GitHub repository onetrueasian/vault-spend, 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/vault-spend
- Repository: https://github.com/onetrueasian/vault-spend

## Overview

Vault Spend is a local desktop budgeting and transaction-ledger application. A user launches into startup/profile handling, then manages financial records in the React interface; Tauri commands connect those actions to the Rust backend and local core storage. Major workflows include importing and categorizing transactions, budgeting and analysis, investment tracking, and optional profile encryption, backups, and live prices. The README documents capabilities not visible in the sampled excerpts; those are represented at their supported module or view paths, without assuming detailed internal call chains.

Main entry points: [`src/App.tsx`](https://github.com/onetrueasian/vault-spend/blob/main/src/App.tsx) (Application shell), [`src-tauri/src/commands.rs`](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/commands.rs) (Tauri commands), [`core/src/store.rs`](https://github.com/onetrueasian/vault-spend/blob/main/core/src/store.rs) (Local database), [`src/StartupGate.tsx`](https://github.com/onetrueasian/vault-spend/blob/main/src/StartupGate.tsx) (Startup gate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_startup["Startup gate<br/>[StartupGate.tsx]"]
  node_app["Application shell<br/>[App.tsx]"]
  node_profile_ui["Profile screens"]
end

subgraph group_finance["Finance workflows"]
  node_dashboard["Dashboard<br/>[DashboardView.tsx]"]
  node_ledger["Accounts and ledger<br/>[AccountsView.tsx]"]
  node_budget["Budget and goals<br/>[BudgetView.tsx]"]
  node_cashflow["Cash flow<br/>[CashFlowView.tsx]"]
  node_recurring["Recurring items<br/>[RecurringView.tsx]"]
  node_investments["Investments"]
  node_household["Household<br/>[HouseholdView.tsx]"]
  node_reports["Reports<br/>[ReportsView.tsx]"]
  node_import_ui["Import inbox"]
  node_query["Ledger queries<br/>[ledgerQuery.ts]"]
end

subgraph group_backend["Desktop backend"]
  node_commands["Tauri commands<br/>[commands.rs]"]
  node_runtime["Application runtime<br/>[runtime.rs]"]
  node_background["Background reminders<br/>[background.rs]"]
  node_price_service["Live price service<br/>[live_prices.rs]"]
end

subgraph group_data["Local data and security"]
  node_profiles["Profile management<br/>[profiles.rs]"]
  node_protection["Protection lifecycle"]
  node_store[("Local database<br/>[store.rs]")]
  node_importers["Statement importers<br/>[importer.rs]"]
  node_rules["Categorization rules<br/>[rules.rs]"]
  node_backups["Backups<br/>[backups.rs]"]
end

subgraph group_integrations["External services"]
  node_github["GitHub update check"]
  node_price_provider["Configured price provider"]
end

node_user(("User"))

node_user -->|"launches"| node_startup
node_startup -->|"opens app"| node_app
node_app -->|"shows profiles"| node_profile_ui
node_app -->|"presents features"| node_dashboard
node_app -->|"presents features"| node_ledger
node_app -->|"presents features"| node_budget
node_app -->|"presents features"| node_cashflow
node_app -->|"presents features"| node_recurring
node_app -->|"presents features"| node_investments
node_app -->|"presents features"| node_household
node_app -->|"presents features"| node_reports
node_ledger -->|"opens review"| node_import_ui
node_app -->|"answers queries"| node_query
node_app -->|"invokes commands"| node_commands
node_profile_ui -->|"invokes commands"| node_commands
node_commands -->|"uses runtime"| node_runtime
node_commands -->|"reads and writes"| node_store
node_commands -->|"imports statements"| node_importers
node_importers -->|"persists records"| node_store
node_commands -->|"applies rules"| node_rules
node_rules -->|"reads and updates"| node_store
node_commands -->|"manages profiles"| node_profiles
node_profiles -->|"changes protection"| node_protection
node_protection -->|"protects profile data"| node_store
node_commands -->|"manages backups"| node_backups
node_app -->|"configures reminders"| node_background
node_investments -.->|"requests prices"| node_price_service
node_price_service -.->|"fetches prices"| node_price_provider
node_startup -.->|"checks releases"| node_github

click node_startup "https://github.com/onetrueasian/vault-spend/blob/main/src/StartupGate.tsx"
click node_app "https://github.com/onetrueasian/vault-spend/blob/main/src/App.tsx"
click node_profile_ui "https://github.com/onetrueasian/vault-spend/blob/main/src/ProfileSelector.tsx"
click node_dashboard "https://github.com/onetrueasian/vault-spend/blob/main/src/DashboardView.tsx"
click node_ledger "https://github.com/onetrueasian/vault-spend/blob/main/src/AccountsView.tsx"
click node_budget "https://github.com/onetrueasian/vault-spend/blob/main/src/BudgetView.tsx"
click node_cashflow "https://github.com/onetrueasian/vault-spend/blob/main/src/CashFlowView.tsx"
click node_recurring "https://github.com/onetrueasian/vault-spend/blob/main/src/RecurringView.tsx"
click node_investments "https://github.com/onetrueasian/vault-spend/blob/main/src/InvestmentsView.tsx"
click node_household "https://github.com/onetrueasian/vault-spend/blob/main/src/HouseholdView.tsx"
click node_reports "https://github.com/onetrueasian/vault-spend/blob/main/src/ReportsView.tsx"
click node_import_ui "https://github.com/onetrueasian/vault-spend/blob/main/src/ImportInboxDialog.tsx"
click node_query "https://github.com/onetrueasian/vault-spend/blob/main/src/ledgerQuery.ts"
click node_commands "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/commands.rs"
click node_runtime "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/runtime.rs"
click node_background "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/background.rs"
click node_price_service "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/live_prices.rs"
click node_profiles "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/profiles.rs"
click node_protection "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/protection_lifecycle.rs"
click node_store "https://github.com/onetrueasian/vault-spend/blob/main/core/src/store.rs"
click node_importers "https://github.com/onetrueasian/vault-spend/blob/main/core/src/importer.rs"
click node_rules "https://github.com/onetrueasian/vault-spend/blob/main/core/src/rules.rs"
click node_backups "https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/backups.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_startup,node_app,node_profile_ui,node_user toneBlue
class node_dashboard,node_ledger,node_budget,node_cashflow,node_recurring,node_investments,node_household,node_reports,node_import_ui,node_query toneAmber
class node_commands,node_runtime,node_background,node_price_service toneMint
class node_profiles,node_protection,node_store,node_importers,node_rules,node_backups toneRose
class node_github,node_price_provider toneIndigo
```

## Components

### Desktop interface

- [Startup gate](https://github.com/onetrueasian/vault-spend/blob/main/src/StartupGate.tsx): `src/StartupGate.tsx`
- [Application shell](https://github.com/onetrueasian/vault-spend/blob/main/src/App.tsx): `src/App.tsx`
- [Profile screens](https://github.com/onetrueasian/vault-spend/blob/main/src/ProfileSelector.tsx): `src/ProfileSelector.tsx`

### Finance workflows

- [Dashboard](https://github.com/onetrueasian/vault-spend/blob/main/src/DashboardView.tsx): `src/DashboardView.tsx`
- [Accounts and ledger](https://github.com/onetrueasian/vault-spend/blob/main/src/AccountsView.tsx): `src/AccountsView.tsx`
- [Budget and goals](https://github.com/onetrueasian/vault-spend/blob/main/src/BudgetView.tsx): `src/BudgetView.tsx`
- [Cash flow](https://github.com/onetrueasian/vault-spend/blob/main/src/CashFlowView.tsx): `src/CashFlowView.tsx`
- [Recurring items](https://github.com/onetrueasian/vault-spend/blob/main/src/RecurringView.tsx): `src/RecurringView.tsx`
- [Investments](https://github.com/onetrueasian/vault-spend/blob/main/src/InvestmentsView.tsx): `src/InvestmentsView.tsx`
- [Household](https://github.com/onetrueasian/vault-spend/blob/main/src/HouseholdView.tsx): `src/HouseholdView.tsx`
- [Reports](https://github.com/onetrueasian/vault-spend/blob/main/src/ReportsView.tsx): `src/ReportsView.tsx`
- [Import inbox](https://github.com/onetrueasian/vault-spend/blob/main/src/ImportInboxDialog.tsx): `src/ImportInboxDialog.tsx`
- [Ledger queries](https://github.com/onetrueasian/vault-spend/blob/main/src/ledgerQuery.ts): `src/ledgerQuery.ts`

### Desktop backend

- [Tauri commands](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [Application runtime](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/runtime.rs): `src-tauri/src/runtime.rs`
- [Background reminders](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/background.rs): `src-tauri/src/background.rs`
- [Live price service](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/live_prices.rs): `src-tauri/src/live_prices.rs`

### Local data and security

- [Profile management](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/profiles.rs): `src-tauri/src/profiles.rs`
- [Protection lifecycle](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/protection_lifecycle.rs): `src-tauri/src/protection_lifecycle.rs`
- [Local database](https://github.com/onetrueasian/vault-spend/blob/main/core/src/store.rs): `core/src/store.rs`
- [Statement importers](https://github.com/onetrueasian/vault-spend/blob/main/core/src/importer.rs): `core/src/importer.rs`
- [Categorization rules](https://github.com/onetrueasian/vault-spend/blob/main/core/src/rules.rs): `core/src/rules.rs`
- [Backups](https://github.com/onetrueasian/vault-spend/blob/main/src-tauri/src/backups.rs): `src-tauri/src/backups.rs`

### External services

- **GitHub update check**
- **Configured price provider**

### Other components

- **User**

## Connections

- User → Startup gate: launches
- Startup gate → Application shell: opens app
- Application shell → Profile screens: shows profiles
- Application shell → Dashboard: presents features
- Application shell → Accounts and ledger: presents features
- Application shell → Budget and goals: presents features
- Application shell → Cash flow: presents features
- Application shell → Recurring items: presents features
- Application shell → Investments: presents features
- Application shell → Household: presents features
- Application shell → Reports: presents features
- Accounts and ledger → Import inbox: opens review
- Application shell → Ledger queries: answers queries
- Application shell → Tauri commands: invokes commands
- Profile screens → Tauri commands: invokes commands
- Tauri commands → Application runtime: uses runtime
- Tauri commands → Local database: reads and writes
- Tauri commands → Statement importers: imports statements
- Statement importers → Local database: persists records
- Tauri commands → Categorization rules: applies rules
- Categorization rules → Local database: reads and updates
- Tauri commands → Profile management: manages profiles
- Profile management → Protection lifecycle: changes protection
- Protection lifecycle → Local database: protects profile data
- Tauri commands → Backups: manages backups
- Application shell → Background reminders: configures reminders
- Investments → Live price service: requests prices
- Live price service → Configured price provider: fetches prices
- Startup gate → GitHub update check: checks releases
