# mahmoud-adel-4459/elwady architecture

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

- Interactive diagram: https://gitdiagram.com/mahmoud-adel-4459/elwady
- Repository: https://github.com/mahmoud-adel-4459/elwady

## Overview

Al-Wady is a Flutter storefront for fresh meat and whole-carcass products. Its intended customer journey covers onboarding, phone-based OTP authentication, browsing, cart and checkout, then order confirmation and tracking; account, location, and notifications are additional product areas. README documents guest access, country selection, and first-time profile completion. Source excerpts do not include the Dart runtime, so screen-to-screen wiring and data interactions are shown only as unverified dashed links, not asserted calls.

Main entry points: [`lib/screens/main_navigation_screen.dart`](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/main_navigation_screen.dart) (Main navigation), [`lib/screens/home_screen.dart`](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/home_screen.dart) (Home), [`lib/screens/product_details_screen.dart`](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/product_details_screen.dart) (Product details), [`lib/screens/cart_screen.dart`](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/cart_screen.dart) (Cart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["Flutter app<br/>[main.dart]"]
  node_navigation["Main navigation"]
end

subgraph group_identity["Customer access"]
  node_onboarding["Onboarding"]
  node_login["Phone login<br/>[login_screen.dart]"]
  node_otp["OTP verification<br/>[otp_screen.dart]"]
  node_countries["Country selection<br/>[country.dart]"]
  node_profile_setup["Profile setup"]
end

subgraph group_shopping["Shopping"]
  node_home["Home<br/>[home_screen.dart]"]
  node_categories["Categories"]
  node_product["Product details"]
  node_cart["Cart<br/>[cart_screen.dart]"]
  node_checkout["Checkout"]
  node_confirmation["Order confirmation"]
  node_address["Delivery address"]
end

subgraph group_account["Account and orders"]
  node_orders["Orders<br/>[orders_screen.dart]"]
  node_tracking["Order tracking"]
  node_profile["Account profile"]
  node_notifications["Notifications"]
end

subgraph group_domain["Domain and presentation"]
  node_provider["App state<br/>[app_provider.dart]"]
  node_product_model["Product model<br/>[product.dart]"]
  node_cart_model["Cart item model<br/>[cart_item.dart]"]
  node_order_model["Order summary<br/>[order_summary.dart]"]
  node_store_widgets["Store widgets<br/>[store_widgets.dart]"]
end

node_customer(("Customer"))

node_customer -.->|"opens"| node_app
node_app -.->|"starts at"| node_onboarding
node_customer -.->|"chooses phone login"| node_login
node_customer -->|"selects country"| node_countries
node_login -->|"requests verification"| node_otp
node_customer -->|"continues as guest"| node_navigation
node_otp -->|"completes new account"| node_profile_setup
node_profile_setup -.->|"continues"| node_navigation
node_navigation -.->|"opens"| node_home
node_home -.->|"browses"| node_categories
node_home -.->|"opens product"| node_product
node_categories -.->|"selects product"| node_product
node_product -.->|"adds item"| node_cart
node_cart -.->|"proceeds to checkout"| node_checkout
node_checkout -.->|"uses address"| node_address
node_checkout -.->|"confirms order"| node_confirmation
node_navigation -.->|"opens orders"| node_orders
node_orders -.->|"tracks order"| node_tracking
node_navigation -.->|"opens account"| node_profile
node_navigation -.->|"opens notifications"| node_notifications
node_product -.->|"uses product data"| node_product_model
node_cart -.->|"uses cart data"| node_cart_model
node_orders -.->|"uses order data"| node_order_model
node_navigation -.->|"uses app state"| node_provider
node_home -.->|"renders with"| node_store_widgets

click node_app "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/main.dart"
click node_onboarding "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/onboarding_screen.dart"
click node_login "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/login_screen.dart"
click node_otp "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/otp_screen.dart"
click node_countries "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/country.dart"
click node_profile_setup "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/profile_setup_screen.dart"
click node_navigation "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/main_navigation_screen.dart"
click node_home "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/home_screen.dart"
click node_categories "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/categories_screen.dart"
click node_product "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/product_details_screen.dart"
click node_cart "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/cart_screen.dart"
click node_checkout "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/checkout_screen.dart"
click node_confirmation "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/thank_you_screen.dart"
click node_address "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/delivery_address.dart"
click node_orders "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/orders_screen.dart"
click node_tracking "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/order_tracking_screen.dart"
click node_profile "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/profile_screen.dart"
click node_notifications "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/notifications_screen.dart"
click node_provider "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/providers/app_provider.dart"
click node_product_model "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/product.dart"
click node_cart_model "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/cart_item.dart"
click node_order_model "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/order_summary.dart"
click node_store_widgets "https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/widgets/store_widgets.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_app,node_navigation toneBlue
class node_onboarding,node_login,node_otp,node_countries,node_profile_setup toneAmber
class node_home,node_categories,node_product,node_cart,node_checkout,node_confirmation,node_address toneMint
class node_orders,node_tracking,node_profile,node_notifications toneRose
class node_provider,node_product_model,node_cart_model,node_order_model,node_store_widgets,node_customer toneIndigo
```

## Components

### App entry

- [Flutter app](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/main.dart): `lib/main.dart`
- [Main navigation](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/main_navigation_screen.dart): `lib/screens/main_navigation_screen.dart`

### Customer access

- [Onboarding](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/onboarding_screen.dart): `lib/screens/onboarding_screen.dart`
- [Phone login](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`
- [OTP verification](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/otp_screen.dart): `lib/screens/otp_screen.dart`
- [Country selection](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/country.dart): `lib/models/country.dart`
- [Profile setup](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/profile_setup_screen.dart): `lib/screens/profile_setup_screen.dart`

### Shopping

- [Home](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Categories](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/categories_screen.dart): `lib/screens/categories_screen.dart`
- [Product details](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/product_details_screen.dart): `lib/screens/product_details_screen.dart`
- [Cart](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/cart_screen.dart): `lib/screens/cart_screen.dart`
- [Checkout](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/checkout_screen.dart): `lib/screens/checkout_screen.dart`
- [Order confirmation](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/thank_you_screen.dart): `lib/screens/thank_you_screen.dart`
- [Delivery address](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/delivery_address.dart): `lib/models/delivery_address.dart`

### Account and orders

- [Orders](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/orders_screen.dart): `lib/screens/orders_screen.dart`
- [Order tracking](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/order_tracking_screen.dart): `lib/screens/order_tracking_screen.dart`
- [Account profile](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/profile_screen.dart): `lib/screens/profile_screen.dart`
- [Notifications](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/screens/notifications_screen.dart): `lib/screens/notifications_screen.dart`

### Domain and presentation

- [App state](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/providers/app_provider.dart): `lib/providers/app_provider.dart`
- [Product model](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/product.dart): `lib/models/product.dart`
- [Cart item model](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/cart_item.dart): `lib/models/cart_item.dart`
- [Order summary](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/models/order_summary.dart): `lib/models/order_summary.dart`
- [Store widgets](https://github.com/mahmoud-adel-4459/elwady/blob/main/lib/widgets/store_widgets.dart): `lib/widgets/store_widgets.dart`

### Other components

- **Customer**

## Connections

- Customer → Flutter app: opens
- Flutter app → Onboarding: starts at
- Customer → Phone login: chooses phone login
- Customer → Country selection: selects country (evidence: `README.md`)
- Phone login → OTP verification: requests verification (evidence: `README.md`)
- Customer → Main navigation: continues as guest (evidence: `README.md`)
- OTP verification → Profile setup: completes new account (evidence: `README.md`)
- Profile setup → Main navigation: continues
- Main navigation → Home: opens
- Home → Categories: browses
- Home → Product details: opens product
- Categories → Product details: selects product
- Product details → Cart: adds item
- Cart → Checkout: proceeds to checkout
- Checkout → Delivery address: uses address
- Checkout → Order confirmation: confirms order
- Main navigation → Orders: opens orders
- Orders → Order tracking: tracks order
- Main navigation → Account profile: opens account
- Main navigation → Notifications: opens notifications
- Product details → Product model: uses product data
- Cart → Cart item model: uses cart data
- Orders → Order summary: uses order data
- Main navigation → App state: uses app state
- Home → Store widgets: renders with
