# vinodpandey1/eazysupplies-ui architecture

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

- Interactive diagram: https://gitdiagram.com/vinodpandey1/eazysupplies-ui
- Repository: https://github.com/vinodpandey1/eazysupplies-ui

## Overview

This is a Next.js storefront for product discovery, shopping, checkout, and customer account tasks, with additional seller, brand, blog, and themed-home experiences. A typical customer journey is browse or search products, inspect a product, add items to a cart, then checkout and manage the resulting order. The tree shows these distinct stages, but sampled source does not establish most page-to-API wiring. Solid edges below are limited to relationships visible in excerpts or SOURCE INDEX references; dashed edges mark likely workflow links that remain unverified.

Main entry points: [`src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx`](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx) (Product search), [`src/context/cartContext/CartProvider.jsx`](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/context/cartContext/CartProvider.jsx) (Cart state), [`src/components/pages/checkout`](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/checkout) (Checkout), [`src/app/api/paymentstatus/route.js`](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/app/api/paymentstatus/route.js) (Payment callback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Themed home"]
  node_catalog["Product catalog"]
  node_search["Product search"]
  node_product_detail["Product details"]
  node_reviews["Product reviews<br/>[CustomerReview.jsx]"]
  node_review_form["Review form<br/>[ReviewModal.jsx]"]
  node_seller["Seller storefront"]
  node_blogs["Blog experience"]
end

subgraph group_commerce["Shopping"]
  node_cart["Cart state<br/>[CartProvider.jsx]"]
  node_totals["Order totals<br/>[orderTotals.js]"]
  node_checkout["Checkout"]
  node_payment_callback["Payment callback<br/>[route.js]"]
end

subgraph group_customer["Customer services"]
  node_orders["Orders and tracking"]
  node_account["Account services"]
end

subgraph group_platform["Shared platform"]
  node_product_api["Product API<br/>[route.js]"]
  node_request_client["Request client<br/>[index.jsx]"]
  node_fetch_query["Query hook<br/>[useFetchQuery.jsx]"]
  node_app_state["App providers<br/>[index.jsx]"]
end

node_customer_actor(("Shopper"))
node_external_api{{"Commerce API"}}
node_payment_service{{"Payment service"}}

node_customer_actor -.->|"visits"| node_home
node_customer_actor -.->|"browses"| node_catalog
node_customer_actor -.->|"searches"| node_search
node_customer_actor -.->|"adds items"| node_cart
node_customer_actor -.->|"checks out"| node_checkout
node_search -->|"requests data"| node_request_client
node_search -->|"queries with"| node_fetch_query
node_search -->|"renders products"| node_catalog
node_product_api -.->|"serves filtered data"| node_external_api
node_reviews -->|"opens"| node_review_form
node_reviews -->|"loads with"| node_fetch_query
node_review_form -->|"submits review"| node_external_api
node_cart -->|"calculates with"| node_totals
node_cart -->|"requests data"| node_request_client
node_checkout -.->|"places order"| node_orders
node_checkout -.->|"returns from payment"| node_payment_callback
node_payment_callback -->|"forwards response"| node_payment_service
node_payment_callback -->|"updates payment"| node_external_api
node_account -.->|"manages orders"| node_orders
node_app_state -->|"provides state"| node_cart
node_app_state -.->|"provides context"| node_external_api

click node_home "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/themes"
click node_catalog "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/collection"
click node_search "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx"
click node_product_detail "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/productDetails"
click node_reviews "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/components/productDetails/common/CustomerReview.jsx"
click node_review_form "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/components/productDetails/common/allModal/ReviewModal.jsx"
click node_cart "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/context/cartContext/CartProvider.jsx"
click node_totals "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/pricing/orderTotals.js"
click node_checkout "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/checkout"
click node_orders "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/orderList"
click node_payment_callback "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/app/api/paymentstatus/route.js"
click node_account "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/account"
click node_seller "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/seller"
click node_blogs "https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/blogs"
click node_product_api "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/app/api/product/route.js"
click node_request_client "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/axiosUtils/index.jsx"
click node_fetch_query "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/hooks/useFetchQuery.jsx"
click node_app_state "https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/layout/index.jsx"

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_catalog,node_search,node_product_detail,node_reviews,node_review_form,node_seller,node_blogs toneBlue
class node_cart,node_totals,node_checkout,node_payment_callback toneAmber
class node_orders,node_account,node_external_api toneMint
class node_product_api,node_request_client,node_fetch_query,node_app_state toneRose
class node_customer_actor,node_payment_service toneIndigo
```

## Components

### Storefront

- [Themed home](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/themes): `src/components/themes`
- [Product catalog](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/collection): `src/components/collection`
- [Product search](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx): `src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx`
- [Product details](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/productDetails): `src/components/productDetails`
- [Product reviews](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/components/productDetails/common/CustomerReview.jsx): `src/components/productDetails/common/CustomerReview.jsx`
- [Review form](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/components/productDetails/common/allModal/ReviewModal.jsx): `src/components/productDetails/common/allModal/ReviewModal.jsx`
- [Seller storefront](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/seller): `src/components/seller`
- [Blog experience](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/blogs): `src/components/blogs`

### Shopping

- [Cart state](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/context/cartContext/CartProvider.jsx): `src/context/cartContext/CartProvider.jsx`
- [Order totals](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/pricing/orderTotals.js): `src/utils/pricing/orderTotals.js`
- [Checkout](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/checkout): `src/components/pages/checkout`
- [Payment callback](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/app/api/paymentstatus/route.js): `src/app/api/paymentstatus/route.js`

### Customer services

- [Orders and tracking](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/orderList): `src/components/pages/orderList`
- [Account services](https://github.com/vinodpandey1/eazysupplies-ui/tree/main/src/components/pages/account): `src/components/pages/account`

### Shared platform

- [Product API](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/app/api/product/route.js): `src/app/api/product/route.js`
- [Request client](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/axiosUtils/index.jsx): `src/utils/axiosUtils/index.jsx`
- [Query hook](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/utils/hooks/useFetchQuery.jsx): `src/utils/hooks/useFetchQuery.jsx`
- [App providers](https://github.com/vinodpandey1/eazysupplies-ui/blob/main/src/layout/index.jsx): `src/layout/index.jsx`

### Other components

- **Shopper**
- **Commerce API**
- **Payment service**

## Connections

- Shopper → Themed home: visits
- Shopper → Product catalog: browses
- Shopper → Product search: searches
- Shopper → Cart state: adds items
- Shopper → Checkout: checks out
- Product search → Request client: requests data (evidence: `src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx`)
- Product search → Query hook: queries with (evidence: `src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx`)
- Product search → Product catalog: renders products (evidence: `src/layout/header/widgets/headerSearchbar/iconSearch/IconSearchModal.jsx`)
- Product API → Commerce API: serves filtered data
- Product reviews → Review form: opens (evidence: `src/components/productDetails/common/CustomerReview.jsx`)
- Product reviews → Query hook: loads with (evidence: `src/components/productDetails/common/CustomerReview.jsx`)
- Review form → Commerce API: submits review (evidence: `src/components/productDetails/common/allModal/ReviewModal.jsx`)
- Cart state → Order totals: calculates with (evidence: `src/context/cartContext/CartProvider.jsx`)
- Cart state → Request client: requests data (evidence: `src/context/cartContext/CartProvider.jsx`)
- Checkout → Orders and tracking: places order
- Checkout → Payment callback: returns from payment
- Payment callback → Payment service: forwards response (evidence: `src/app/api/paymentstatus/route.js`)
- Payment callback → Commerce API: updates payment (evidence: `src/app/api/paymentstatus/route.js`)
- Account services → Orders and tracking: manages orders
- App providers → Cart state: provides state (evidence: `src/layout/index.jsx`)
- App providers → Commerce API: provides context
