# patelvasu27/budget_tracker architecture

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

- Interactive diagram: https://gitdiagram.com/patelvasu27/budget_tracker
- Repository: https://github.com/patelvasu27/budget_tracker

## Overview

SimpleBudget is a browser-based income and expense tracker. Users enter transactions by form or voice, review monthly income, expenses, and balance, manage categories, and export records. Authentication distinguishes Supabase-backed accounts from guest mode; a DataStore factory selects remote or local persistence. README capabilities include month navigation, income settings, dark mode, and password reset. Edges are limited to relationships shown in excerpts or stated by the README; unsampled internals are represented by their exact source paths without guessed call chains.

Main entry points: [`src/features/Dashboard.tsx`](https://github.com/patelvasu27/budget_tracker/blob/main/src/features/Dashboard.tsx) (Monthly dashboard), [`src/stores/dataStore.ts`](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/dataStore.ts) (Store factory), [`src/App.tsx`](https://github.com/patelvasu27/budget_tracker/blob/main/src/App.tsx) (App shell), [`src/components/ExportModal.tsx`](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/ExportModal.tsx) (Export dialog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App shell<br/>[App.tsx]"]
end

subgraph group_experience["Budget experience"]
  node_dashboard["Monthly dashboard<br/>[Dashboard.tsx]"]
  node_balance["Balance summary<br/>[BalanceCard.tsx]"]
  node_transactions["Transaction list"]
  node_exportui["Export dialog<br/>[ExportModal.tsx]"]
  node_export["Export formatter<br/>[export.ts]"]
end

subgraph group_domain["Entry and categorization"]
  node_entrymodal["Transaction form"]
  node_voice["Voice capture<br/>[VoiceMicButton.tsx]"]
  node_voicecommand["Voice command hook<br/>[useVoiceCommand.ts]"]
  node_amount["Amount parser<br/>[useAmountParser.ts]"]
  node_categorymatch["Category matcher<br/>[categoryMatcher.ts]"]
  node_categories["Category manager"]
  node_categoryhooks["Category queries<br/>[useCategories.ts]"]
end

subgraph group_identity["Identity and preferences"]
  node_authui["Authentication UI<br/>[AuthModal.tsx]"]
  node_auth["Auth state<br/>[authStore.ts]"]
  node_supabaseclient["Supabase client<br/>[supabase.ts]"]
  node_theme["Theme state<br/>[themeStore.ts]"]
end

subgraph group_persistence["Data persistence"]
  node_datafactory["Store factory<br/>[dataStore.ts]"]
  node_localstore[("Guest storage<br/>[localStore.ts]")]
  node_remotestore[("Supabase storage<br/>[remoteStore.ts]")]
  node_apistore[("API storage option<br/>[remoteStoreV2.ts]")]
end

node_user(("Budget user"))
node_supabase[("Supabase service")]
node_browser["Browser speech API"]
node_csvexcel["CSV / Excel files"]

node_user -->|"uses"| node_app
node_app -->|"opens"| node_authui
node_app -->|"renders"| node_dashboard
node_app -->|"initializes"| node_auth
node_app -->|"reads"| node_theme
node_authui -->|"signs in"| node_auth
node_authui -->|"authenticates"| node_supabaseclient
node_auth -->|"uses"| node_supabaseclient
node_dashboard -->|"renders"| node_balance
node_dashboard -->|"renders"| node_transactions
node_dashboard -->|"renders"| node_voice
node_dashboard -->|"parses"| node_amount
node_dashboard -->|"matches"| node_categorymatch
node_dashboard -->|"opens"| node_entrymodal
node_voice -->|"delegates"| node_voicecommand
node_voicecommand -.->|"captures speech"| node_browser
node_entrymodal -->|"loads categories"| node_categoryhooks
node_entrymodal -->|"mutates transactions"| node_datafactory
node_dashboard -->|"loads budget data"| node_datafactory
node_dashboard -->|"opens"| node_categories
node_categories -->|"uses queries"| node_categoryhooks
node_categories -->|"reorders categories"| node_datafactory
node_categoryhooks -->|"queries and mutates"| node_datafactory
node_dashboard -->|"opens"| node_exportui
node_exportui -->|"loads transactions"| node_datafactory
node_exportui -->|"formats export"| node_export
node_export -->|"downloads"| node_csvexcel
node_datafactory -->|"selects for guests"| node_localstore
node_datafactory -->|"selects for accounts"| node_remotestore
node_datafactory -->|"selects by flag"| node_apistore
node_remotestore -->|"uses"| node_supabaseclient
node_remotestore -->|"reads and writes"| node_supabase
node_theme -.->|"persists preference"| node_browser

click node_app "https://github.com/patelvasu27/budget_tracker/blob/main/src/App.tsx"
click node_authui "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/AuthModal.tsx"
click node_auth "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/authStore.ts"
click node_supabaseclient "https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/supabase.ts"
click node_dashboard "https://github.com/patelvasu27/budget_tracker/blob/main/src/features/Dashboard.tsx"
click node_balance "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/BalanceCard.tsx"
click node_transactions "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/TransactionList.tsx"
click node_entrymodal "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/AddExpenseModal.tsx"
click node_voice "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/VoiceMicButton.tsx"
click node_voicecommand "https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useVoiceCommand.ts"
click node_amount "https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useAmountParser.ts"
click node_categorymatch "https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/categoryMatcher.ts"
click node_categories "https://github.com/patelvasu27/budget_tracker/blob/main/src/features/CategoryManager.tsx"
click node_categoryhooks "https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useCategories.ts"
click node_exportui "https://github.com/patelvasu27/budget_tracker/blob/main/src/components/ExportModal.tsx"
click node_export "https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/export.ts"
click node_datafactory "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/dataStore.ts"
click node_localstore "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/localStore.ts"
click node_remotestore "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/remoteStore.ts"
click node_apistore "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/remoteStoreV2.ts"
click node_theme "https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/themeStore.ts"

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,node_browser toneBlue
class node_dashboard,node_balance,node_transactions,node_exportui,node_export,node_supabase toneAmber
class node_entrymodal,node_voice,node_voicecommand,node_amount,node_categorymatch,node_categories,node_categoryhooks toneMint
class node_authui,node_auth,node_supabaseclient,node_theme toneRose
class node_datafactory,node_localstore,node_remotestore,node_apistore,node_csvexcel toneIndigo
```

## Components

### App entry

- [App shell](https://github.com/patelvasu27/budget_tracker/blob/main/src/App.tsx): `src/App.tsx`

### Budget experience

- [Monthly dashboard](https://github.com/patelvasu27/budget_tracker/blob/main/src/features/Dashboard.tsx): `src/features/Dashboard.tsx`
- [Balance summary](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/BalanceCard.tsx): `src/components/BalanceCard.tsx`
- [Transaction list](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/TransactionList.tsx): `src/components/TransactionList.tsx`
- [Export dialog](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/ExportModal.tsx): `src/components/ExportModal.tsx`
- [Export formatter](https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/export.ts): `src/lib/export.ts`

### Entry and categorization

- [Transaction form](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/AddExpenseModal.tsx): `src/components/AddExpenseModal.tsx`
- [Voice capture](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/VoiceMicButton.tsx): `src/components/VoiceMicButton.tsx`
- [Voice command hook](https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useVoiceCommand.ts): `src/hooks/useVoiceCommand.ts`
- [Amount parser](https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useAmountParser.ts): `src/hooks/useAmountParser.ts`
- [Category matcher](https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/categoryMatcher.ts): `src/lib/categoryMatcher.ts`
- [Category manager](https://github.com/patelvasu27/budget_tracker/blob/main/src/features/CategoryManager.tsx): `src/features/CategoryManager.tsx`
- [Category queries](https://github.com/patelvasu27/budget_tracker/blob/main/src/hooks/useCategories.ts): `src/hooks/useCategories.ts`

### Identity and preferences

- [Authentication UI](https://github.com/patelvasu27/budget_tracker/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Auth state](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/authStore.ts): `src/stores/authStore.ts`
- [Supabase client](https://github.com/patelvasu27/budget_tracker/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Theme state](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/themeStore.ts): `src/stores/themeStore.ts`

### Data persistence

- [Store factory](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/dataStore.ts): `src/stores/dataStore.ts`
- [Guest storage](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/localStore.ts): `src/stores/localStore.ts`
- [Supabase storage](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/remoteStore.ts): `src/stores/remoteStore.ts`
- [API storage option](https://github.com/patelvasu27/budget_tracker/blob/main/src/stores/remoteStoreV2.ts): `src/stores/remoteStoreV2.ts`

### Other components

- **Budget user**
- **Supabase service**
- **Browser speech API**
- **CSV / Excel files**

## Connections

- Budget user → App shell: uses (evidence: `README.md`)
- App shell → Authentication UI: opens (evidence: `src/App.tsx`)
- App shell → Monthly dashboard: renders (evidence: `src/App.tsx`)
- App shell → Auth state: initializes (evidence: `src/App.tsx`)
- App shell → Theme state: reads (evidence: `src/App.tsx`)
- Authentication UI → Auth state: signs in (evidence: `src/components/AuthModal.tsx`)
- Authentication UI → Supabase client: authenticates (evidence: `src/components/AuthModal.tsx`)
- Auth state → Supabase client: uses (evidence: `src/stores/authStore.ts`)
- Monthly dashboard → Balance summary: renders (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Transaction list: renders (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Voice capture: renders (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Amount parser: parses (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Category matcher: matches (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Transaction form: opens (evidence: `src/features/Dashboard.tsx`)
- Voice capture → Voice command hook: delegates (evidence: `src/components/VoiceMicButton.tsx`)
- Voice command hook → Browser speech API: captures speech (evidence: `README.md`)
- Transaction form → Category queries: loads categories (evidence: `src/components/AddExpenseModal.tsx`)
- Transaction form → Store factory: mutates transactions (evidence: `src/components/AddExpenseModal.tsx`)
- Monthly dashboard → Store factory: loads budget data (evidence: `src/features/Dashboard.tsx`)
- Monthly dashboard → Category manager: opens (evidence: `src/features/Dashboard.tsx`)
- Category manager → Category queries: uses queries (evidence: `src/features/CategoryManager.tsx`)
- Category manager → Store factory: reorders categories (evidence: `src/features/CategoryManager.tsx`)
- Category queries → Store factory: queries and mutates (evidence: `src/hooks/useCategories.ts`)
- Monthly dashboard → Export dialog: opens (evidence: `src/features/Dashboard.tsx`)
- Export dialog → Store factory: loads transactions (evidence: `src/components/ExportModal.tsx`)
- Export dialog → Export formatter: formats export (evidence: `src/components/ExportModal.tsx`)
- Export formatter → CSV / Excel files: downloads (evidence: `README.md`)
- Store factory → Guest storage: selects for guests (evidence: `src/stores/dataStore.ts`)
- Store factory → Supabase storage: selects for accounts (evidence: `src/stores/dataStore.ts`)
- Store factory → API storage option: selects by flag (evidence: `src/stores/dataStore.ts`)
- Supabase storage → Supabase client: uses (evidence: `src/stores/remoteStore.ts`)
- Supabase storage → Supabase service: reads and writes (evidence: `README.md`)
- Theme state → Browser speech API: persists preference
