# wastebank-project/mobile_app architecture

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

- Interactive diagram: https://gitdiagram.com/wastebank-project/mobile_app
- Repository: https://github.com/wastebank-project/mobile_app

## Overview

This is a cross-platform Flutter waste-management app. Its apparent user workflow spans account access, customer records, waste entry and savings/balance operations, with separate waste-detection and recommendation screens. The tree also indicates home-page history, charts and articles, plus profile functions. Source excerpts cover only the Windows host bootstrap, not Dart behavior; app-screen relationships below are therefore dashed and unverified. The README provides no product-level capability details, so those branches are inferred from filenames rather than inspected implementations.

Main entry points: [`lib/presentation/page/home_page/home_page.dart`](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/home_page/home_page.dart) (Home dashboard), [`lib/main.dart`](https://github.com/wastebank-project/mobile_app/blob/main/lib/main.dart) (Flutter entry), [`windows/runner/flutter_window.cpp`](https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/flutter_window.cpp) (Flutter window), [`lib/presentation/page/login_page/login_screen.dart`](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/login_page/login_screen.dart) (Account access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry and access"]
  node_entry["Flutter entry<br/>[main.dart]"]
  node_access["Account access<br/>[login_screen.dart]"]
  node_registration["Registration<br/>[register_page.dart]"]
  node_home["Home dashboard<br/>[home_page.dart]"]
  node_profile["Profile<br/>[profile_page.dart]"]
  node_authdomain["Authentication logic"]
end

subgraph group_customers["Customer management"]
  node_customerui["Customer screens"]
  node_customerdomain["Customer operations<br/>[customers.dart]"]
end

subgraph group_waste["Waste and savings"]
  node_savingui["Savings screens"]
  node_wasteui["Waste detection"]
  node_wastedomain["Waste operations<br/>[waste.dart]"]
  node_yolo["YOLO inference"]
  node_model["TFLite model"]
end

subgraph group_platform["Windows host"]
  node_winmain["Windows launcher<br/>[main.cpp]"]
  node_flutterwindow["Flutter window<br/>[flutter_window.cpp]"]
  node_winwindow["Native window<br/>[win32_window.cpp]"]
  node_plugins["Plugin registration"]
end

node_user(("App user"))

node_user -.->|"opens app"| node_entry
node_entry -.->|"routes to"| node_access
node_entry -.->|"routes to"| node_registration
node_entry -.->|"routes to"| node_home
node_access -.->|"uses"| node_authdomain
node_registration -.->|"uses"| node_authdomain
node_home -.->|"offers access"| node_customerui
node_home -.->|"offers access"| node_savingui
node_home -.->|"offers access"| node_wasteui
node_home -.->|"offers access"| node_profile
node_customerui -.->|"uses"| node_customerdomain
node_savingui -.->|"uses"| node_wastedomain
node_wasteui -.->|"uses"| node_yolo
node_yolo -.->|"loads model"| node_model
node_winmain -->|"creates"| node_flutterwindow
node_flutterwindow -->|"inherits window"| node_winwindow
node_flutterwindow -->|"registers plugins"| node_plugins

click node_entry "https://github.com/wastebank-project/mobile_app/blob/main/lib/main.dart"
click node_access "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/login_page/login_screen.dart"
click node_registration "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/register_page/register_page.dart"
click node_home "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/home_page/home_page.dart"
click node_profile "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/profile_page/profile_page.dart"
click node_authdomain "https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/authentication.dart"
click node_customerui "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/customers_page/customers_page.dart"
click node_customerdomain "https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/customers.dart"
click node_savingui "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/saving_page/saving_page_screen.dart"
click node_wasteui "https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/waste_detection/waste_detection.dart"
click node_wastedomain "https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/waste.dart"
click node_yolo "https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/yolo_service_tflite.dart"
click node_model "https://github.com/wastebank-project/mobile_app/blob/main/assets/model/YOLOv8s_e100_lr0.0001_32_int8.tflite"
click node_winmain "https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/main.cpp"
click node_flutterwindow "https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/flutter_window.cpp"
click node_winwindow "https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/win32_window.cpp"
click node_plugins "https://github.com/wastebank-project/mobile_app/blob/main/windows/flutter/generated_plugin_registrant.cc"

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_access,node_registration,node_home,node_profile,node_authdomain,node_user toneBlue
class node_customerui,node_customerdomain toneAmber
class node_savingui,node_wasteui,node_wastedomain,node_yolo,node_model toneMint
class node_winmain,node_flutterwindow,node_winwindow,node_plugins toneRose
```

## Components

### App entry and access

- [Flutter entry](https://github.com/wastebank-project/mobile_app/blob/main/lib/main.dart): `lib/main.dart`
- [Account access](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/login_page/login_screen.dart): `lib/presentation/page/login_page/login_screen.dart`
- [Registration](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/register_page/register_page.dart): `lib/presentation/page/register_page/register_page.dart`
- [Home dashboard](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/home_page/home_page.dart): `lib/presentation/page/home_page/home_page.dart`
- [Profile](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/profile_page/profile_page.dart): `lib/presentation/page/profile_page/profile_page.dart`
- [Authentication logic](https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/authentication.dart): `lib/domain/authentication.dart`

### Customer management

- [Customer screens](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/customers_page/customers_page.dart): `lib/presentation/page/customers_page/customers_page.dart`
- [Customer operations](https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/customers.dart): `lib/domain/customers.dart`

### Waste and savings

- [Savings screens](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/saving_page/saving_page_screen.dart): `lib/presentation/page/saving_page/saving_page_screen.dart`
- [Waste detection](https://github.com/wastebank-project/mobile_app/blob/main/lib/presentation/page/waste_detection/waste_detection.dart): `lib/presentation/page/waste_detection/waste_detection.dart`
- [Waste operations](https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/waste.dart): `lib/domain/waste.dart`
- [YOLO inference](https://github.com/wastebank-project/mobile_app/blob/main/lib/domain/yolo_service_tflite.dart): `lib/domain/yolo_service_tflite.dart`
- [TFLite model](https://github.com/wastebank-project/mobile_app/blob/main/assets/model/YOLOv8s_e100_lr0.0001_32_int8.tflite): `assets/model/YOLOv8s_e100_lr0.0001_32_int8.tflite`

### Windows host

- [Windows launcher](https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Native window](https://github.com/wastebank-project/mobile_app/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Plugin registration](https://github.com/wastebank-project/mobile_app/blob/main/windows/flutter/generated_plugin_registrant.cc): `windows/flutter/generated_plugin_registrant.cc`

### Other components

- **App user**

## Connections

- App user → Flutter entry: opens app
- Flutter entry → Account access: routes to
- Flutter entry → Registration: routes to
- Flutter entry → Home dashboard: routes to
- Account access → Authentication logic: uses
- Registration → Authentication logic: uses
- Home dashboard → Customer screens: offers access
- Home dashboard → Savings screens: offers access
- Home dashboard → Waste detection: offers access
- Home dashboard → Profile: offers access
- Customer screens → Customer operations: uses
- Savings screens → Waste operations: uses
- Waste detection → YOLO inference: uses
- YOLO inference → TFLite model: loads model
- Windows launcher → Flutter window: creates (evidence: `windows/runner/main.cpp`)
- Flutter window → Native window: inherits window
- Flutter window → Plugin registration: registers plugins (evidence: `windows/runner/flutter_window.cpp`)
