# chhengz/elextroshop-app architecture

> Architecture diagram of the GitHub repository chhengz/elextroshop-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/chhengz/elextroshop-app
- Repository: https://github.com/chhengz/elextroshop-app

## Overview

Electro Shop is a Flutter e-commerce app. The main user journey runs from app launch and routed screens through product discovery, cart and checkout, payment, and order history; authentication, wishlist, profile data, and API configuration are supporting capabilities. The README documents these workflows, but the Dart implementation was not sampled, so relationships below reflect documented behavior rather than inspected call sites.

Main entry points: [`lib/routes/pages_route.dart`](https://github.com/chhengz/elextroshop-app/blob/main/lib/routes/pages_route.dart) (Route Table), [`lib/screens/pages/payment_page.dart`](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/payment_page.dart) (Payment Flow), [`lib/screens/pages/home_page.dart`](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/home_page.dart) (Catalog And Search), [`lib/screens/pages/product_detail_page.dart`](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/product_detail_page.dart) (Product Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_entry["App Entry<br/>[main.dart]"]
  node_routes["Route Table<br/>[pages_route.dart]"]
  node_developer["API Console"]
  node_config["API Configuration<br/>[app_config.dart]"]
end

subgraph group_shopping["Shopping"]
  node_catalog_ui["Catalog And Search<br/>[home_page.dart]"]
  node_product["Product Details"]
  node_product_service["Product Data"]
  node_wishlist["Wishlist"]
end

subgraph group_commerce["Checkout And Orders"]
  node_cart["Cart<br/>[cart_page.dart]"]
  node_address["Shipping Address<br/>[address_page.dart]"]
  node_payment["Payment Flow<br/>[payment_page.dart]"]
  node_orders_ui["Order History"]
  node_orders["Order Service<br/>[order_service.dart]"]
end

subgraph group_account["Account And Services"]
  node_auth_ui["Login And Register<br/>[login_page.dart]"]
  node_auth["Authentication<br/>[auth_service.dart]"]
  node_profile["Profile And Preferences"]
end

node_user(("Shopper"))
node_backend[("Backend API")]

node_user -->|"opens"| node_entry
node_entry -->|"starts routing"| node_routes
node_routes -->|"routes to"| node_auth_ui
node_routes -->|"routes to"| node_catalog_ui
node_routes -->|"routes to"| node_product
node_routes -->|"routes to"| node_cart
node_routes -->|"routes to"| node_address
node_routes -->|"routes to"| node_payment
node_routes -->|"routes to"| node_orders_ui
node_routes -->|"routes to"| node_developer
node_auth_ui -->|"authenticates"| node_auth
node_catalog_ui -->|"fetches catalog"| node_product_service
node_catalog_ui -->|"opens products"| node_product
node_product -->|"adds items"| node_cart
node_cart -->|"continues checkout"| node_address
node_address -->|"continues checkout"| node_payment
node_payment -->|"places order"| node_orders
node_orders_ui -->|"fetches history"| node_orders
node_payment -->|"checks approval"| node_backend
node_user -->|"toggles favorites"| node_wishlist
node_user -->|"saves preferences"| node_profile
node_developer -->|"sets API URL"| node_config
node_auth -->|"uses API"| node_backend
node_product_service -->|"uses API"| node_backend
node_orders -->|"uses API"| node_backend

click node_entry "https://github.com/chhengz/elextroshop-app/blob/main/lib/main.dart"
click node_routes "https://github.com/chhengz/elextroshop-app/blob/main/lib/routes/pages_route.dart"
click node_auth_ui "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/auth/login_page.dart"
click node_auth "https://github.com/chhengz/elextroshop-app/blob/main/lib/services/auth_service.dart"
click node_catalog_ui "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/home_page.dart"
click node_product "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/product_detail_page.dart"
click node_product_service "https://github.com/chhengz/elextroshop-app/blob/main/lib/services/product_service.dart"
click node_cart "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/cart_page.dart"
click node_address "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/address_page.dart"
click node_payment "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/payment_page.dart"
click node_orders_ui "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/my_orders_page.dart"
click node_orders "https://github.com/chhengz/elextroshop-app/blob/main/lib/services/order_service.dart"
click node_wishlist "https://github.com/chhengz/elextroshop-app/blob/main/lib/services/wishlist_service.dart"
click node_profile "https://github.com/chhengz/elextroshop-app/blob/main/lib/services/user_data_service.dart"
click node_developer "https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/developer_api_page.dart"
click node_config "https://github.com/chhengz/elextroshop-app/blob/main/lib/config/app_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_entry,node_routes,node_developer,node_config toneBlue
class node_catalog_ui,node_product,node_product_service,node_wishlist,node_backend toneAmber
class node_cart,node_address,node_payment,node_orders_ui,node_orders toneMint
class node_auth_ui,node_auth,node_profile toneRose
class node_user toneIndigo
```

## Components

### App Shell

- [App Entry](https://github.com/chhengz/elextroshop-app/blob/main/lib/main.dart): `lib/main.dart`
- [Route Table](https://github.com/chhengz/elextroshop-app/blob/main/lib/routes/pages_route.dart): `lib/routes/pages_route.dart`
- [API Console](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/developer_api_page.dart): `lib/screens/pages/developer_api_page.dart`
- [API Configuration](https://github.com/chhengz/elextroshop-app/blob/main/lib/config/app_config.dart): `lib/config/app_config.dart`

### Shopping

- [Catalog And Search](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/home_page.dart): `lib/screens/pages/home_page.dart`
- [Product Details](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/product_detail_page.dart): `lib/screens/pages/product_detail_page.dart`
- [Product Data](https://github.com/chhengz/elextroshop-app/blob/main/lib/services/product_service.dart): `lib/services/product_service.dart`
- [Wishlist](https://github.com/chhengz/elextroshop-app/blob/main/lib/services/wishlist_service.dart): `lib/services/wishlist_service.dart`

### Checkout And Orders

- [Cart](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/cart_page.dart): `lib/screens/pages/cart_page.dart`
- [Shipping Address](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/address_page.dart): `lib/screens/pages/address_page.dart`
- [Payment Flow](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/payment_page.dart): `lib/screens/pages/payment_page.dart`
- [Order History](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/pages/my_orders_page.dart): `lib/screens/pages/my_orders_page.dart`
- [Order Service](https://github.com/chhengz/elextroshop-app/blob/main/lib/services/order_service.dart): `lib/services/order_service.dart`

### Account And Services

- [Login And Register](https://github.com/chhengz/elextroshop-app/blob/main/lib/screens/auth/login_page.dart): `lib/screens/auth/login_page.dart`
- [Authentication](https://github.com/chhengz/elextroshop-app/blob/main/lib/services/auth_service.dart): `lib/services/auth_service.dart`
- [Profile And Preferences](https://github.com/chhengz/elextroshop-app/blob/main/lib/services/user_data_service.dart): `lib/services/user_data_service.dart`

### Other components

- **Shopper**
- **Backend API**

## Connections

- Shopper → App Entry: opens (evidence: `README.md`)
- App Entry → Route Table: starts routing (evidence: `README.md`)
- Route Table → Login And Register: routes to (evidence: `README.md`)
- Route Table → Catalog And Search: routes to (evidence: `README.md`)
- Route Table → Product Details: routes to (evidence: `README.md`)
- Route Table → Cart: routes to (evidence: `README.md`)
- Route Table → Shipping Address: routes to (evidence: `README.md`)
- Route Table → Payment Flow: routes to (evidence: `README.md`)
- Route Table → Order History: routes to (evidence: `README.md`)
- Route Table → API Console: routes to (evidence: `README.md`)
- Login And Register → Authentication: authenticates (evidence: `README.md`)
- Catalog And Search → Product Data: fetches catalog (evidence: `README.md`)
- Catalog And Search → Product Details: opens products (evidence: `README.md`)
- Product Details → Cart: adds items (evidence: `README.md`)
- Cart → Shipping Address: continues checkout (evidence: `README.md`)
- Shipping Address → Payment Flow: continues checkout (evidence: `README.md`)
- Payment Flow → Order Service: places order (evidence: `README.md`)
- Order History → Order Service: fetches history (evidence: `README.md`)
- Payment Flow → Backend API: checks approval (evidence: `README.md`)
- Shopper → Wishlist: toggles favorites (evidence: `README.md`)
- Shopper → Profile And Preferences: saves preferences (evidence: `README.md`)
- API Console → API Configuration: sets API URL (evidence: `README.md`)
- Authentication → Backend API: uses API (evidence: `README.md`)
- Product Data → Backend API: uses API (evidence: `README.md`)
- Order Service → Backend API: uses API (evidence: `README.md`)
