# hossam-yaser/store-app architecture

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

- Interactive diagram: https://gitdiagram.com/hossam-yaser/store-app
- Repository: https://github.com/hossam-yaser/store-app

## Overview

Store App is a Flutter shopping app whose main user workflow is browsing and searching API-backed products, viewing product details, and managing a cart with a dynamically updated total. The graph also preserves the documented category browsing and navigation capabilities. Source excerpts were unavailable, so internal call paths and the wiring of individual services and widgets cannot be verified; those relationships are omitted rather than inferred.

Main entry points: [`lib/screens`](https://github.com/hossam-yaser/store-app/tree/main/lib/screens) (Shopping screens), [`lib/main.dart`](https://github.com/hossam-yaser/store-app/blob/main/lib/main.dart) (App entry), [`lib/widgets/cart`](https://github.com/hossam-yaser/store-app/tree/main/lib/widgets/cart) (Cart widgets), [`lib/services/get/allproducts_service.dart`](https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/allproducts_service.dart) (Product service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_screens["Shopping screens"]
end

subgraph group_catalog["Product catalog"]
  node_catalog_ui["Catalog widgets"]
  node_product_model["Product model<br/>[product_model.dart]"]
  node_local_products["Local products"]
end

subgraph group_cart["Cart"]
  node_cart_ui["Cart widgets"]
  node_cart_state["Cart state helper"]
end

subgraph group_backend["API services"]
  node_api_helper["API helper<br/>[api.dart]"]
  node_product_service["Product service"]
  node_category_service["Category service"]
  node_category_products["Category products"]
  node_add_product["Add product service"]
  node_update_product["Update product service"]
end

node_shopper(("Shopper"))
node_store_api["Product API"]

node_shopper -->|"uses"| node_app_entry
node_shopper -->|"browses"| node_screens
node_shopper -->|"manages cart"| node_cart_ui
node_app_entry -->|"navigates"| node_screens
node_screens -->|"browses products"| node_catalog_ui
node_screens -.->|"fetches products"| node_product_service
node_screens -.->|"browses categories"| node_category_service
node_screens -.->|"searches categories"| node_category_products
node_product_service -.->|"fetches products"| node_store_api
node_category_service -.->|"fetches categories"| node_store_api
node_category_products -.->|"fetches products"| node_store_api
node_cart_ui -.->|"updates cart"| node_cart_state

click node_app_entry "https://github.com/hossam-yaser/store-app/blob/main/lib/main.dart"
click node_screens "https://github.com/hossam-yaser/store-app/tree/main/lib/screens"
click node_catalog_ui "https://github.com/hossam-yaser/store-app/tree/main/lib/widgets"
click node_product_model "https://github.com/hossam-yaser/store-app/blob/main/lib/models/product_model.dart"
click node_local_products "https://github.com/hossam-yaser/store-app/blob/main/lib/helper/locallistofproducts.dart"
click node_api_helper "https://github.com/hossam-yaser/store-app/blob/main/lib/helper/api.dart"
click node_product_service "https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/allproducts_service.dart"
click node_category_service "https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/allcategories_services.dart"
click node_category_products "https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/category_products_services.dart"
click node_add_product "https://github.com/hossam-yaser/store-app/blob/main/lib/services/post/add_product_service.dart"
click node_update_product "https://github.com/hossam-yaser/store-app/blob/main/lib/services/put/update_product_service.dart"
click node_cart_ui "https://github.com/hossam-yaser/store-app/tree/main/lib/widgets/cart"
click node_cart_state "https://github.com/hossam-yaser/store-app/blob/main/lib/helper/locallistofproducts.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_entry,node_screens toneBlue
class node_catalog_ui,node_product_model,node_local_products toneAmber
class node_cart_ui,node_cart_state,node_store_api toneMint
class node_api_helper,node_product_service,node_category_service,node_category_products,node_add_product,node_update_product toneRose
class node_shopper toneIndigo
```

## Components

### App and navigation

- [App entry](https://github.com/hossam-yaser/store-app/blob/main/lib/main.dart): `lib/main.dart`
- [Shopping screens](https://github.com/hossam-yaser/store-app/tree/main/lib/screens): `lib/screens`

### Product catalog

- [Catalog widgets](https://github.com/hossam-yaser/store-app/tree/main/lib/widgets): `lib/widgets`
- [Product model](https://github.com/hossam-yaser/store-app/blob/main/lib/models/product_model.dart): `lib/models/product_model.dart`
- [Local products](https://github.com/hossam-yaser/store-app/blob/main/lib/helper/locallistofproducts.dart): `lib/helper/locallistofproducts.dart`

### Cart

- [Cart widgets](https://github.com/hossam-yaser/store-app/tree/main/lib/widgets/cart): `lib/widgets/cart`
- [Cart state helper](https://github.com/hossam-yaser/store-app/blob/main/lib/helper/locallistofproducts.dart): `lib/helper/locallistofproducts.dart`

### API services

- [API helper](https://github.com/hossam-yaser/store-app/blob/main/lib/helper/api.dart): `lib/helper/api.dart`
- [Product service](https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/allproducts_service.dart): `lib/services/get/allproducts_service.dart`
- [Category service](https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/allcategories_services.dart): `lib/services/get/allcategories_services.dart`
- [Category products](https://github.com/hossam-yaser/store-app/blob/main/lib/services/get/category_products_services.dart): `lib/services/get/category_products_services.dart`
- [Add product service](https://github.com/hossam-yaser/store-app/blob/main/lib/services/post/add_product_service.dart): `lib/services/post/add_product_service.dart`
- [Update product service](https://github.com/hossam-yaser/store-app/blob/main/lib/services/put/update_product_service.dart): `lib/services/put/update_product_service.dart`

### Other components

- **Shopper**
- **Product API**

## Connections

- Shopper → App entry: uses (evidence: `README.md`)
- Shopper → Shopping screens: browses (evidence: `README.md`)
- Shopper → Cart widgets: manages cart (evidence: `README.md`)
- App entry → Shopping screens: navigates (evidence: `README.md`)
- Shopping screens → Catalog widgets: browses products (evidence: `README.md`)
- Shopping screens → Product service: fetches products
- Shopping screens → Category service: browses categories
- Shopping screens → Category products: searches categories
- Product service → Product API: fetches products
- Category service → Product API: fetches categories
- Category products → Product API: fetches products
- Cart widgets → Cart state helper: updates cart
