# mailmeabhi1987/shoe-store-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/mailmeabhi1987/shoe-store-frontend
- Repository: https://github.com/mailmeabhi1987/shoe-store-frontend

## Overview

This is a Next.js Nike storefront. Shoppers browse featured and category products, inspect a product and select a size, add items to a Redux cart, then request an order session and are redirected to Stripe checkout; success and failure pages represent checkout outcomes. The graph also shows shared navigation, product presentation, and the Strapi API client. Some page and component implementations are unsampled, so their documented/import-index relationships are included, but no unverified links between checkout outcomes and payment are asserted.

Main entry points: [`pages/product/[slug].js`](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/product/%5Bslug%5D.js) (Product Details), [`utils/api.js`](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/utils/api.js) (API Client), [`components/Header.jsx`](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Header.jsx) (Site Header), [`pages/index.js`](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/index.js) (Featured Home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Featured Home<br/>[index.js]"]
  node_category["Category Listing<br/>[&#91;slug&#93;.js]"]
  node_hero["Hero Banner<br/>[HeroBanner.jsx]"]
end

subgraph group_catalog["Product Catalog"]
  node_product_detail["Product Details<br/>[&#91;slug&#93;.js]"]
  node_product_card["Product Card<br/>[ProductCard.jsx]"]
  node_product_carousel["Image Carousel"]
  node_related_products["Related Products"]
end

subgraph group_cart_checkout["Cart &amp; Checkout"]
  node_cart_page["Shopping Cart<br/>[cart.js]"]
  node_cart_item["Cart Item<br/>[CartItem.jsx]"]
  node_success["Order Success<br/>[success.js]"]
  node_failed["Order Failed<br/>[failed.js]"]
end

subgraph group_shared_ui["Shared UI"]
  node_header["Site Header<br/>[Header.jsx]"]
  node_menu["Desktop Menu<br/>[Menu.jsx]"]
  node_mobile_menu["Mobile Menu<br/>[MenuMobile.jsx]"]
  node_footer["Site Footer<br/>[Footer.jsx]"]
  node_wrapper["Layout Wrapper<br/>[Wrapper.jsx]"]
  node_app_shell["App Shell<br/>[_app.js]"]
end

subgraph group_data_state["Data &amp; State"]
  node_cart_state["Cart State<br/>[cartSlice.js]"]
  node_redux_store["Redux Store<br/>[store.js]"]
  node_api_client["API Client<br/>[api.js]"]
  node_price_helper["Discount Helper<br/>[helper.js]"]
end

node_shopper(("Shopper"))
node_strapi[("Strapi API")]
node_stripe["Stripe Checkout"]

node_shopper -->|"browses"| node_home
node_shopper -->|"browses"| node_category
node_shopper -->|"opens product"| node_product_detail
node_shopper -->|"opens cart"| node_cart_page
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_product_card
node_category -->|"renders"| node_product_card
node_product_detail -->|"renders"| node_product_carousel
node_product_detail -->|"renders"| node_related_products
node_related_products -->|"renders"| node_product_card
node_product_detail -->|"calculates discount"| node_price_helper
node_product_card -->|"calculates discount"| node_price_helper
node_product_detail -->|"dispatches add"| node_cart_state
node_cart_page -->|"renders"| node_cart_item
node_cart_item -->|"dispatches updates"| node_cart_state
node_cart_page -->|"requests payment"| node_api_client
node_cart_page -->|"starts checkout"| node_stripe
node_api_client -->|"sends API requests"| node_strapi
node_home -->|"fetches products"| node_api_client
node_category -->|"fetches listings"| node_api_client
node_product_detail -->|"fetches products"| node_api_client
node_header -->|"fetches categories"| node_api_client
node_header -->|"renders"| node_menu
node_header -->|"renders"| node_mobile_menu
node_app_shell -->|"renders"| node_header
node_app_shell -->|"renders"| node_footer
node_header -->|"uses layout"| node_wrapper
node_footer -->|"uses layout"| node_wrapper
node_app_shell -->|"provides state"| node_redux_store
node_redux_store -->|"registers reducer"| node_cart_state
node_success -->|"uses layout"| node_wrapper
node_failed -->|"uses layout"| node_wrapper

click node_home "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/index.js"
click node_category "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/category/%5Bslug%5D.js"
click node_product_detail "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/product/%5Bslug%5D.js"
click node_product_card "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/ProductCard.jsx"
click node_product_carousel "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/ProductDetailsCarousel.jsx"
click node_related_products "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/RelatedProducts.jsx"
click node_hero "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/HeroBanner.jsx"
click node_cart_page "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/cart.js"
click node_cart_item "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/CartItem.jsx"
click node_success "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/success.js"
click node_failed "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/failed.js"
click node_header "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Header.jsx"
click node_menu "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Menu.jsx"
click node_mobile_menu "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/MenuMobile.jsx"
click node_footer "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Footer.jsx"
click node_wrapper "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Wrapper.jsx"
click node_app_shell "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/_app.js"
click node_cart_state "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/store/cartSlice.js"
click node_redux_store "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/store/store.js"
click node_api_client "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/utils/api.js"
click node_price_helper "https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/utils/helper.js"

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_category,node_hero toneBlue
class node_product_detail,node_product_card,node_product_carousel,node_related_products,node_strapi toneAmber
class node_cart_page,node_cart_item,node_success,node_failed toneMint
class node_header,node_menu,node_mobile_menu,node_footer,node_wrapper,node_app_shell toneRose
class node_cart_state,node_redux_store,node_api_client,node_price_helper,node_shopper,node_stripe toneIndigo
```

## Components

### Storefront

- [Featured Home](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/index.js): `pages/index.js`
- [Category Listing](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/category/%5Bslug%5D.js): `pages/category/[slug].js`
- [Hero Banner](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/HeroBanner.jsx): `components/HeroBanner.jsx`

### Product Catalog

- [Product Details](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/product/%5Bslug%5D.js): `pages/product/[slug].js`
- [Product Card](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/ProductCard.jsx): `components/ProductCard.jsx`
- [Image Carousel](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/ProductDetailsCarousel.jsx): `components/ProductDetailsCarousel.jsx`
- [Related Products](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/RelatedProducts.jsx): `components/RelatedProducts.jsx`

### Cart & Checkout

- [Shopping Cart](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/cart.js): `pages/cart.js`
- [Cart Item](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/CartItem.jsx): `components/CartItem.jsx`
- [Order Success](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/success.js): `pages/success.js`
- [Order Failed](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/failed.js): `pages/failed.js`

### Shared UI

- [Site Header](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Header.jsx): `components/Header.jsx`
- [Desktop Menu](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Menu.jsx): `components/Menu.jsx`
- [Mobile Menu](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/MenuMobile.jsx): `components/MenuMobile.jsx`
- [Site Footer](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Footer.jsx): `components/Footer.jsx`
- [Layout Wrapper](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/components/Wrapper.jsx): `components/Wrapper.jsx`
- [App Shell](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/pages/_app.js): `pages/_app.js`

### Data & State

- [Cart State](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/store/cartSlice.js): `store/cartSlice.js`
- [Redux Store](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/store/store.js): `store/store.js`
- [API Client](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/utils/api.js): `utils/api.js`
- [Discount Helper](https://github.com/mailmeabhi1987/shoe-store-frontend/blob/main/utils/helper.js): `utils/helper.js`

### Other components

- **Shopper**
- **Strapi API**
- **Stripe Checkout**

## Connections

- Shopper → Featured Home: browses
- Shopper → Category Listing: browses
- Shopper → Product Details: opens product
- Shopper → Shopping Cart: opens cart
- Featured Home → Hero Banner: renders (evidence: `pages/index.js`)
- Featured Home → Product Card: renders (evidence: `pages/index.js`)
- Category Listing → Product Card: renders (evidence: `pages/category/[slug].js`)
- Product Details → Image Carousel: renders (evidence: `pages/product/[slug].js`)
- Product Details → Related Products: renders (evidence: `pages/product/[slug].js`)
- Related Products → Product Card: renders (evidence: `components/RelatedProducts.jsx`)
- Product Details → Discount Helper: calculates discount (evidence: `pages/product/[slug].js`)
- Product Card → Discount Helper: calculates discount (evidence: `components/ProductCard.jsx`)
- Product Details → Cart State: dispatches add (evidence: `pages/product/[slug].js`)
- Shopping Cart → Cart Item: renders (evidence: `pages/cart.js`)
- Cart Item → Cart State: dispatches updates (evidence: `components/CartItem.jsx`)
- Shopping Cart → API Client: requests payment (evidence: `pages/cart.js`)
- Shopping Cart → Stripe Checkout: starts checkout (evidence: `pages/cart.js`)
- API Client → Strapi API: sends API requests (evidence: `utils/api.js`)
- Featured Home → API Client: fetches products (evidence: `pages/index.js`)
- Category Listing → API Client: fetches listings (evidence: `pages/category/[slug].js`)
- Product Details → API Client: fetches products (evidence: `pages/product/[slug].js`)
- Site Header → API Client: fetches categories (evidence: `components/Header.jsx`)
- Site Header → Desktop Menu: renders (evidence: `components/Header.jsx`)
- Site Header → Mobile Menu: renders (evidence: `components/Header.jsx`)
- App Shell → Site Header: renders (evidence: `pages/_app.js`)
- App Shell → Site Footer: renders (evidence: `pages/_app.js`)
- Site Header → Layout Wrapper: uses layout (evidence: `components/Header.jsx`)
- Site Footer → Layout Wrapper: uses layout (evidence: `components/Footer.jsx`)
- App Shell → Redux Store: provides state (evidence: `pages/_app.js`)
- Redux Store → Cart State: registers reducer (evidence: `store/store.js`)
- Order Success → Layout Wrapper: uses layout (evidence: `pages/success.js`)
- Order Failed → Layout Wrapper: uses layout (evidence: `pages/failed.js`)
