# sivayeti/e-mart architecture

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

- Interactive diagram: https://gitdiagram.com/sivayeti/e-mart
- Repository: https://github.com/sivayeti/e-mart

## Overview

This is a React e-commerce storefront: shoppers browse category listings, filter mobile products, open a mobile’s detail route, add it to a shared cart, and view or remove cart items. The graph also covers the home-page category showcases and the broader category catalog. Several category pages, showcase components, and data modules are represented by their source directories; their relationships are included only where the SOURCE INDEX records imports. No backend or persistent store is evidenced.

Main entry points: [`src/App.jsx`](https://github.com/sivayeti/e-mart/blob/main/src/App.jsx) (Route dispatch), [`src/stores/components/Navbar.jsx`](https://github.com/sivayeti/e-mart/blob/main/src/stores/components/Navbar.jsx) (Category navigation), [`src/stores/pages/MobilePage.jsx`](https://github.com/sivayeti/e-mart/blob/main/src/stores/pages/MobilePage.jsx) (Mobile listing), [`src/singles/MobileSingle.jsx`](https://github.com/sivayeti/e-mart/blob/main/src/singles/MobileSingle.jsx) (Mobile details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application routing"]
  node_bootstrap["React bootstrap<br/>[main.jsx]"]
  node_routes["Route dispatch<br/>[App.jsx]"]
end

subgraph group_browse["Product browsing"]
  node_home["Home page<br/>[LandingPage.jsx]"]
  node_navigation["Category navigation<br/>[Navbar.jsx]"]
  node_category_pages["Category pages"]
  node_mobile_list["Mobile listing<br/>[MobilePage.jsx]"]
  node_mobile_detail["Mobile details<br/>[MobileSingle.jsx]"]
  node_showcases["Home showcases"]
end

subgraph group_catalog["Product catalog"]
  node_catalog_data["Product datasets"]
end

subgraph group_cart["Cart state"]
  node_cart_context["Cart state<br/>[CartContext.jsx]"]
  node_cart_page["Cart view<br/>[UserCart.jsx]"]
end

node_shopper(("Shopper"))

node_shopper -->|"opens storefront"| node_routes
node_bootstrap -->|"renders"| node_routes
node_bootstrap -->|"wraps app"| node_cart_context
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_category_pages
node_routes -->|"routes to"| node_mobile_list
node_routes -->|"routes to"| node_mobile_detail
node_routes -->|"routes to"| node_cart_page
node_home -->|"uses"| node_navigation
node_home -->|"renders"| node_showcases
node_showcases -->|"reads datasets"| node_catalog_data
node_category_pages -->|"uses"| node_navigation
node_category_pages -->|"reads datasets"| node_catalog_data
node_mobile_list -->|"uses"| node_navigation
node_mobile_list -->|"filters products"| node_catalog_data
node_mobile_list -->|"links products"| node_mobile_detail
node_mobile_detail -->|"finds product"| node_catalog_data
node_mobile_detail -->|"adds product"| node_cart_context
node_navigation -->|"reads item count"| node_cart_context
node_navigation -->|"links cart"| node_cart_page
node_cart_page -->|"uses"| node_navigation
node_cart_page -->|"reads and removes"| node_cart_context

click node_bootstrap "https://github.com/sivayeti/e-mart/blob/main/src/main.jsx"
click node_routes "https://github.com/sivayeti/e-mart/blob/main/src/App.jsx"
click node_home "https://github.com/sivayeti/e-mart/blob/main/src/stores/pages/LandingPage.jsx"
click node_navigation "https://github.com/sivayeti/e-mart/blob/main/src/stores/components/Navbar.jsx"
click node_category_pages "https://github.com/sivayeti/e-mart/tree/main/src/stores/pages"
click node_mobile_list "https://github.com/sivayeti/e-mart/blob/main/src/stores/pages/MobilePage.jsx"
click node_mobile_detail "https://github.com/sivayeti/e-mart/blob/main/src/singles/MobileSingle.jsx"
click node_showcases "https://github.com/sivayeti/e-mart/tree/main/src/stores/components"
click node_catalog_data "https://github.com/sivayeti/e-mart/tree/main/src/stores/data"
click node_cart_context "https://github.com/sivayeti/e-mart/blob/main/src/stores/context/CartContext.jsx"
click node_cart_page "https://github.com/sivayeti/e-mart/blob/main/src/stores/UserCart.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_bootstrap,node_routes toneBlue
class node_home,node_navigation,node_category_pages,node_mobile_list,node_mobile_detail,node_showcases toneAmber
class node_catalog_data toneMint
class node_cart_context,node_cart_page toneRose
class node_shopper toneIndigo
```

## Components

### Application routing

- [React bootstrap](https://github.com/sivayeti/e-mart/blob/main/src/main.jsx): `src/main.jsx`
- [Route dispatch](https://github.com/sivayeti/e-mart/blob/main/src/App.jsx): `src/App.jsx`

### Product browsing

- [Home page](https://github.com/sivayeti/e-mart/blob/main/src/stores/pages/LandingPage.jsx): `src/stores/pages/LandingPage.jsx`
- [Category navigation](https://github.com/sivayeti/e-mart/blob/main/src/stores/components/Navbar.jsx): `src/stores/components/Navbar.jsx`
- [Category pages](https://github.com/sivayeti/e-mart/tree/main/src/stores/pages): `src/stores/pages`
- [Mobile listing](https://github.com/sivayeti/e-mart/blob/main/src/stores/pages/MobilePage.jsx): `src/stores/pages/MobilePage.jsx`
- [Mobile details](https://github.com/sivayeti/e-mart/blob/main/src/singles/MobileSingle.jsx): `src/singles/MobileSingle.jsx`
- [Home showcases](https://github.com/sivayeti/e-mart/tree/main/src/stores/components): `src/stores/components`

### Product catalog

- [Product datasets](https://github.com/sivayeti/e-mart/tree/main/src/stores/data): `src/stores/data`

### Cart state

- [Cart state](https://github.com/sivayeti/e-mart/blob/main/src/stores/context/CartContext.jsx): `src/stores/context/CartContext.jsx`
- [Cart view](https://github.com/sivayeti/e-mart/blob/main/src/stores/UserCart.jsx): `src/stores/UserCart.jsx`

### Other components

- **Shopper**

## Connections

- Shopper → Route dispatch: opens storefront (evidence: `src/App.jsx`)
- React bootstrap → Route dispatch: renders (evidence: `src/main.jsx`)
- React bootstrap → Cart state: wraps app (evidence: `src/main.jsx`)
- Route dispatch → Home page: routes to (evidence: `src/App.jsx`)
- Route dispatch → Category pages: routes to (evidence: `src/App.jsx`)
- Route dispatch → Mobile listing: routes to (evidence: `src/App.jsx`)
- Route dispatch → Mobile details: routes to (evidence: `src/App.jsx`)
- Route dispatch → Cart view: routes to (evidence: `src/App.jsx`)
- Home page → Category navigation: uses (evidence: `src/stores/pages/LandingPage.jsx`)
- Home page → Home showcases: renders (evidence: `src/stores/pages/LandingPage.jsx`)
- Home showcases → Product datasets: reads datasets (evidence: `src/stores/components/Products.jsx`)
- Category pages → Category navigation: uses (evidence: `src/stores/pages/AcPage.jsx`)
- Category pages → Product datasets: reads datasets (evidence: `src/stores/pages/ComputerPage.jsx`)
- Mobile listing → Category navigation: uses (evidence: `src/stores/pages/MobilePage.jsx`)
- Mobile listing → Product datasets: filters products (evidence: `src/stores/pages/MobilePage.jsx`)
- Mobile listing → Mobile details: links products (evidence: `src/stores/pages/MobilePage.jsx`)
- Mobile details → Product datasets: finds product (evidence: `src/singles/MobileSingle.jsx`)
- Mobile details → Cart state: adds product (evidence: `src/singles/MobileSingle.jsx`)
- Category navigation → Cart state: reads item count (evidence: `src/stores/components/Navbar.jsx`)
- Category navigation → Cart view: links cart (evidence: `src/stores/components/Navbar.jsx`)
- Cart view → Category navigation: uses (evidence: `src/stores/UserCart.jsx`)
- Cart view → Cart state: reads and removes (evidence: `src/stores/UserCart.jsx`)
