# moabozeed/e_commerce architecture

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

- Interactive diagram: https://gitdiagram.com/moabozeed/e_commerce
- Repository: https://github.com/moabozeed/e_commerce

## Overview

This is a Flutter ecommerce app. The customer workflow is authentication, product browsing and detail viewing, cart management, then checkout; the README also lists order history. The tree shows dedicated auth, product, and cart layers, but their Dart sources were not sampled, so internal call relationships are left unverified. Admin dashboard and management capabilities are documented in the README, but no corresponding implementation path appears in the tree.

Main entry points: [`lib/features/auth/data/repository/auth_repository_impl.dart`](https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/repository/auth_repository_impl.dart) (Auth repository), [`lib/features/products/data/repository/product_repository_impl.dart`](https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/data/repository/product_repository_impl.dart) (Product repository), [`lib/features/cart/presentation/page/cart_page.dart`](https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/page/cart_page.dart) (Cart screen), [`lib/core`](https://github.com/moabozeed/e_commerce/tree/main/lib/core) (Shared services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry"]
  node_entry["Flutter entry<br/>[main.dart]"]
end

subgraph group_auth["Authentication"]
  node_auth_ui["Auth screens"]
  node_auth_bloc["Auth state<br/>[auth_bloc.dart]"]
  node_auth_cases["Auth use cases"]
  node_auth_repo["Auth repository"]
  node_auth_remote["Remote auth"]
  node_auth_local["Local auth"]
end

subgraph group_catalog["Product catalog"]
  node_product_ui["Product screens"]
  node_product_state["Product state<br/>[product_bloc.dart]"]
  node_product_case["Product retrieval"]
  node_product_repo["Product repository"]
  node_product_remote["Remote products"]
end

subgraph group_cart["Cart and checkout"]
  node_cart_ui["Cart screen<br/>[cart_page.dart]"]
  node_cart_state["Cart state<br/>[cart_bloc.dart]"]
  node_cart_cases["Cart operations"]
  node_cart_repo["Cart repository"]
  node_checkout["Checkout process"]
  node_orders["Order history"]
end

subgraph group_platform["Shared infrastructure"]
  node_shared["Shared services"]
end

node_customer(("Customer"))
node_admin["Admin capabilities"]

node_customer -.->|"opens app"| node_entry
node_entry -.->|"routes to"| node_auth_ui
node_auth_ui -.->|"dispatches"| node_auth_bloc
node_auth_bloc -.->|"invokes"| node_auth_cases
node_auth_cases -.->|"delegates"| node_auth_repo
node_auth_repo -.->|"uses"| node_auth_remote
node_auth_repo -.->|"uses"| node_auth_local
node_customer -.->|"browses"| node_product_ui
node_product_ui -.->|"dispatches"| node_product_state
node_product_state -.->|"invokes"| node_product_case
node_product_case -.->|"delegates"| node_product_repo
node_product_repo -.->|"uses"| node_product_remote
node_customer -.->|"manages cart"| node_cart_ui
node_cart_ui -.->|"dispatches"| node_cart_state
node_cart_state -.->|"invokes"| node_cart_cases
node_cart_cases -.->|"delegates"| node_cart_repo
node_cart_ui -.->|"presents"| node_checkout
node_customer -.->|"views history"| node_orders
node_customer -.->|"uses admin app"| node_admin
node_auth_repo -.->|"may use"| node_shared
node_product_repo -.->|"may use"| node_shared
node_cart_repo -.->|"may use"| node_shared

click node_entry "https://github.com/moabozeed/e_commerce/blob/main/lib/main.dart"
click node_auth_ui "https://github.com/moabozeed/e_commerce/tree/main/lib/features/auth/presentation/pages"
click node_auth_bloc "https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/presentation/bloc/auth_bloc.dart"
click node_auth_cases "https://github.com/moabozeed/e_commerce/tree/main/lib/features/auth/domain/usecases"
click node_auth_repo "https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/repository/auth_repository_impl.dart"
click node_auth_remote "https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/datasource/remote/auth_remote_datasource_impl.dart"
click node_auth_local "https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/datasource/local/auth_local_data_source_impl.dart"
click node_product_ui "https://github.com/moabozeed/e_commerce/tree/main/lib/features/products/presentation/pages"
click node_product_state "https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/presentation/controller/product_bloc.dart"
click node_product_case "https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/domain/usecase/get_product_usecase.dart"
click node_product_repo "https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/data/repository/product_repository_impl.dart"
click node_product_remote "https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/data/datasource/product_remote_data_source.dart"
click node_cart_ui "https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/page/cart_page.dart"
click node_cart_state "https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/bloc/cart_bloc.dart"
click node_cart_cases "https://github.com/moabozeed/e_commerce/tree/main/lib/features/cart/domain/usecase"
click node_cart_repo "https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/data/repository/cart_repository_impl.dart"
click node_checkout "https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/widget/cart_checkout_section.dart"
click node_shared "https://github.com/moabozeed/e_commerce/tree/main/lib/core"

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 toneBlue
class node_auth_ui,node_auth_bloc,node_auth_cases,node_auth_repo,node_auth_remote,node_auth_local toneAmber
class node_product_ui,node_product_state,node_product_case,node_product_repo,node_product_remote toneMint
class node_cart_ui,node_cart_state,node_cart_cases,node_cart_repo,node_checkout,node_orders toneRose
class node_shared,node_customer,node_admin toneIndigo
```

## Components

### App entry

- [Flutter entry](https://github.com/moabozeed/e_commerce/blob/main/lib/main.dart): `lib/main.dart`

### Authentication

- [Auth screens](https://github.com/moabozeed/e_commerce/tree/main/lib/features/auth/presentation/pages): `lib/features/auth/presentation/pages`
- [Auth state](https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/presentation/bloc/auth_bloc.dart): `lib/features/auth/presentation/bloc/auth_bloc.dart`
- [Auth use cases](https://github.com/moabozeed/e_commerce/tree/main/lib/features/auth/domain/usecases): `lib/features/auth/domain/usecases`
- [Auth repository](https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/repository/auth_repository_impl.dart): `lib/features/auth/data/repository/auth_repository_impl.dart`
- [Remote auth](https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/datasource/remote/auth_remote_datasource_impl.dart): `lib/features/auth/data/datasource/remote/auth_remote_datasource_impl.dart`
- [Local auth](https://github.com/moabozeed/e_commerce/blob/main/lib/features/auth/data/datasource/local/auth_local_data_source_impl.dart): `lib/features/auth/data/datasource/local/auth_local_data_source_impl.dart`

### Product catalog

- [Product screens](https://github.com/moabozeed/e_commerce/tree/main/lib/features/products/presentation/pages): `lib/features/products/presentation/pages`
- [Product state](https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/presentation/controller/product_bloc.dart): `lib/features/products/presentation/controller/product_bloc.dart`
- [Product retrieval](https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/domain/usecase/get_product_usecase.dart): `lib/features/products/domain/usecase/get_product_usecase.dart`
- [Product repository](https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/data/repository/product_repository_impl.dart): `lib/features/products/data/repository/product_repository_impl.dart`
- [Remote products](https://github.com/moabozeed/e_commerce/blob/main/lib/features/products/data/datasource/product_remote_data_source.dart): `lib/features/products/data/datasource/product_remote_data_source.dart`

### Cart and checkout

- [Cart screen](https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/page/cart_page.dart): `lib/features/cart/presentation/page/cart_page.dart`
- [Cart state](https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/bloc/cart_bloc.dart): `lib/features/cart/presentation/bloc/cart_bloc.dart`
- [Cart operations](https://github.com/moabozeed/e_commerce/tree/main/lib/features/cart/domain/usecase): `lib/features/cart/domain/usecase`
- [Cart repository](https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/data/repository/cart_repository_impl.dart): `lib/features/cart/data/repository/cart_repository_impl.dart`
- [Checkout process](https://github.com/moabozeed/e_commerce/blob/main/lib/features/cart/presentation/widget/cart_checkout_section.dart): `lib/features/cart/presentation/widget/cart_checkout_section.dart`
- **Order history**

### Shared infrastructure

- [Shared services](https://github.com/moabozeed/e_commerce/tree/main/lib/core): `lib/core`

### Other components

- **Customer**
- **Admin capabilities**

## Connections

- Customer → Flutter entry: opens app
- Flutter entry → Auth screens: routes to
- Auth screens → Auth state: dispatches
- Auth state → Auth use cases: invokes
- Auth use cases → Auth repository: delegates
- Auth repository → Remote auth: uses
- Auth repository → Local auth: uses
- Customer → Product screens: browses
- Product screens → Product state: dispatches
- Product state → Product retrieval: invokes
- Product retrieval → Product repository: delegates
- Product repository → Remote products: uses
- Customer → Cart screen: manages cart
- Cart screen → Cart state: dispatches
- Cart state → Cart operations: invokes
- Cart operations → Cart repository: delegates
- Cart screen → Checkout process: presents
- Customer → Order history: views history (evidence: `README.md`)
- Customer → Admin capabilities: uses admin app (evidence: `README.md`)
- Auth repository → Shared services: may use
- Product repository → Shared services: may use
- Cart repository → Shared services: may use
