# ashrafcharlie/e-commerce-app architecture

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

- Interactive diagram: https://gitdiagram.com/ashrafcharlie/e-commerce-app
- Repository: https://github.com/ashrafcharlie/e-commerce-app

## Overview

This is a cross-platform Flutter e-commerce app. Its main user journey spans authentication, catalog and category browsing, cart and wishlist management, checkout, and order viewing, with profile access alongside it. The README documents BLoC, Clean Architecture, Firebase, and DummyJSON; the tree supports the feature paths below. Dart implementation excerpts were not provided, so internal call wiring is not inferred beyond documented integration responsibilities.

Main entry points: [`lib/features/auth/data`](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/data) (Auth data layer), [`lib/main.dart`](https://github.com/ashrafcharlie/e-commerce-app/blob/main/lib/main.dart) (App entry), [`lib/features/product/data`](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/product/data) (Product data layer), [`lib/features/auth/presentation/screens`](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/presentation/screens) (Login and signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App presentation"]
  node_entry["App entry<br/>[main.dart]"]
  node_auth["Login and signup"]
  node_home["Home and discovery"]
  node_profile["User profile"]
end

subgraph group_commerce["Commerce features"]
  node_catalog["Product browsing"]
  node_categories["Category filtering"]
  node_cart["Cart management"]
  node_wishlist["Wishlist"]
  node_checkout["Checkout"]
  node_orders["Order management"]
end

subgraph group_data["Data and services"]
  node_auth_data["Auth data layer"]
  node_product_data["Product data layer"]
  node_category_data["Category data layer"]
  node_cart_data["Cart data layer"]
  node_wishlist_data["Wishlist data layer"]
  node_order_data["Order data layer"]
end

subgraph group_foundation["Shared foundation"]
  node_shared["Shared utilities"]
end

node_shopper(("Shopper"))
node_firebase_auth["Firebase Authentication"]
node_firestore[("Cloud Firestore")]
node_dummyjson["DummyJSON API"]

node_shopper -->|"opens"| node_entry
node_entry -->|"starts app"| node_auth
node_shopper -->|"browses"| node_home
node_shopper -->|"searches"| node_catalog
node_shopper -->|"filters"| node_categories
node_shopper -->|"manages cart"| node_cart
node_shopper -->|"manages wishlist"| node_wishlist
node_shopper -->|"checks out"| node_checkout
node_shopper -->|"views orders"| node_orders
node_shopper -->|"views profile"| node_profile
node_auth_data -->|"authenticates"| node_firebase_auth
node_auth_data -->|"uses"| node_firestore
node_product_data -->|"fetches products"| node_dummyjson

click node_entry "https://github.com/ashrafcharlie/e-commerce-app/blob/main/lib/main.dart"
click node_auth "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/presentation/screens"
click node_home "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/home/presentation/screens"
click node_profile "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/profile/presentation/screen"
click node_catalog "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/product/presentation/screen"
click node_categories "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/category/presentation"
click node_cart "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/cart/presentation/screen"
click node_wishlist "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/wishlist/presentation/screen"
click node_checkout "https://github.com/ashrafcharlie/e-commerce-app/blob/main/lib/features/checkout/presentation/screens/checkout_screen.dart"
click node_orders "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/order/presentation/screens"
click node_auth_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/data"
click node_product_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/product/data"
click node_category_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/category/data"
click node_cart_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/cart/data"
click node_wishlist_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/wishlist/data"
click node_order_data "https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/order/data"
click node_shared "https://github.com/ashrafcharlie/e-commerce-app/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,node_auth,node_home,node_profile toneBlue
class node_catalog,node_categories,node_cart,node_wishlist,node_checkout,node_orders,node_firestore toneAmber
class node_auth_data,node_product_data,node_category_data,node_cart_data,node_wishlist_data,node_order_data,node_dummyjson toneMint
class node_shared toneRose
class node_shopper,node_firebase_auth toneIndigo
```

## Components

### App presentation

- [App entry](https://github.com/ashrafcharlie/e-commerce-app/blob/main/lib/main.dart): `lib/main.dart`
- [Login and signup](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/presentation/screens): `lib/features/auth/presentation/screens`
- [Home and discovery](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/home/presentation/screens): `lib/features/home/presentation/screens`
- [User profile](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/profile/presentation/screen): `lib/features/profile/presentation/screen`

### Commerce features

- [Product browsing](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/product/presentation/screen): `lib/features/product/presentation/screen`
- [Category filtering](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/category/presentation): `lib/features/category/presentation`
- [Cart management](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/cart/presentation/screen): `lib/features/cart/presentation/screen`
- [Wishlist](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/wishlist/presentation/screen): `lib/features/wishlist/presentation/screen`
- [Checkout](https://github.com/ashrafcharlie/e-commerce-app/blob/main/lib/features/checkout/presentation/screens/checkout_screen.dart): `lib/features/checkout/presentation/screens/checkout_screen.dart`
- [Order management](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/order/presentation/screens): `lib/features/order/presentation/screens`

### Data and services

- [Auth data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/auth/data): `lib/features/auth/data`
- [Product data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/product/data): `lib/features/product/data`
- [Category data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/category/data): `lib/features/category/data`
- [Cart data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/cart/data): `lib/features/cart/data`
- [Wishlist data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/wishlist/data): `lib/features/wishlist/data`
- [Order data layer](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/features/order/data): `lib/features/order/data`

### Shared foundation

- [Shared utilities](https://github.com/ashrafcharlie/e-commerce-app/tree/main/lib/core): `lib/core`

### Other components

- **Shopper**
- **Firebase Authentication**
- **Cloud Firestore**
- **DummyJSON API**

## Connections

- Shopper → App entry: opens
- App entry → Login and signup: starts app
- Shopper → Home and discovery: browses
- Shopper → Product browsing: searches
- Shopper → Category filtering: filters
- Shopper → Cart management: manages cart
- Shopper → Wishlist: manages wishlist
- Shopper → Checkout: checks out
- Shopper → Order management: views orders
- Shopper → User profile: views profile
- Auth data layer → Firebase Authentication: authenticates
- Auth data layer → Cloud Firestore: uses
- Product data layer → DummyJSON API: fetches products
