# webaddicted/e-commerce-disinfectant architecture

> Architecture diagram of the GitHub repository webaddicted/e-commerce-disinfectant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webaddicted/e-commerce-disinfectant
- Repository: https://github.com/webaddicted/e-commerce-disinfectant

## Overview

1. This is a Flutter client application named **E-Commerce-Disinfectant**. The same Dart codebase targets **Android, iOS, and Web**, while the `android/`, `ios/`, and `web/` folders are the platform shells and launch/configuration wrappers around the shared Flutter app.

2. The app entry point is `lib/main.dart`, with startup wiring likely handled through `lib/utils/common/initial_binding.dart` and the route constants in `lib/utils/constant/routers_const.dart` / `routes_page.dart`. The overall flow appears to start with **splash/onboarding**, then move into **login**, then the main **home** experience.

3. The presentation layer is organized by feature under `lib/view/`. Each major screen has its own page file: `splash`, `login`, `home`, `order`, `details`, `profile/setting`, `notification`, `wallet`, `survey`, `complaint`, and `list`. This makes the app mostly **feature-driven** rather than layered by UI type alone.

4. Reusable UI pieces live in `lib/view/widget/` and are shared across feature screens. These include list/grid tiles, category chips, banner cards, rating display, and carousel dots, which suggests the home and catalog areas are built from composable product and category widgets.

5. Application state and screen logic are separated into `lib/controller/`. There are controllers for `home`, `login`, and a shared `base_controller`, which strongly suggests a controller-based state management pattern where pages render UI and controllers manage data loading, user actions, and navigation side effects.

6. Data access is split into a small repository layer in `lib/data/repo/`. `base_repo.dart`, `home_repo.dart`, and `login_repo.dart` isolate data-fetching and persistence operations from UI code. This is the main boundary between screen logic and underlying data sources.

7. The data models under `lib/data/common/` represent the app’s core entities: `user_info`, `category_bean`, and `task_item`. These are likely the objects passed between repositories, controllers, and widgets for login state, catalog/category presentation, and task/order-style list content.

8. Networking and remote integration are centralized in `lib/utils/apiutils/`, with `api_base_helper.dart` and `api_response.dart`. The presence of a DIO-based helper in the README means the app is prepared for API-backed flows, even though the repo also contains substantial UI/demo content and dummy data.

9. Local persistence is handled through `lib/utils/sp/` using shared preferences helpers and a manager/service split. This is where app-level state such as login/session data, onboarding flags, or cached preferences would be stored and read across launches.

10. Shared cross-cutting utilities sit in `lib/utils/common/`, including validation, widget helpers, and global utilities. Together with `lib/utils/theme/` and the constant files in `lib/utils/constant/`, this forms the app’s design and behavior layer: colors, strings, assets, routes, preference keys, and dummy content.

11. The app appears to be a retail/catalog experience with multiple user journeys: browsing categories, viewing details, cart/order flow, address entry, profile settings, notifications, wallet, surveys, and complaints. The README screenshots match that structure, so a diagram should show a central commerce/navigation hub branching into those feature modules.

12. Assets are bundled locally under `assets/fonts` and `assets/images`, and the UI depends on them for branding and product imagery. There is also a prebuilt `apk/app.apk` artifact in the repo, indicating the project is distributed with a packaged Android build in addition to source.

13. The repository includes CI/testing scaffolding: `.github/workflows/dart.yml` for Dart/Flutter automation and `test/widget_test.dart` for basic widget coverage. The native Android/iOS projects are standard Flutter host projects, mostly infrastructure rather than business-logic owners.

