# olahedgefinance/ola-hedge-finance architecture

> Architecture diagram of the GitHub repository olahedgefinance/ola-hedge-finance, 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/olahedgefinance/ola-hedge-finance
- Repository: https://github.com/olahedgefinance/ola-hedge-finance

## Overview

Cashew is a cross-platform personal-finance app. Users record and organize transactions, review account and spending information, and manage budgets and goals; data is stored locally and can be synced or backed up. The README documents these capabilities, while the sampled source is limited to web SQLite support and platform setup, so feature-level connections below reflect documented behavior rather than inspected call paths.

Main entry points: [`budget/lib/database/tables.dart`](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/database/tables.dart) (Local database), [`budget/lib/main.dart`](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/main.dart) (Cashew app), [`budget/lib/pages/accountsPage.dart`](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/accountsPage.dart) (Accounts), [`budget/lib/pages/addTransactionPage.dart`](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/addTransactionPage.dart) (Transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["Cashew app<br/>[main.dart]"]
  node_dashboard["Home dashboard<br/>[homePage.dart]"]
end

subgraph group_finance["Finance workflows"]
  node_accounts["Accounts<br/>[accountsPage.dart]"]
  node_transactions["Transactions"]
  node_search["Search and filters"]
  node_budgets["Budgets<br/>[budgetPage.dart]"]
  node_goals["Goals<br/>[objectivePage.dart]"]
  node_currencies["Currencies"]
end

subgraph group_data["Data and sync"]
  node_database[("Local database<br/>[tables.dart]")]
  node_backup["Backup and restore"]
  node_sync["Cross-device sync<br/>[syncClient.dart]"]
  node_firebase["Firebase services"]
end

subgraph group_platform["Platform support"]
  node_webdb["Web SQLite worker<br/>[worker.sql-wasm.js]"]
  node_sqlite["SQLite engine<br/>[sql-wasm.js]"]
  node_notifications["Notifications"]
  node_biometrics["Biometric lock"]
end

node_user(("User"))
node_drive["Google Drive"]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_dashboard
node_user -->|"records"| node_transactions
node_user -->|"manages"| node_accounts
node_user -->|"configures"| node_budgets
node_user -->|"tracks"| node_goals
node_user -->|"searches"| node_search
node_user -->|"converts"| node_currencies
node_transactions -->|"stores data"| node_database
node_budgets -->|"uses data"| node_database
node_goals -->|"uses data"| node_database
node_accounts -->|"uses data"| node_database
node_database -->|"syncs data"| node_sync
node_sync -.->|"cloud sync"| node_firebase
node_user -->|"backs up"| node_backup
node_backup -->|"uses backup"| node_drive
node_user -->|"receives alerts"| node_notifications
node_user -->|"unlocks with"| node_biometrics

click node_app "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/main.dart"
click node_dashboard "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/homePage/homePage.dart"
click node_accounts "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/accountsPage.dart"
click node_transactions "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/addTransactionPage.dart"
click node_search "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/transactionsSearchPage.dart"
click node_budgets "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/budgetPage.dart"
click node_goals "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/objectivePage.dart"
click node_currencies "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/exchangeRatesPage.dart"
click node_database "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/database/tables.dart"
click node_backup "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/database/backup/native_restore.dart"
click node_sync "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/syncClient.dart"
click node_firebase "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/config/firebase_bootstrap.dart"
click node_webdb "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/web/worker.sql-wasm.js"
click node_sqlite "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/web/sql-wasm.js"
click node_notifications "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/initializeNotifications.dart"
click node_biometrics "https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/initializeBiometrics.dart"

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_dashboard,node_user toneBlue
class node_accounts,node_transactions,node_search,node_budgets,node_goals,node_currencies toneAmber
class node_database,node_backup,node_sync,node_firebase toneMint
class node_webdb,node_sqlite,node_notifications,node_biometrics toneRose
class node_drive toneIndigo
```

## Components

### App experience

- [Cashew app](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/main.dart): `budget/lib/main.dart`
- [Home dashboard](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/homePage/homePage.dart): `budget/lib/pages/homePage/homePage.dart`

### Finance workflows

- [Accounts](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/accountsPage.dart): `budget/lib/pages/accountsPage.dart`
- [Transactions](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/addTransactionPage.dart): `budget/lib/pages/addTransactionPage.dart`
- [Search and filters](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/transactionsSearchPage.dart): `budget/lib/pages/transactionsSearchPage.dart`
- [Budgets](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/budgetPage.dart): `budget/lib/pages/budgetPage.dart`
- [Goals](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/objectivePage.dart): `budget/lib/pages/objectivePage.dart`
- [Currencies](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/pages/exchangeRatesPage.dart): `budget/lib/pages/exchangeRatesPage.dart`

### Data and sync

- [Local database](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/database/tables.dart): `budget/lib/database/tables.dart`
- [Backup and restore](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/database/backup/native_restore.dart): `budget/lib/database/backup/native_restore.dart`
- [Cross-device sync](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/syncClient.dart): `budget/lib/struct/syncClient.dart`
- [Firebase services](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/config/firebase_bootstrap.dart): `budget/lib/config/firebase_bootstrap.dart`

### Platform support

- [Web SQLite worker](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/web/worker.sql-wasm.js): `budget/web/worker.sql-wasm.js`
- [SQLite engine](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/web/sql-wasm.js): `budget/web/sql-wasm.js`
- [Notifications](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/initializeNotifications.dart): `budget/lib/struct/initializeNotifications.dart`
- [Biometric lock](https://github.com/olahedgefinance/ola-hedge-finance/blob/main/budget/lib/struct/initializeBiometrics.dart): `budget/lib/struct/initializeBiometrics.dart`

### Other components

- **User**
- **Google Drive**

## Connections

- User → Cashew app: uses (evidence: `README.md`)
- Cashew app → Home dashboard: shows (evidence: `README.md`)
- User → Transactions: records (evidence: `README.md`)
- User → Accounts: manages (evidence: `README.md`)
- User → Budgets: configures (evidence: `README.md`)
- User → Goals: tracks (evidence: `README.md`)
- User → Search and filters: searches (evidence: `README.md`)
- User → Currencies: converts (evidence: `README.md`)
- Transactions → Local database: stores data (evidence: `README.md`)
- Budgets → Local database: uses data (evidence: `README.md`)
- Goals → Local database: uses data (evidence: `README.md`)
- Accounts → Local database: uses data (evidence: `README.md`)
- Local database → Cross-device sync: syncs data (evidence: `README.md`)
- Cross-device sync → Firebase services: cloud sync (evidence: `README.md`)
- User → Backup and restore: backs up (evidence: `README.md`)
- Backup and restore → Google Drive: uses backup (evidence: `README.md`)
- User → Notifications: receives alerts (evidence: `README.md`)
- User → Biometric lock: unlocks with (evidence: `README.md`)
