# sovandarachim2-commits/shadow-shop-mobile architecture

> Architecture diagram of the GitHub repository sovandarachim2-commits/shadow-shop-mobile, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sovandarachim2-commits/shadow-shop-mobile
- Repository: https://github.com/sovandarachim2-commits/shadow-shop-mobile

## Overview

Shadow Shop Mobile is a Flutter customer storefront for an existing Django API, not a backend. The principal journey is authenticate, browse products, build a local cart, enter delivery details and check out, then track orders; profile and rewards are parallel customer capabilities. The README documents the API contract and major features, but the Dart implementation was not sampled, so internal call ownership is not verified; edges below reflect only documented relationships.

Main entry points: [`lib/services/api_client.dart`](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/services/api_client.dart) (API client), [`lib/main.dart`](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/main.dart) (Flutter app), [`lib/features/auth`](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/auth) (Authentication), [`lib/features/customer/home/home_screen.dart`](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/home/home_screen.dart) (Storefront home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App startup"]
  node_flutter_app["Flutter app<br/>[main.dart]"]
  node_session_gate["Session gate<br/>[app.dart]"]
end

subgraph group_customer["Customer experience"]
  node_auth["Authentication"]
  node_home["Storefront home<br/>[home_screen.dart]"]
  node_catalog["Product catalog"]
  node_wishlist["Wishlist"]
  node_profile_address["Profile and address"]
end

subgraph group_commerce["Commerce and rewards"]
  node_cart["Cart<br/>[cart_screen.dart]"]
  node_checkout["Checkout"]
  node_orders["Orders"]
  node_rewards["Rewards"]
end

subgraph group_shared["Shared app layers"]
  node_shop_state["Customer state<br/>[shop_state.dart]"]
  node_shop_service["Shop API methods<br/>[shop_service.dart]"]
  node_api_client["API client<br/>[api_client.dart]"]
  node_models["Product and cart models"]
  node_app_config["API configuration<br/>[app_config.dart]"]
end

node_customer_actor(("Customer"))
node_django_api{{"Django API"}}

node_customer_actor -->|"uses"| node_flutter_app
node_flutter_app -->|"starts session gate"| node_session_gate
node_customer_actor -->|"authenticates"| node_auth
node_auth -->|"uses auth endpoints"| node_django_api
node_customer_actor -->|"opens storefront"| node_home
node_home -->|"loads home feed"| node_django_api
node_customer_actor -->|"browses products"| node_catalog
node_catalog -->|"loads catalog"| node_django_api
node_customer_actor -->|"manages wishlist"| node_wishlist
node_wishlist -->|"uses wishlist API"| node_django_api
node_customer_actor -->|"adds items"| node_cart
node_cart -->|"proceeds to checkout"| node_checkout
node_checkout -->|"submits order"| node_django_api
node_customer_actor -->|"tracks orders"| node_orders
node_orders -->|"loads order history"| node_django_api
node_customer_actor -->|"manages profile"| node_profile_address
node_profile_address -->|"uses address API"| node_django_api
node_customer_actor -->|"uses rewards"| node_rewards
node_rewards -->|"uses rewards API"| node_django_api
node_shop_service -.->|"uses"| node_api_client
node_api_client -.->|"sends API requests"| node_django_api
node_app_config -.->|"configures endpoint"| node_api_client
node_shop_state -.->|"holds cart data"| node_models

click node_flutter_app "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/main.dart"
click node_session_gate "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/app/app.dart"
click node_auth "https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/auth"
click node_home "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/home/home_screen.dart"
click node_catalog "https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/products"
click node_wishlist "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/wishlist/wishlist_screen.dart"
click node_cart "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/cart/cart_screen.dart"
click node_checkout "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/cart/checkout_screen.dart"
click node_orders "https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/orders"
click node_profile_address "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/profile/profile_screen.dart"
click node_rewards "https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/rewards"
click node_shop_state "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/state/shop_state.dart"
click node_shop_service "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/services/shop_service.dart"
click node_api_client "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/services/api_client.dart"
click node_models "https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/models"
click node_app_config "https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/config/app_config.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_flutter_app,node_session_gate toneBlue
class node_auth,node_home,node_catalog,node_wishlist,node_profile_address toneAmber
class node_cart,node_checkout,node_orders,node_rewards,node_django_api toneMint
class node_shop_state,node_shop_service,node_api_client,node_models,node_app_config toneRose
class node_customer_actor toneIndigo
```

## Components

### App startup

- [Flutter app](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/main.dart): `lib/main.dart`
- [Session gate](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/app/app.dart): `lib/app/app.dart`

### Customer experience

- [Authentication](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/auth): `lib/features/auth`
- [Storefront home](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/home/home_screen.dart): `lib/features/customer/home/home_screen.dart`
- [Product catalog](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/products): `lib/features/customer/products`
- [Wishlist](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/wishlist/wishlist_screen.dart): `lib/features/customer/wishlist/wishlist_screen.dart`
- [Profile and address](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/profile/profile_screen.dart): `lib/features/customer/profile/profile_screen.dart`

### Commerce and rewards

- [Cart](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/cart/cart_screen.dart): `lib/features/customer/cart/cart_screen.dart`
- [Checkout](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/features/customer/cart/checkout_screen.dart): `lib/features/customer/cart/checkout_screen.dart`
- [Orders](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/orders): `lib/features/customer/orders`
- [Rewards](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/features/customer/rewards): `lib/features/customer/rewards`

### Shared app layers

- [Customer state](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/state/shop_state.dart): `lib/state/shop_state.dart`
- [Shop API methods](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/services/shop_service.dart): `lib/services/shop_service.dart`
- [API client](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/services/api_client.dart): `lib/services/api_client.dart`
- [Product and cart models](https://github.com/sovandarachim2-commits/shadow-shop-mobile/tree/main/lib/models): `lib/models`
- [API configuration](https://github.com/sovandarachim2-commits/shadow-shop-mobile/blob/main/lib/config/app_config.dart): `lib/config/app_config.dart`

### Other components

- **Customer**
- **Django API**

## Connections

- Customer → Flutter app: uses (evidence: `README.md`)
- Flutter app → Session gate: starts session gate (evidence: `README.md`)
- Customer → Authentication: authenticates (evidence: `README.md`)
- Authentication → Django API: uses auth endpoints (evidence: `README.md`)
- Customer → Storefront home: opens storefront (evidence: `README.md`)
- Storefront home → Django API: loads home feed (evidence: `README.md`)
- Customer → Product catalog: browses products (evidence: `README.md`)
- Product catalog → Django API: loads catalog (evidence: `README.md`)
- Customer → Wishlist: manages wishlist (evidence: `README.md`)
- Wishlist → Django API: uses wishlist API (evidence: `README.md`)
- Customer → Cart: adds items (evidence: `README.md`)
- Cart → Checkout: proceeds to checkout (evidence: `README.md`)
- Checkout → Django API: submits order (evidence: `README.md`)
- Customer → Orders: tracks orders (evidence: `README.md`)
- Orders → Django API: loads order history (evidence: `README.md`)
- Customer → Profile and address: manages profile (evidence: `README.md`)
- Profile and address → Django API: uses address API (evidence: `README.md`)
- Customer → Rewards: uses rewards (evidence: `README.md`)
- Rewards → Django API: uses rewards API (evidence: `README.md`)
- Shop API methods → API client: uses
- API client → Django API: sends API requests
- API configuration → API client: configures endpoint
- Customer state → Product and cart models: holds cart data
