# linhdontcare/cashew-group7 architecture

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

- Interactive diagram: https://gitdiagram.com/linhdontcare/cashew-group7
- Repository: https://github.com/linhdontcare/cashew-group7

## Overview

Cashew is a cross-platform personal-finance app. The main workflow is recording and reviewing transactions, then organizing them into budgets and accounts to monitor spending and goals. Drift provides local structured storage; Firebase supports account-related features and synchronization. The README also documents currency conversion, backup/import, reminders, and financial dashboards. The graph uses the README and repository tree for these product areas; sampled implementation excerpts are limited, so internal call wiring is shown only at a broad level.

Main entry points: [`budget/lib/struct/databaseGlobal.dart`](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/databaseGlobal.dart) (Database access), [`budget/lib/main.dart`](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/main.dart) (App entry), [`budget/lib/pages/homePage/homePage.dart`](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/homePage/homePage.dart) (Home dashboard), [`budget/lib/pages/addTransactionPage.dart`](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/addTransactionPage.dart) (Transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_entry["App entry<br/>[main.dart]"]
  node_home["Home dashboard<br/>[homePage.dart]"]
end

subgraph group_finance["Finance workflows"]
  node_transaction["Transactions"]
  node_transaction_views["Search and history"]
  node_budgets["Budgets<br/>[budgetPage.dart]"]
  node_goals["Objectives<br/>[objectivePage.dart]"]
  node_accounts["Wallets and accounts<br/>[accountsPage.dart]"]
  node_currency["Currencies and rates"]
  node_automation["Schedules and reminders"]
end

subgraph group_data["Local data"]
  node_db_access["Database access"]
  node_tables["Finance tables<br/>[tables.dart]"]
  node_local_db[("Drift database<br/>[shared.dart]")]
end

subgraph group_integrations["Connected services"]
  node_sync["Sync client<br/>[syncClient.dart]"]
  node_auth["Firebase auth"]
  node_firebase[("Firebase")]
  node_backup["Backup and restore"]
  node_csv["CSV import export<br/>[importCSV.dart]"]
  node_notifications["Notifications"]
end

node_person(("User"))
node_rates_service["Exchange-rate service"]

node_person -->|"opens"| node_entry
node_entry -->|"shows"| node_home
node_person -->|"records"| node_transaction
node_person -->|"reviews"| node_transaction_views
node_person -->|"plans spending"| node_budgets
node_person -->|"tracks goals"| node_goals
node_person -->|"manages accounts"| node_accounts
node_transaction -->|"stores transaction"| node_db_access
node_transaction_views -->|"queries history"| node_db_access
node_budgets -->|"reads spending"| node_db_access
node_goals -->|"tracks progress"| node_db_access
node_accounts -->|"reads accounts"| node_db_access
node_home -->|"loads summaries"| node_db_access
node_db_access -->|"uses schema"| node_tables
node_db_access -->|"reads and writes"| node_local_db
node_person -->|"converts amounts"| node_currency
node_currency -.->|"gets rates"| node_rates_service
node_person -->|"backs up data"| node_backup
node_backup -.->|"syncs data"| node_sync
node_sync -.->|"exchanges data"| node_firebase
node_auth -.->|"authenticates"| node_firebase
node_person -->|"imports or exports"| node_csv
node_automation -->|"schedules alerts"| node_notifications
node_notifications -->|"notifies"| node_person

click node_entry "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/main.dart"
click node_home "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/homePage/homePage.dart"
click node_transaction "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/addTransactionPage.dart"
click node_transaction_views "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/transactionsListPage.dart"
click node_budgets "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/budgetPage.dart"
click node_goals "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/objectivePage.dart"
click node_accounts "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/accountsPage.dart"
click node_currency "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/exchangeRatesPage.dart"
click node_automation "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/upcomingTransactionsFunctions.dart"
click node_db_access "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/databaseGlobal.dart"
click node_tables "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/database/tables.dart"
click node_local_db "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/database/platform/shared.dart"
click node_sync "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/syncClient.dart"
click node_auth "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/firebaseAuthGlobal.dart"
click node_backup "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/widgets/accountAndBackup.dart"
click node_csv "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/widgets/importCSV.dart"
click node_notifications "https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/notificationsGlobal.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_entry,node_home,node_person toneBlue
class node_transaction,node_transaction_views,node_budgets,node_goals,node_accounts,node_currency,node_automation toneAmber
class node_db_access,node_tables,node_local_db toneMint
class node_sync,node_auth,node_firebase,node_backup,node_csv,node_notifications toneRose
class node_rates_service toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/main.dart): `budget/lib/main.dart`
- [Home dashboard](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/homePage/homePage.dart): `budget/lib/pages/homePage/homePage.dart`

### Finance workflows

- [Transactions](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/addTransactionPage.dart): `budget/lib/pages/addTransactionPage.dart`
- [Search and history](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/transactionsListPage.dart): `budget/lib/pages/transactionsListPage.dart`
- [Budgets](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/budgetPage.dart): `budget/lib/pages/budgetPage.dart`
- [Objectives](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/objectivePage.dart): `budget/lib/pages/objectivePage.dart`
- [Wallets and accounts](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/accountsPage.dart): `budget/lib/pages/accountsPage.dart`
- [Currencies and rates](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/pages/exchangeRatesPage.dart): `budget/lib/pages/exchangeRatesPage.dart`
- [Schedules and reminders](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/upcomingTransactionsFunctions.dart): `budget/lib/struct/upcomingTransactionsFunctions.dart`

### Local data

- [Database access](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/databaseGlobal.dart): `budget/lib/struct/databaseGlobal.dart`
- [Finance tables](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/database/tables.dart): `budget/lib/database/tables.dart`
- [Drift database](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/database/platform/shared.dart): `budget/lib/database/platform/shared.dart`

### Connected services

- [Sync client](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/syncClient.dart): `budget/lib/struct/syncClient.dart`
- [Firebase auth](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/firebaseAuthGlobal.dart): `budget/lib/struct/firebaseAuthGlobal.dart`
- **Firebase**
- [Backup and restore](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/widgets/accountAndBackup.dart): `budget/lib/widgets/accountAndBackup.dart`
- [CSV import export](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/widgets/importCSV.dart): `budget/lib/widgets/importCSV.dart`
- [Notifications](https://github.com/linhdontcare/cashew-group7/blob/main/budget/lib/struct/notificationsGlobal.dart): `budget/lib/struct/notificationsGlobal.dart`

### Other components

- **User**
- **Exchange-rate service**

## Connections

- User → App entry: opens
- App entry → Home dashboard: shows
- User → Transactions: records
- User → Search and history: reviews
- User → Budgets: plans spending
- User → Objectives: tracks goals
- User → Wallets and accounts: manages accounts
- Transactions → Database access: stores transaction
- Search and history → Database access: queries history
- Budgets → Database access: reads spending
- Objectives → Database access: tracks progress
- Wallets and accounts → Database access: reads accounts
- Home dashboard → Database access: loads summaries
- Database access → Finance tables: uses schema
- Database access → Drift database: reads and writes
- User → Currencies and rates: converts amounts
- Currencies and rates → Exchange-rate service: gets rates
- User → Backup and restore: backs up data
- Backup and restore → Sync client: syncs data
- Sync client → Firebase: exchanges data
- Firebase auth → Firebase: authenticates
- User → CSV import export: imports or exports
- Schedules and reminders → Notifications: schedules alerts
- Notifications → User: notifies
