# gopalmaheshwari18/amazon-clone architecture

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

- Interactive diagram: https://gitdiagram.com/gopalmaheshwari18/amazon-clone
- Repository: https://github.com/gopalmaheshwari18/amazon-clone

## Overview

This is a client-rendered Amazon-style storefront, not a commerce backend: users browse a static product catalog, search or filter it, add items to an in-memory cart, and inspect a subtotal in a drawer. App.jsx owns filtering, cart state, and composition; the child components render the storefront stages. The README gives no further product capabilities, and no persistence, checkout processing, or external commerce service is evidenced. Source excerpts show component calls, but not browser entry wiring in main.jsx.

Main entry points: [`src/App.jsx`](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx) (Storefront state), [`src/Components/Navbar.jsx`](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Navbar.jsx) (Search navigation), [`src/Components/productCard.jsx`](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/productCard.jsx) (Product card), [`src/data/product.js`](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/data/product.js) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Storefront browsing"]
  node_app["Storefront state<br/>[App.jsx]"]
  node_catalog["Product catalog<br/>[product.js]"]
  node_search_nav["Search navigation<br/>[Navbar.jsx]"]
  node_product_grid["Filtered product grid<br/>[App.jsx]"]
  node_product_card["Product card<br/>[productCard.jsx]"]
end

subgraph group_cart["Cart experience"]
  node_cart_state["In-memory cart<br/>[App.jsx]"]
  node_cart_drawer["Cart drawer<br/>[Cartdrawer.jsx]"]
end

subgraph group_presentation["Storefront presentation"]
  node_hero["Promotional banner<br/>[Herobanner.jsx]"]
  node_footer["Storefront footer<br/>[Footer.jsx]"]
end

node_visitor(("Shopper"))

node_visitor -->|"enters search"| node_search_nav
node_search_nav -->|"updates search"| node_app
node_app -->|"filters products"| node_catalog
node_app -->|"renders results"| node_product_grid
node_product_grid -->|"renders cards"| node_product_card
node_product_card -->|"adds product"| node_app
node_app -->|"updates items"| node_cart_state
node_cart_state -->|"passes count"| node_search_nav
node_cart_state -->|"passes items"| node_cart_drawer
node_visitor -->|"chooses category"| node_app
node_visitor -->|"opens cart"| node_app
node_visitor -->|"views offers"| node_hero
node_visitor -->|"views footer"| node_footer

click node_app "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx"
click node_catalog "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/data/product.js"
click node_search_nav "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Navbar.jsx"
click node_product_grid "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx"
click node_product_card "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/productCard.jsx"
click node_hero "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Herobanner.jsx"
click node_footer "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Footer.jsx"
click node_cart_state "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx"
click node_cart_drawer "https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Cartdrawer.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_app,node_catalog,node_search_nav,node_product_grid,node_product_card toneBlue
class node_cart_state,node_cart_drawer toneAmber
class node_hero,node_footer toneMint
class node_visitor toneIndigo
```

## Components

### Storefront browsing

- [Storefront state](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx): `src/App.jsx`
- [Product catalog](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/data/product.js): `src/data/product.js`
- [Search navigation](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Navbar.jsx): `src/Components/Navbar.jsx`
- [Filtered product grid](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx): `src/App.jsx`
- [Product card](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/productCard.jsx): `src/Components/productCard.jsx`

### Cart experience

- [In-memory cart](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/App.jsx): `src/App.jsx`
- [Cart drawer](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Cartdrawer.jsx): `src/Components/Cartdrawer.jsx`

### Storefront presentation

- [Promotional banner](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Herobanner.jsx): `src/Components/Herobanner.jsx`
- [Storefront footer](https://github.com/gopalmaheshwari18/amazon-clone/blob/main/src/Components/Footer.jsx): `src/Components/Footer.jsx`

### Other components

- **Shopper**

## Connections

- Shopper → Search navigation: enters search (evidence: `src/Components/Navbar.jsx`)
- Search navigation → Storefront state: updates search (evidence: `src/App.jsx`)
- Storefront state → Product catalog: filters products (evidence: `src/App.jsx`)
- Storefront state → Filtered product grid: renders results (evidence: `src/App.jsx`)
- Filtered product grid → Product card: renders cards (evidence: `src/App.jsx`)
- Product card → Storefront state: adds product (evidence: `src/App.jsx`)
- Storefront state → In-memory cart: updates items (evidence: `src/App.jsx`)
- In-memory cart → Search navigation: passes count (evidence: `src/App.jsx`)
- In-memory cart → Cart drawer: passes items (evidence: `src/App.jsx`)
- Shopper → Storefront state: chooses category (evidence: `src/App.jsx`)
- Shopper → Storefront state: opens cart (evidence: `src/App.jsx`)
- Shopper → Promotional banner: views offers
- Shopper → Storefront footer: views footer
