# mahmoud-adel-ali/fruit_hub_e_commerce_app architecture

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

- Interactive diagram: https://gitdiagram.com/mahmoud-adel-ali/fruit_hub_e_commerce_app
- Repository: https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app

## Overview

Fruit Hub is a Flutter fruit-shopping app, as indicated by its name and feature structure; the README itself provides no product workflow details. The tree shows onboarding, authentication, product browsing, cart, checkout, orders, and profile capabilities. Source excerpts cover only desktop platform runners, not the Dart runtime, so feature relationships and backend behavior cannot be verified; dashed, uncited edges mark only the likely user journey.

Main entry points: [`lib/core/repos/orders_repo/orders_repo_impl.dart`](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/repos/orders_repo/orders_repo_impl.dart) (Order data access), [`lib/main.dart`](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/main.dart) (App entry), [`lib/fruit_hub_app.dart`](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/fruit_hub_app.dart) (App shell), [`lib/features/home/presentation/views/products_view.dart`](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/home/presentation/views/products_view.dart) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_entry["App entry<br/>[main.dart]"]
  node_shell["App shell<br/>[fruit_hub_app.dart]"]
  node_onboarding["Onboarding"]
  node_firebase["Firebase services"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Sign in and signup<br/>[signin_view.dart]"]
  node_profile["Profile<br/>[profile_view.dart]"]
end

subgraph group_shopping["Product discovery"]
  node_catalog["Product catalog<br/>[products_view.dart]"]
  node_best["Best sellers"]
  node_product_data["Product data access"]
end

subgraph group_purchase["Purchase flow"]
  node_cart["Cart<br/>[cart_view.dart]"]
  node_checkout["Checkout<br/>[checkout_view.dart]"]
  node_order_submit["Order submission"]
end

subgraph group_fulfillment["Order management"]
  node_orders["Order history<br/>[orders_view.dart]"]
  node_order_fetch["Order retrieval"]
  node_order_data["Order data access"]
end

node_customer(("Customer"))

node_customer -.->|"launches"| node_entry
node_entry -.->|"starts"| node_shell
node_shell -.->|"may show"| node_onboarding
node_customer -.->|"authenticates"| node_auth
node_customer -.->|"browses"| node_catalog
node_customer -.->|"views"| node_best
node_catalog -.->|"may load"| node_product_data
node_customer -.->|"manages"| node_cart
node_customer -.->|"checks out"| node_checkout
node_checkout -.->|"may submit"| node_order_submit
node_customer -.->|"views"| node_orders
node_orders -.->|"may request"| node_order_fetch
node_order_fetch -.->|"may query"| node_order_data
node_order_submit -.->|"may save"| node_order_data
node_profile -.->|"may sign out"| node_auth
node_product_data -.->|"may use"| node_firebase
node_order_data -.->|"may use"| node_firebase

click node_entry "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/main.dart"
click node_shell "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/fruit_hub_app.dart"
click node_onboarding "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/on_boarding/presentation/views/on_boarding_view.dart"
click node_auth "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/auth/presentation/views/signin_view.dart"
click node_profile "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/profile/presentation/view/profile_view.dart"
click node_catalog "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/home/presentation/views/products_view.dart"
click node_best "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/best_selling_fruits/presentation/views/best_selling_view.dart"
click node_product_data "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/repos/products_repo/products_repo_impl.dart"
click node_cart "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/cart/presentation/views/cart_view.dart"
click node_checkout "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/checkout/presentation/views/checkout_view.dart"
click node_order_submit "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/checkout/presentation/manager/add_order_cubit.dart/add_order_cubit.dart"
click node_orders "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/orders/presentation/views/orders_view.dart"
click node_order_fetch "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/orders/presentation/manager/fetch_orders_cubit/fetch_orders_cubit.dart"
click node_order_data "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/repos/orders_repo/orders_repo_impl.dart"
click node_firebase "https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/services/firestore_service.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_shell,node_onboarding,node_firebase toneBlue
class node_auth,node_profile toneAmber
class node_catalog,node_best,node_product_data toneMint
class node_cart,node_checkout,node_order_submit toneRose
class node_orders,node_order_fetch,node_order_data,node_customer toneIndigo
```

## Components

### App shell

- [App entry](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/main.dart): `lib/main.dart`
- [App shell](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/fruit_hub_app.dart): `lib/fruit_hub_app.dart`
- [Onboarding](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/on_boarding/presentation/views/on_boarding_view.dart): `lib/features/on_boarding/presentation/views/on_boarding_view.dart`
- [Firebase services](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/services/firestore_service.dart): `lib/core/services/firestore_service.dart`

### Identity and profile

- [Sign in and signup](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/auth/presentation/views/signin_view.dart): `lib/features/auth/presentation/views/signin_view.dart`
- [Profile](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/profile/presentation/view/profile_view.dart): `lib/features/profile/presentation/view/profile_view.dart`

### Product discovery

- [Product catalog](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/home/presentation/views/products_view.dart): `lib/features/home/presentation/views/products_view.dart`
- [Best sellers](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/best_selling_fruits/presentation/views/best_selling_view.dart): `lib/features/best_selling_fruits/presentation/views/best_selling_view.dart`
- [Product data access](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/repos/products_repo/products_repo_impl.dart): `lib/core/repos/products_repo/products_repo_impl.dart`

### Purchase flow

- [Cart](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/cart/presentation/views/cart_view.dart): `lib/features/cart/presentation/views/cart_view.dart`
- [Checkout](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/checkout/presentation/views/checkout_view.dart): `lib/features/checkout/presentation/views/checkout_view.dart`
- [Order submission](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/checkout/presentation/manager/add_order_cubit.dart/add_order_cubit.dart): `lib/features/checkout/presentation/manager/add_order_cubit.dart/add_order_cubit.dart`

### Order management

- [Order history](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/orders/presentation/views/orders_view.dart): `lib/features/orders/presentation/views/orders_view.dart`
- [Order retrieval](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/features/orders/presentation/manager/fetch_orders_cubit/fetch_orders_cubit.dart): `lib/features/orders/presentation/manager/fetch_orders_cubit/fetch_orders_cubit.dart`
- [Order data access](https://github.com/mahmoud-adel-ali/fruit_hub_e_commerce_app/blob/main/lib/core/repos/orders_repo/orders_repo_impl.dart): `lib/core/repos/orders_repo/orders_repo_impl.dart`

### Other components

- **Customer**

## Connections

- Customer → App entry: launches
- App entry → App shell: starts
- App shell → Onboarding: may show
- Customer → Sign in and signup: authenticates
- Customer → Product catalog: browses
- Customer → Best sellers: views
- Product catalog → Product data access: may load
- Customer → Cart: manages
- Customer → Checkout: checks out
- Checkout → Order submission: may submit
- Customer → Order history: views
- Order history → Order retrieval: may request
- Order retrieval → Order data access: may query
- Order submission → Order data access: may save
- Profile → Sign in and signup: may sign out
- Product data access → Firebase services: may use
- Order data access → Firebase services: may use