Main entry points: [`lib/view/home`](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/home) (Home hub), [`lib/main.dart`](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/main.dart) (Main), [`lib/utils/constant/routes_page.dart`](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/constant/routes_page.dart) (Routes), [`lib/utils/common/initial_binding.dart`](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/common/initial_binding.dart) (Initial binding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["Flutter app"]
end

subgraph group_group_domain["App layers"]
  node_node_main["Main<br/>entrypoint<br/>[main.dart]"]
  node_node_binding["Initial binding<br/>startup"]
  node_node_routes["Routes<br/>navigation<br/>[routes_page.dart]"]
  node_node_constants["App constants<br/>config"]
  node_node_theme["Theme<br/>ui-styles"]
  node_node_utils["Shared utils<br/>helpers"]
  node_node_sp[("Prefs store<br/>storage")]
  node_node_api["API layer<br/>networking"]
  node_node_base_controller["Base controller<br/>state"]
  node_node_home_controller["Home controller<br/>state"]
  node_node_login_controller["Login controller<br/>state"]
  node_node_base_repo["Base repo<br/>data-access<br/>[base_repo.dart]"]
  node_node_home_repo["Home repo<br/>data-access<br/>[home_repo.dart]"]
  node_node_login_repo["Login repo<br/>data-access<br/>[login_repo.dart]"]
  node_node_models["Core models<br/>entities"]
  node_node_splash["Splash flow<br/>feature"]
  node_node_login["Auth flow<br/>feature"]
  node_node_home["Home hub<br/>feature"]
  node_node_order["Order flow<br/>feature"]
  node_node_details["Product details<br/>feature"]
  node_node_profile["Profile<br/>feature"]
  node_node_notification["Notifications<br/>feature"]
  node_node_wallet["Wallet<br/>feature"]
  node_node_survey["Survey<br/>feature"]
  node_node_complaint["Complaint<br/>feature"]
  node_node_list["Lists<br/>feature"]
  node_node_widgets["Shared widgets<br/>ui-components"]
end

subgraph group_group_platform["Platform & assets"]
  node_node_android["Android host<br/>platform-shell"]
  node_node_ios["iOS host<br/>platform-shell"]
  node_node_web["Web host<br/>platform-shell"]
  node_node_assets["Assets<br/>media"]
  node_node_apk[("APK artifact<br/>build-output<br/>[app.apk]")]
  node_node_ci["CI workflow<br/>automation<br/>[dart.yml]"]
end

node_node_main -->|"initializes"| node_node_binding
node_node_main -->|"uses"| node_node_routes
node_node_main -->|"applies"| node_node_theme
node_node_main -->|"launches"| node_node_splash
node_node_binding -->|"sets up"| node_node_sp
node_node_binding -->|"wires"| node_node_api
node_node_routes -->|"routes to"| node_node_splash
node_node_routes -->|"routes to"| node_node_login
node_node_routes -->|"routes to"| node_node_home
node_node_home -->|"composes"| node_node_widgets
node_node_home -->|"driven by"| node_node_home_controller
node_node_login -->|"driven by"| node_node_login_controller
node_node_home_controller -->|"loads from"| node_node_home_repo
node_node_login_controller -->|"loads from"| node_node_login_repo
node_node_home_repo -->|"calls"| node_node_api
node_node_login_repo -->|"calls"| node_node_api
node_node_home_repo -->|"caches"| node_node_sp
node_node_login_repo -->|"caches"| node_node_sp
node_node_home -->|"navigates to"| node_node_order
node_node_home -->|"navigates to"| node_node_details
node_node_home -->|"navigates to"| node_node_profile
node_node_home -->|"navigates to"| node_node_notification
node_node_home -->|"navigates to"| node_node_wallet
node_node_home -->|"navigates to"| node_node_survey
node_node_home -->|"navigates to"| node_node_complaint
node_node_home -->|"navigates to"| node_node_list
node_node_order -->|"uses"| node_node_models
node_node_details -->|"uses"| node_node_models
node_node_widgets -->|"renders"| node_node_models
node_node_utils -->|"reads"| node_node_constants
node_node_ci -.->|"verifies"| node_node_main
node_node_android -->|"hosts"| node_node_main
node_node_ios -->|"hosts"| node_node_main
node_node_web -->|"hosts"| node_node_main
node_node_assets -->|"supplies"| node_node_widgets
node_node_apk -.->|"builds for"| node_node_android

click node_node_main "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/main.dart"
click node_node_binding "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/common/initial_binding.dart"
click node_node_routes "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/constant/routes_page.dart"
click node_node_constants "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/constant"
click node_node_theme "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/theme"
click node_node_utils "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/common"
click node_node_sp "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/sp"
click node_node_api "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/apiutils"
click node_node_base_controller "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/base_controller.dart"
click node_node_home_controller "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/home_controller.dart"
click node_node_login_controller "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/login_controller.dart"
click node_node_base_repo "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/base_repo.dart"
click node_node_home_repo "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/home_repo.dart"
click node_node_login_repo "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/login_repo.dart"
click node_node_models "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/data/common"
click node_node_splash "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/splash"
click node_node_login "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/login"
click node_node_home "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/home"
click node_node_order "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/order"
click node_node_details "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/details"
click node_node_profile "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/setting"
click node_node_notification "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/notification"
click node_node_wallet "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/wallet"
click node_node_survey "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/survey"
click node_node_complaint "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/complaint"
click node_node_list "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/list"
click node_node_widgets "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/widget"
click node_node_android "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/android"
click node_node_ios "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/ios"
click node_node_web "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/web"
click node_node_assets "https://github.com/webaddicted/e-commerce-disinfectant/tree/main/assets"
click node_node_apk "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/apk/app.apk"
click node_node_ci "https://github.com/webaddicted/e-commerce-disinfectant/blob/main/.github/workflows/dart.yml"

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_node_main,node_node_binding,node_node_routes,node_node_constants,node_node_theme,node_node_utils,node_node_sp,node_node_api,node_node_base_controller,node_node_home_controller,node_node_login_controller,node_node_base_repo,node_node_home_repo,node_node_login_repo,node_node_models,node_node_splash,node_node_login,node_node_home,node_node_order,node_node_details,node_node_profile,node_node_notification,node_node_wallet,node_node_survey,node_node_complaint,node_node_list,node_node_widgets toneAmber
class node_node_android,node_node_ios,node_node_web,node_node_assets,node_node_apk,node_node_ci toneMint
```

## Components

### App layers

Entry, state, data, utilities, and presentation

- [Main](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/main.dart): entrypoint · Flutter app bootstrap and startup wiring · `lib/main.dart`
- [Initial binding](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/common/initial_binding.dart): startup · App initialization and dependency setup · `lib/utils/common/initial_binding.dart`
- [Routes](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/utils/constant/routes_page.dart): navigation · Route names and page registry · `lib/utils/constant/routes_page.dart`
- [App constants](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/constant): config · Assets, strings, colors, prefs, and dummy data · `lib/utils/constant`
- [Theme](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/theme): ui-styles · Shared theme and text styling · `lib/utils/theme`
- [Shared utils](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/common): helpers · Validation, widget helpers, and global utilities · `lib/utils/common`
- [Prefs store](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/sp): storage · Shared preferences helpers and persistence manager · `lib/utils/sp`
- [API layer](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/utils/apiutils): networking · Remote request helper and response wrapper · `lib/utils/apiutils`
- [Base controller](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/base_controller.dart): state · Shared controller behavior and common screen logic · `lib/controller/base_controller.dart`
- [Home controller](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/home_controller.dart): state · State and actions for the home experience · `lib/controller/home_controller.dart`
- [Login controller](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/controller/login_controller.dart): state · State and actions for authentication flows · `lib/controller/login_controller.dart`
- [Base repo](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/base_repo.dart): data-access · Common repository abstraction · `lib/data/repo/base_repo.dart`
- [Home repo](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/home_repo.dart): data-access · Data access for catalog and home features · `lib/data/repo/home_repo.dart`
- [Login repo](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/lib/data/repo/login_repo.dart): data-access · Data access for authentication and session flows · `lib/data/repo/login_repo.dart`
- [Core models](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/data/common): entities · User, category, and task/order data objects · `lib/data/common`
- [Splash flow](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/splash): feature · Launch and onboarding screens · `lib/view/splash`
- [Auth flow](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/login): feature · Login, signup, OTP, and password recovery screens · `lib/view/login`
- [Home hub](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/home): feature · Main browsing and navigation surface · `lib/view/home`
- [Order flow](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/order): feature · Category, cart, address, and order history screens · `lib/view/order`
- [Product details](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/details): feature · Item detail view · `lib/view/details`
- [Profile](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/setting): feature · Profile and settings screen · `lib/view/setting`
- [Notifications](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/notification): feature · Notification center screen · `lib/view/notification`
- [Wallet](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/wallet): feature · Wallet and payment balance screen · `lib/view/wallet`
- [Survey](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/survey): feature · Survey and feedback screen · `lib/view/survey`
- [Complaint](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/complaint): feature · Complaint submission screen · `lib/view/complaint`
- [Lists](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/list): feature · List and photo listing screens · `lib/view/list`
- [Shared widgets](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/lib/view/widget): ui-components · Reusable banners, category chips, grids, ratings, and carousel dots · `lib/view/widget`

### Platform & assets

Native wrappers, bundled assets, and build artifacts

- [Android host](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/android): platform-shell · Native Android wrapper and launch configuration · `android`
- [iOS host](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/ios): platform-shell · Native iOS wrapper and launch configuration · `ios`
- [Web host](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/web): platform-shell · Web entry and manifest shell · `web`
- [Assets](https://github.com/webaddicted/e-commerce-disinfectant/tree/main/assets): media · Bundled fonts and images · `assets`
- [APK artifact](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/apk/app.apk): build-output · Prebuilt Android package · `apk/app.apk`
- [CI workflow](https://github.com/webaddicted/e-commerce-disinfectant/blob/main/.github/workflows/dart.yml): automation · Dart/Flutter workflow automation · `.github/workflows/dart.yml`

## Connections

- Main → Initial binding: initializes · Bootstraps app services before rendering
- Main → Routes: uses · Starts navigation from route registry
- Main → Theme: applies · Configures shared visual styling
- Main → Splash flow: launches · Entry flow begins at splash/onboarding
- Initial binding → Prefs store: sets up · Initializes persistent app state
- Initial binding → API layer: wires · Prepares networking helpers
- Routes → Splash flow: routes to · Navigation starts with splash flow
- Routes → Auth flow: routes to · Authentication screens are reachable via routes
- Routes → Home hub: routes to · Main commerce hub is a key destination
- Home hub → Shared widgets: composes · Uses reusable catalog and banner widgets
- Home hub → Home controller: driven by · Home state and actions come from controller
- Auth flow → Login controller: driven by · Login and signup logic is controller-backed
- Home controller → Home repo: loads from · Fetches home and catalog data
- Login controller → Login repo: loads from · Handles auth-related data operations
- Home repo → API layer: calls · Uses network helper for remote access
- Login repo → API layer: calls · Uses network helper for remote access
- Home repo → Prefs store: caches · Can persist session or app state locally
- Login repo → Prefs store: caches · Stores auth/session preferences locally
- Home hub → Order flow: navigates to · Home branches into shopping and order flows
- Home hub → Product details: navigates to · Product browsing opens detail view
- Home hub → Profile: navigates to · Home links to profile/settings
- Home hub → Notifications: navigates to · Home links to notifications
- Home hub → Wallet: navigates to · Home links to wallet
- Home hub → Survey: navigates to · Home links to surveys
- Home hub → Complaint: navigates to · Home links to complaints
- Home hub → Lists: navigates to · Home links to listing screens
- Order flow → Core models: uses · Order and category content rely on shared entities
- Product details → Core models: uses · Details render data from shared entities
- Shared widgets → Core models: renders · Widgets present categories, tasks, and product data
- Shared utils → App constants: reads · Helpers depend on shared constants and keys
- CI workflow → Main: verifies · Workflow covers app build and tests
- Android host → Main: hosts · Android shell launches the Flutter app
- iOS host → Main: hosts · iOS shell launches the Flutter app
- Web host → Main: hosts · Web shell launches the Flutter app
- Assets → Shared widgets: supplies · UI widgets consume bundled images and fonts
- APK artifact → Android host: builds for · Packaged Android artifact
