# barwaqt/customer_web architecture

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

- Interactive diagram: https://gitdiagram.com/barwaqt/customer_web
- Repository: https://github.com/barwaqt/customer_web

## Overview

Barwaqt is a demo online shop. The main customer journey runs from browsing the home page and product categories, through product detail and cart management, into checkout with delivery, scheduling, and payment steps. Account sign-in, profile management, and wishlists are supporting capabilities. The graph reflects documented imports and sampled calls; the location-search endpoint is shown as an optional integration because its caller was not visible in the excerpts.

Main entry points: [`app/components/product-details.tsx`](https://github.com/barwaqt/customer_web/blob/main/app/components/product-details.tsx) (Product details), [`app/page.tsx`](https://github.com/barwaqt/customer_web/blob/main/app/page.tsx) (Home page), [`app/components/shop-store.ts`](https://github.com/barwaqt/customer_web/blob/main/app/components/shop-store.ts) (Cart and wishlist state), [`app/components/shop-shell.tsx`](https://github.com/barwaqt/customer_web/blob/main/app/components/shop-shell.tsx) (Shop shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[page.tsx]"]
  node_home_sections["Home sections<br/>[home-sections.tsx]"]
  node_shell["Shop shell<br/>[shop-shell.tsx]"]
  node_brand["Brand elements<br/>[brand.tsx]"]
end

subgraph group_catalog["Catalog"]
  node_categories["Category data<br/>[categories.ts]"]
  node_category_nav["Category navigation"]
  node_category_page["Category page<br/>[page.tsx]"]
  node_category_listing["Category listing"]
  node_shop_data["Shop catalog data<br/>[shop-data.json]"]
  node_product_page["Product page<br/>[page.tsx]"]
  node_product_details["Product details"]
  node_product_sections["Product sections"]
end

subgraph group_commerce["Commerce"]
  node_shop_store[("Cart and wishlist state<br/>[shop-store.ts]")]
  node_wishlist["Wishlist page<br/>[wishlist.tsx]"]
  node_checkout_page["Checkout page<br/>[page.tsx]"]
  node_checkout["Checkout<br/>[checkout.tsx]"]
  node_delivery["Delivery flow<br/>[delivery-flow.tsx]"]
  node_delivery_map["Delivery map<br/>[delivery-map.tsx]"]
  node_location_api["Location search API<br/>[route.ts]"]
  node_payment_logos["Payment method logos<br/>[payment-logos.tsx]"]
end

subgraph group_account["Account"]
  node_auth["Authentication<br/>[auth-provider.tsx]"]
  node_profile_page["Profile page<br/>[page.tsx]"]
  node_profile["Customer profile"]
  node_account_panels["Account panels<br/>[account-panels.tsx]"]
end

node_shopper(("Shopper"))
node_location_service(("Location provider"))

node_shopper -->|"browses"| node_home
node_home -->|"renders"| node_home_sections
node_home -->|"renders"| node_category_nav
node_home -->|"uses"| node_brand
node_home -->|"reads cart state"| node_shop_store
node_home -->|"links to checkout"| node_shell
node_shell -->|"renders"| node_category_nav
node_shell -->|"renders"| node_brand
node_shell -->|"uses sign-in button"| node_auth
node_shell -->|"reads cart state"| node_shop_store
node_category_nav -->|"resolves links"| node_categories
node_category_page -->|"uses categories"| node_categories
node_category_page -->|"renders"| node_category_listing
node_category_listing -->|"updates cart and wishlist"| node_shop_store
node_category_listing -->|"reads products"| node_shop_data
node_category_listing -->|"resolves links"| node_categories
node_shopper -->|"opens product"| node_product_page
node_product_page -->|"renders"| node_product_details
node_product_page -->|"reads product"| node_shop_data
node_product_details -->|"updates cart and wishlist"| node_shop_store
node_product_details -->|"uses sections"| node_product_sections
node_product_details -->|"reads products"| node_shop_data
node_shopper -->|"opens wishlist"| node_wishlist
node_wishlist -->|"reads saved items"| node_shop_store
node_wishlist -->|"uses product details"| node_product_details
node_shopper -->|"starts checkout"| node_checkout_page
node_checkout_page -->|"renders"| node_checkout
node_checkout -->|"reads and updates cart"| node_shop_store
node_checkout -->|"renders delivery flow"| node_delivery
node_checkout -->|"uses product art"| node_product_details
node_delivery -->|"renders map"| node_delivery_map
node_delivery -->|"uses product art"| node_product_details
node_delivery -->|"renders payment options"| node_payment_logos
node_delivery -.->|"searches locations"| node_location_api
node_location_service -.->|"may provide results"| node_location_api
node_shopper -->|"opens account"| node_profile_page
node_profile_page -->|"renders"| node_profile
node_profile -->|"reads account state"| node_auth
node_profile -->|"reads wishlist"| node_shop_store
node_profile -->|"renders panels"| node_account_panels

click node_home "https://github.com/barwaqt/customer_web/blob/main/app/page.tsx"
click node_home_sections "https://github.com/barwaqt/customer_web/blob/main/app/components/home-sections.tsx"
click node_shell "https://github.com/barwaqt/customer_web/blob/main/app/components/shop-shell.tsx"
click node_brand "https://github.com/barwaqt/customer_web/blob/main/app/components/brand.tsx"
click node_categories "https://github.com/barwaqt/customer_web/blob/main/app/categories.ts"
click node_category_nav "https://github.com/barwaqt/customer_web/blob/main/app/components/category-navigation.tsx"
click node_category_page "https://github.com/barwaqt/customer_web/blob/main/app/category/%5Bslug%5D/page.tsx"
click node_category_listing "https://github.com/barwaqt/customer_web/blob/main/app/components/category-listing.tsx"
click node_shop_data "https://github.com/barwaqt/customer_web/blob/main/app/shop-data.json"
click node_product_page "https://github.com/barwaqt/customer_web/blob/main/app/product/%5Bid%5D/page.tsx"
click node_product_details "https://github.com/barwaqt/customer_web/blob/main/app/components/product-details.tsx"
click node_product_sections "https://github.com/barwaqt/customer_web/blob/main/app/components/product-sections.tsx"
click node_shop_store "https://github.com/barwaqt/customer_web/blob/main/app/components/shop-store.ts"
click node_wishlist "https://github.com/barwaqt/customer_web/blob/main/app/components/wishlist.tsx"
click node_checkout_page "https://github.com/barwaqt/customer_web/blob/main/app/checkout/page.tsx"
click node_checkout "https://github.com/barwaqt/customer_web/blob/main/app/components/checkout.tsx"
click node_delivery "https://github.com/barwaqt/customer_web/blob/main/app/components/delivery-flow.tsx"
click node_delivery_map "https://github.com/barwaqt/customer_web/blob/main/app/components/delivery-map.tsx"
click node_location_api "https://github.com/barwaqt/customer_web/blob/main/app/api/location-search/route.ts"
click node_payment_logos "https://github.com/barwaqt/customer_web/blob/main/app/components/payment-logos.tsx"
click node_auth "https://github.com/barwaqt/customer_web/blob/main/app/components/auth-provider.tsx"
click node_profile_page "https://github.com/barwaqt/customer_web/blob/main/app/profile/page.tsx"
click node_profile "https://github.com/barwaqt/customer_web/blob/main/app/components/customer-profile.tsx"
click node_account_panels "https://github.com/barwaqt/customer_web/blob/main/app/components/account-panels.tsx"

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_home,node_home_sections,node_shell,node_brand toneBlue
class node_categories,node_category_nav,node_category_page,node_category_listing,node_shop_data,node_product_page,node_product_details,node_product_sections toneAmber
class node_shop_store,node_wishlist,node_checkout_page,node_checkout,node_delivery,node_delivery_map,node_location_api,node_payment_logos toneMint
class node_auth,node_profile_page,node_profile,node_account_panels toneRose
class node_shopper,node_location_service toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/barwaqt/customer_web/blob/main/app/page.tsx): `app/page.tsx`
- [Home sections](https://github.com/barwaqt/customer_web/blob/main/app/components/home-sections.tsx): `app/components/home-sections.tsx`
- [Shop shell](https://github.com/barwaqt/customer_web/blob/main/app/components/shop-shell.tsx): `app/components/shop-shell.tsx`
- [Brand elements](https://github.com/barwaqt/customer_web/blob/main/app/components/brand.tsx): `app/components/brand.tsx`

### Catalog

- [Category data](https://github.com/barwaqt/customer_web/blob/main/app/categories.ts): `app/categories.ts`
- [Category navigation](https://github.com/barwaqt/customer_web/blob/main/app/components/category-navigation.tsx): `app/components/category-navigation.tsx`
- [Category page](https://github.com/barwaqt/customer_web/blob/main/app/category/%5Bslug%5D/page.tsx): `app/category/[slug]/page.tsx`
- [Category listing](https://github.com/barwaqt/customer_web/blob/main/app/components/category-listing.tsx): `app/components/category-listing.tsx`
- [Shop catalog data](https://github.com/barwaqt/customer_web/blob/main/app/shop-data.json): `app/shop-data.json`
- [Product page](https://github.com/barwaqt/customer_web/blob/main/app/product/%5Bid%5D/page.tsx): `app/product/[id]/page.tsx`
- [Product details](https://github.com/barwaqt/customer_web/blob/main/app/components/product-details.tsx): `app/components/product-details.tsx`
- [Product sections](https://github.com/barwaqt/customer_web/blob/main/app/components/product-sections.tsx): `app/components/product-sections.tsx`

### Commerce

- [Cart and wishlist state](https://github.com/barwaqt/customer_web/blob/main/app/components/shop-store.ts): `app/components/shop-store.ts`
- [Wishlist page](https://github.com/barwaqt/customer_web/blob/main/app/components/wishlist.tsx): `app/components/wishlist.tsx`
- [Checkout page](https://github.com/barwaqt/customer_web/blob/main/app/checkout/page.tsx): `app/checkout/page.tsx`
- [Checkout](https://github.com/barwaqt/customer_web/blob/main/app/components/checkout.tsx): `app/components/checkout.tsx`
- [Delivery flow](https://github.com/barwaqt/customer_web/blob/main/app/components/delivery-flow.tsx): `app/components/delivery-flow.tsx`
- [Delivery map](https://github.com/barwaqt/customer_web/blob/main/app/components/delivery-map.tsx): `app/components/delivery-map.tsx`
- [Location search API](https://github.com/barwaqt/customer_web/blob/main/app/api/location-search/route.ts): `app/api/location-search/route.ts`
- [Payment method logos](https://github.com/barwaqt/customer_web/blob/main/app/components/payment-logos.tsx): `app/components/payment-logos.tsx`

### Account

- [Authentication](https://github.com/barwaqt/customer_web/blob/main/app/components/auth-provider.tsx): `app/components/auth-provider.tsx`
- [Profile page](https://github.com/barwaqt/customer_web/blob/main/app/profile/page.tsx): `app/profile/page.tsx`
- [Customer profile](https://github.com/barwaqt/customer_web/blob/main/app/components/customer-profile.tsx): `app/components/customer-profile.tsx`
- [Account panels](https://github.com/barwaqt/customer_web/blob/main/app/components/account-panels.tsx): `app/components/account-panels.tsx`

### Other components

- **Shopper**
- **Location provider**

## Connections

- Shopper → Home page: browses (evidence: `app/page.tsx`)
- Home page → Home sections: renders (evidence: `app/page.tsx`)
- Home page → Category navigation: renders (evidence: `app/page.tsx`)
- Home page → Brand elements: uses (evidence: `app/page.tsx`)
- Home page → Cart and wishlist state: reads cart state (evidence: `app/page.tsx`)
- Home page → Shop shell: links to checkout (evidence: `app/page.tsx`)
- Shop shell → Category navigation: renders (evidence: `app/components/shop-shell.tsx`)
- Shop shell → Brand elements: renders (evidence: `app/components/shop-shell.tsx`)
- Shop shell → Authentication: uses sign-in button (evidence: `app/components/shop-shell.tsx`)
- Shop shell → Cart and wishlist state: reads cart state (evidence: `app/components/shop-shell.tsx`)
- Category navigation → Category data: resolves links (evidence: `app/components/category-navigation.tsx`)
- Category page → Category data: uses categories (evidence: `app/category/[slug]/page.tsx`)
- Category page → Category listing: renders (evidence: `app/category/[slug]/page.tsx`)
- Category listing → Cart and wishlist state: updates cart and wishlist (evidence: `app/components/category-listing.tsx`)
- Category listing → Shop catalog data: reads products (evidence: `app/components/category-listing.tsx`)
- Category listing → Category data: resolves links (evidence: `app/components/category-listing.tsx`)
- Shopper → Product page: opens product
- Product page → Product details: renders (evidence: `app/product/[id]/page.tsx`)
- Product page → Shop catalog data: reads product (evidence: `app/product/[id]/page.tsx`)
- Product details → Cart and wishlist state: updates cart and wishlist (evidence: `app/components/product-details.tsx`)
- Product details → Product sections: uses sections (evidence: `app/components/product-details.tsx`)
- Product details → Shop catalog data: reads products (evidence: `app/components/product-details.tsx`)
- Shopper → Wishlist page: opens wishlist
- Wishlist page → Cart and wishlist state: reads saved items (evidence: `app/components/wishlist.tsx`)
- Wishlist page → Product details: uses product details (evidence: `app/components/wishlist.tsx`)
- Shopper → Checkout page: starts checkout (evidence: `app/checkout/page.tsx`)
- Checkout page → Checkout: renders (evidence: `app/checkout/page.tsx`)
- Checkout → Cart and wishlist state: reads and updates cart (evidence: `app/components/checkout.tsx`)
- Checkout → Delivery flow: renders delivery flow (evidence: `app/components/checkout.tsx`)
- Checkout → Product details: uses product art (evidence: `app/components/checkout.tsx`)
- Delivery flow → Delivery map: renders map (evidence: `app/components/delivery-flow.tsx`)
- Delivery flow → Product details: uses product art (evidence: `app/components/delivery-flow.tsx`)
- Delivery flow → Payment method logos: renders payment options (evidence: `app/components/delivery-flow.tsx`)
- Delivery flow → Location search API: searches locations
- Location provider → Location search API: may provide results
- Shopper → Profile page: opens account (evidence: `app/profile/page.tsx`)
- Profile page → Customer profile: renders (evidence: `app/profile/page.tsx`)
- Customer profile → Authentication: reads account state (evidence: `app/components/customer-profile.tsx`)
- Customer profile → Cart and wishlist state: reads wishlist (evidence: `app/components/customer-profile.tsx`)
- Customer profile → Account panels: renders panels (evidence: `app/components/customer-profile.tsx`)
