# phamquanganhcode/group05_flutter_app architecture

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

- Interactive diagram: https://gitdiagram.com/phamquanganhcode/group05_flutter_app
- Repository: https://github.com/phamquanganhcode/group05_flutter_app

## Overview

Cashew is a Flutter personal-finance app for tracking transactions, wallets, budgets, objectives, and net worth. Users enter or review financial activity, manage budgets and accounts, and view summaries; the tree also indicates sharing/sync, reminders, recurring transactions, subscriptions, and data import/export. The root README describes a generic student project rather than Cashew’s features. Dart implementations were not sampled, so the graph uses the file tree to identify product areas and avoids asserting detailed calls between them.

Main entry points: [`cashew/lib/database/tables.dart`](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/database/tables.dart) (Local finance data), [`cashew/lib/main.dart`](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/main.dart) (App entry), [`cashew/lib/pages/homePage/homePage.dart`](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/homePage/homePage.dart) (Home summaries), [`cashew/lib/firebase_options.dart`](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/firebase_options.dart) (Firebase services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Finance experience"]
  node_app["App entry<br/>[main.dart]"]
  node_home["Home summaries<br/>[homePage.dart]"]
  node_activity["Activity and search<br/>[activityPage.dart]"]
end

subgraph group_domain["Money management"]
  node_transactions["Transaction management"]
  node_wallets["Wallet management<br/>[accountsPage.dart]"]
  node_budgets["Budget management<br/>[budgetPage.dart]"]
  node_objectives["Objectives<br/>[objectivePage.dart]"]
  node_networth["Net worth"]
end

subgraph group_platform["Persistence and sync"]
  node_database[("Local finance data<br/>[tables.dart]")]
  node_database_init["Database setup"]
  node_sync["Budget sync<br/>[syncClient.dart]"]
  node_firebase["Firebase services"]
  node_sharing["Budget sharing<br/>[shareBudget.dart]"]
  node_sqlworker["Web SQL worker<br/>[worker.sql-wasm.js]"]
end

subgraph group_support["Account and utilities"]
  node_backup["Import and export"]
  node_recurring["Scheduled transactions"]
  node_notifications["Notifications"]
  node_auth["Authentication state"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"presents"| node_home
node_user -->|"reviews activity"| node_activity
node_user -->|"records activity"| node_transactions
node_user -->|"manages wallets"| node_wallets
node_user -->|"sets budgets"| node_budgets
node_user -->|"manages goals"| node_objectives
node_home -->|"shows summary"| node_networth
node_database_init -->|"initializes"| node_database
node_sync -.->|"uses services"| node_firebase
node_sharing -.->|"uses services"| node_firebase
node_backup -->|"imports or exports"| node_database
node_sqlworker -->|"executes SQL"| node_database

click node_app "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/main.dart"
click node_home "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/homePage/homePage.dart"
click node_activity "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/activityPage.dart"
click node_transactions "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/addTransactionPage.dart"
click node_wallets "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/accountsPage.dart"
click node_budgets "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/budgetPage.dart"
click node_objectives "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/objectivePage.dart"
click node_networth "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/homePage/homePageNetWorth.dart"
click node_database "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/database/tables.dart"
click node_database_init "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/database/initializeDefaultDatabase.dart"
click node_sync "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/syncClient.dart"
click node_firebase "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/firebase_options.dart"
click node_sharing "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/shareBudget.dart"
click node_backup "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/widgets/accountAndBackup.dart"
click node_recurring "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/upcomingTransactionsFunctions.dart"
click node_notifications "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/initializeNotifications.dart"
click node_auth "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/firebaseAuthGlobal.dart"
click node_sqlworker "https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/web/worker.sql-wasm.js"

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_home,node_activity,node_user toneBlue
class node_transactions,node_wallets,node_budgets,node_objectives,node_networth toneAmber
class node_database,node_database_init,node_sync,node_firebase,node_sharing,node_sqlworker toneMint
class node_backup,node_recurring,node_notifications,node_auth toneRose
```

## Components

### Finance experience

- [App entry](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/main.dart): `cashew/lib/main.dart`
- [Home summaries](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/homePage/homePage.dart): `cashew/lib/pages/homePage/homePage.dart`
- [Activity and search](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/activityPage.dart): `cashew/lib/pages/activityPage.dart`

### Money management

- [Transaction management](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/addTransactionPage.dart): `cashew/lib/pages/addTransactionPage.dart`
- [Wallet management](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/accountsPage.dart): `cashew/lib/pages/accountsPage.dart`
- [Budget management](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/budgetPage.dart): `cashew/lib/pages/budgetPage.dart`
- [Objectives](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/objectivePage.dart): `cashew/lib/pages/objectivePage.dart`
- [Net worth](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/pages/homePage/homePageNetWorth.dart): `cashew/lib/pages/homePage/homePageNetWorth.dart`

### Persistence and sync

- [Local finance data](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/database/tables.dart): `cashew/lib/database/tables.dart`
- [Database setup](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/database/initializeDefaultDatabase.dart): `cashew/lib/database/initializeDefaultDatabase.dart`
- [Budget sync](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/syncClient.dart): `cashew/lib/struct/syncClient.dart`
- [Firebase services](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/firebase_options.dart): `cashew/lib/firebase_options.dart`
- [Budget sharing](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/shareBudget.dart): `cashew/lib/struct/shareBudget.dart`
- [Web SQL worker](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/web/worker.sql-wasm.js): `cashew/web/worker.sql-wasm.js`

### Account and utilities

- [Import and export](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/widgets/accountAndBackup.dart): `cashew/lib/widgets/accountAndBackup.dart`
- [Scheduled transactions](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/upcomingTransactionsFunctions.dart): `cashew/lib/struct/upcomingTransactionsFunctions.dart`
- [Notifications](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/initializeNotifications.dart): `cashew/lib/struct/initializeNotifications.dart`
- [Authentication state](https://github.com/phamquanganhcode/group05_flutter_app/blob/main/cashew/lib/struct/firebaseAuthGlobal.dart): `cashew/lib/struct/firebaseAuthGlobal.dart`

### Other components

- **User**

## Connections

- User → App entry: opens
- App entry → Home summaries: presents
- User → Activity and search: reviews activity
- User → Transaction management: records activity
- User → Wallet management: manages wallets
- User → Budget management: sets budgets
- User → Objectives: manages goals
- Home summaries → Net worth: shows summary
- Database setup → Local finance data: initializes
- Budget sync → Firebase services: uses services
- Budget sharing → Firebase services: uses services
- Import and export → Local finance data: imports or exports
- Web SQL worker → Local finance data: executes SQL
