# setsuna25th3/mobile architecture

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

- Interactive diagram: https://gitdiagram.com/setsuna25th3/mobile
- Repository: https://github.com/setsuna25th3/mobile

## Overview

This is a Flutter product-management and ordering app, inferred from its user and admin screens, product/order models, and separate admin entry point. The apparent user journey spans authentication, browsing products, cart, and order history; the admin area covers authentication, product management, and order management. The README documents only a Chrome launch command and sample credentials. With no source excerpts or documented interactions, the graph identifies the runtime areas but omits unverified call and data-flow edges.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_user_entry["User entry point<br/>[main.dart]"]
  node_admin_entry["Admin entry point<br/>[main_admin.dart]"]
end

subgraph group_user["Customer app"]
  node_user_auth["User authentication<br/>[auth_screen.dart]"]
  node_home["Product browsing<br/>[home_screen.dart]"]
  node_detail["Product details<br/>[detail_screen.dart]"]
  node_cart["Shopping cart<br/>[cart_screen.dart]"]
  node_history["Order history"]
  node_verification["Verification<br/>[page_verify.dart]"]
  node_profile["User profile"]
end

subgraph group_admin["Admin app"]
  node_admin_auth["Admin authentication"]
  node_dashboard["Admin dashboard"]
  node_product_management["Product management"]
  node_add_product["Add product"]
  node_edit_product["Edit product"]
  node_order_management["Order management"]
end

subgraph group_domain["Domain and services"]
  node_product_controller["Product controller"]
  node_product_model["Product model<br/>[product.dart]"]
  node_recipient_model["Recipient model<br/>[nguoi_nhan.dart]"]
  node_product_repository["Product repository"]
  node_supabase["Supabase service"]
  node_auth_storage["Auth storage<br/>[auth_storage.dart]"]
  node_configuration["Configuration<br/>[config.dart]"]
end

node_customer(("Customer"))
node_administrator(("Administrator"))

click node_user_entry "https://github.com/setsuna25th3/mobile/blob/main/lib/main.dart"
click node_admin_entry "https://github.com/setsuna25th3/mobile/blob/main/lib/main_admin.dart"
click node_user_auth "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/auth_screen.dart"
click node_home "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/home_screen.dart"
click node_detail "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/detail_screen.dart"
click node_cart "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/cart_screen.dart"
click node_history "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/order_history_screen.dart"
click node_verification "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/page_verify.dart"
click node_profile "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/profile_screen.dart"
click node_admin_auth "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/admin_auth_screen.dart"
click node_dashboard "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/admin_dashboard.dart"
click node_product_management "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/product_management.dart"
click node_add_product "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/add_product_page.dart"
click node_edit_product "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/edit_product_page.dart"
click node_order_management "https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/order_management.dart"
click node_product_controller "https://github.com/setsuna25th3/mobile/blob/main/lib/controllers/product_controller.dart"
click node_product_model "https://github.com/setsuna25th3/mobile/blob/main/lib/models/product.dart"
click node_recipient_model "https://github.com/setsuna25th3/mobile/blob/main/lib/models/nguoi_nhan.dart"
click node_product_repository "https://github.com/setsuna25th3/mobile/blob/main/lib/models/product_repository.dart"
click node_supabase "https://github.com/setsuna25th3/mobile/blob/main/lib/services/supabase_service.dart"
click node_auth_storage "https://github.com/setsuna25th3/mobile/blob/main/lib/utils/auth_storage.dart"
click node_configuration "https://github.com/setsuna25th3/mobile/blob/main/lib/config.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_user_entry,node_admin_entry toneBlue
class node_user_auth,node_home,node_detail,node_cart,node_history,node_verification,node_profile toneAmber
class node_admin_auth,node_dashboard,node_product_management,node_add_product,node_edit_product,node_order_management toneMint
class node_product_controller,node_product_model,node_recipient_model,node_product_repository,node_supabase,node_auth_storage,node_configuration toneRose
class node_customer,node_administrator toneIndigo
```

## Components

### App entry

- [User entry point](https://github.com/setsuna25th3/mobile/blob/main/lib/main.dart): `lib/main.dart`
- [Admin entry point](https://github.com/setsuna25th3/mobile/blob/main/lib/main_admin.dart): `lib/main_admin.dart`

### Customer app

- [User authentication](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/auth_screen.dart): `lib/screens/user/auth_screen.dart`
- [Product browsing](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/home_screen.dart): `lib/screens/user/home_screen.dart`
- [Product details](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/detail_screen.dart): `lib/screens/user/detail_screen.dart`
- [Shopping cart](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/cart_screen.dart): `lib/screens/user/cart_screen.dart`
- [Order history](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/order_history_screen.dart): `lib/screens/user/order_history_screen.dart`
- [Verification](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/page_verify.dart): `lib/screens/user/page_verify.dart`
- [User profile](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/user/profile_screen.dart): `lib/screens/user/profile_screen.dart`

### Admin app

- [Admin authentication](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/admin_auth_screen.dart): `lib/screens/admin/admin_auth_screen.dart`
- [Admin dashboard](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/admin_dashboard.dart): `lib/screens/admin/admin_dashboard.dart`
- [Product management](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/product_management.dart): `lib/screens/admin/product_management.dart`
- [Add product](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/add_product_page.dart): `lib/screens/admin/add_product_page.dart`
- [Edit product](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/edit_product_page.dart): `lib/screens/admin/edit_product_page.dart`
- [Order management](https://github.com/setsuna25th3/mobile/blob/main/lib/screens/admin/order_management.dart): `lib/screens/admin/order_management.dart`

### Domain and services

- [Product controller](https://github.com/setsuna25th3/mobile/blob/main/lib/controllers/product_controller.dart): `lib/controllers/product_controller.dart`
- [Product model](https://github.com/setsuna25th3/mobile/blob/main/lib/models/product.dart): `lib/models/product.dart`
- [Recipient model](https://github.com/setsuna25th3/mobile/blob/main/lib/models/nguoi_nhan.dart): `lib/models/nguoi_nhan.dart`
- [Product repository](https://github.com/setsuna25th3/mobile/blob/main/lib/models/product_repository.dart): `lib/models/product_repository.dart`
- [Supabase service](https://github.com/setsuna25th3/mobile/blob/main/lib/services/supabase_service.dart): `lib/services/supabase_service.dart`
- [Auth storage](https://github.com/setsuna25th3/mobile/blob/main/lib/utils/auth_storage.dart): `lib/utils/auth_storage.dart`
- [Configuration](https://github.com/setsuna25th3/mobile/blob/main/lib/config.dart): `lib/config.dart`

### Other components

- **Customer**
- **Administrator**
