# ikram-ikku/marki architecture

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

- Interactive diagram: https://gitdiagram.com/ikram-ikku/marki
- Repository: https://github.com/ikram-ikku/marki

## Overview

#### Purpose and Entry Points
This is a Vite-based React storefront for a shoe shop, with product browsing, filtering, cart, wishlist, and quick-view interactions. The primary application bootstrap is `src/main.jsx`, which mounts `src/App.jsx`. Vite configuration is in `vite.config.js`; `index.html` is the browser document entry point.

#### Application Composition
`src/App.jsx` assembles the storefront shell and page-level experience from reusable sections:
- Navigation and global actions: `src/components/Header.jsx`, `src/components/UtilityBar.jsx`
- Landing/shop presentation: `src/components/Hero.jsx`, `src/components/ShopHero.jsx`
- Product discovery: `src/components/FilterBar.jsx`, `src/components/ProductGrid.jsx`
- Persistent footer: `src/components/Footer.jsx`

The repository also contains static HTML pages under `pages/`, but the React/Vite application is the central runtime path.

#### Shared Commerce State Boundary
`src/context/ShopContext.jsx` is the core state boundary for commerce interactions. It is expected to own shared cart, wishlist, selected-product/modal, filtering, and notification state, allowing otherwise independent UI components to coordinate without prop chains.

Consumers include:
- Cart presentation: `src/components/CartDrawer.jsx`
- Wishlist presentation: `src/components/WishlistDrawer.jsx`
- Product detail interaction: `src/components/QuickViewModal.jsx`

#### Product Data and Discovery Flow
Product catalog data is local and originates in `src/data/products.js`. The product discovery pipeline is:
1. `src/components/FilterBar.jsx` and `src/components/MobileFilterModal.jsx` collect filter choices.
2. Shared shop state applies or exposes the active criteria.
3. `src/components/ProductGrid.jsx` renders matching catalog entries.
4. `src/components/ProductCard.jsx` displays each item and dispatches cart, wishlist, or quick-view actions.

This is a client-side catalog: no API, database, authentication service, or payment integration is present in the tree.

#### Overlays and User Feedback
Interactive commerce views are modeled as UI overlays rather than separate routes:
- `src/components/CartDrawer.jsx` exposes cart contents and checkout-oriented actions.
- `src/components/WishlistDrawer.jsx` exposes saved products.
- `src/components/QuickViewModal.jsx` presents product details from grid/card actions.
- `src/components/Toast.jsx` provides transient feedback for actions such as adding items.

These components depend on the shared state layer rather than directly owning catalog data.

#### Styling and Static Assets
Styling is split between global styles (`src/index.css`, `src/css/style.css`) and domain-specific styles such as `src/css/products.css`, `src/css/navbar.css`, and `src/css/shop.css`. Product and branding imagery are served as static assets from `public/images/shoes` and `public/images/logo`.

#### Legacy or Parallel Front-End Assets
`src/js/main.js`, `src/js/cart.js`, `src/js/products.js`, and `src/js/navbar.js` indicate a separate imperative JavaScript implementation or retained legacy scripts. They should be treated as a boundary from the React state architecture unless explicitly imported by `src/main.jsx` or `src/App.jsx`; avoid creating duplicated cart or product state across both models.

Main entry points: [`src/App.jsx`](https://github.com/ikram-ikku/marki/blob/main/src/App.jsx) (Storefront Shell), [`src/context/ShopContext.jsx`](https://github.com/ikram-ikku/marki/blob/main/src/context/ShopContext.jsx) (Shop Context), [`src/components/ProductGrid.jsx`](https://github.com/ikram-ikku/marki/blob/main/src/components/ProductGrid.jsx) (Product Grid), [`src/main.jsx`](https://github.com/ikram-ikku/marki/blob/main/src/main.jsx) (React Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_react["React Storefront"]
  node_main["React Bootstrap<br/>client entry<br/>[main.jsx]"]
  node_app["Storefront Shell<br/>React composition<br/>[App.jsx]"]
  node_header["Header &amp; Utility Actions<br/>navigation UI<br/>[Header.jsx]"]
  node_landing["Landing &amp; Shop Heroes<br/>presentation UI<br/>[Hero.jsx]"]
end

subgraph group_commerce["Commerce State &amp; Discovery"]
  node_filters["Filter Controls<br/>discovery UI<br/>[FilterBar.jsx]"]
  node_mobile_filters["Mobile Filters<br/>discovery overlay"]
  node_shop_context{{"Shop Context<br/>shared commerce state<br/>[ShopContext.jsx]"}}
  node_catalog[("Product Catalog<br/>local product data<br/>[products.js]")]
  node_grid["Product Grid<br/>catalog renderer<br/>[ProductGrid.jsx]"]
  node_card["Product Card<br/>product interaction UI<br/>[ProductCard.jsx]"]
end

subgraph group_overlays["Interactive Overlays"]
  node_cart["Cart Drawer<br/>commerce overlay<br/>[CartDrawer.jsx]"]
  node_wishlist["Wishlist Drawer<br/>commerce overlay<br/>[WishlistDrawer.jsx]"]
  node_quickview["Quick View Modal<br/>product overlay<br/>[QuickViewModal.jsx]"]
  node_toast["Toast Feedback<br/>notification UI<br/>[Toast.jsx]"]
end

subgraph group_assets["Styling &amp; Assets"]
  node_styles["Storefront Styles<br/>CSS<br/>[index.css]"]
  node_images["Product &amp; Brand Images<br/>static assets"]
end

node_html["Browser Document<br/>HTML entry<br/>[index.html]"]
node_vite{{"Vite Build<br/>build tool<br/>[vite.config.js]"}}
node_legacy["Legacy Imperative Scripts<br/>parallel frontend boundary<br/>[main.js]"]

node_html -->|"loads app"| node_main
node_vite -->|"builds"| node_main
node_main -->|"mounts"| node_app
node_app -->|"composes"| node_header
node_app -->|"composes"| node_landing
node_app -->|"composes"| node_filters
node_app -->|"composes"| node_grid
node_app -->|"hosts"| node_cart
node_app -->|"hosts"| node_wishlist
node_app -->|"hosts"| node_quickview
node_app -->|"hosts"| node_toast
node_filters -->|"sets criteria"| node_shop_context
node_mobile_filters -->|"sets criteria"| node_shop_context
node_shop_context -->|"uses catalog"| node_catalog
node_shop_context -->|"provides active criteria"| node_grid
node_grid -->|"renders matches"| node_catalog
node_grid -->|"renders items"| node_card
node_card -->|"dispatches commerce actions"| node_shop_context
node_cart -->|"reads and updates cart"| node_shop_context
node_wishlist -->|"reads and updates wishlist"| node_shop_context
node_quickview -->|"reads selected product"| node_shop_context
node_toast -->|"reads notifications"| node_shop_context
node_app -->|"applies"| node_styles
node_catalog -->|"references"| node_images
node_legacy -.->|"kept separate"| node_shop_context

click node_html "https://github.com/ikram-ikku/marki/blob/main/index.html"
click node_vite "https://github.com/ikram-ikku/marki/blob/main/vite.config.js"
click node_main "https://github.com/ikram-ikku/marki/blob/main/src/main.jsx"
click node_app "https://github.com/ikram-ikku/marki/blob/main/src/App.jsx"
click node_header "https://github.com/ikram-ikku/marki/blob/main/src/components/Header.jsx"
click node_landing "https://github.com/ikram-ikku/marki/blob/main/src/components/Hero.jsx"
click node_filters "https://github.com/ikram-ikku/marki/blob/main/src/components/FilterBar.jsx"
click node_mobile_filters "https://github.com/ikram-ikku/marki/blob/main/src/components/MobileFilterModal.jsx"
click node_shop_context "https://github.com/ikram-ikku/marki/blob/main/src/context/ShopContext.jsx"
click node_catalog "https://github.com/ikram-ikku/marki/blob/main/src/data/products.js"
click node_grid "https://github.com/ikram-ikku/marki/blob/main/src/components/ProductGrid.jsx"
click node_card "https://github.com/ikram-ikku/marki/blob/main/src/components/ProductCard.jsx"
click node_cart "https://github.com/ikram-ikku/marki/blob/main/src/components/CartDrawer.jsx"
click node_wishlist "https://github.com/ikram-ikku/marki/blob/main/src/components/WishlistDrawer.jsx"
click node_quickview "https://github.com/ikram-ikku/marki/blob/main/src/components/QuickViewModal.jsx"
click node_toast "https://github.com/ikram-ikku/marki/blob/main/src/components/Toast.jsx"
click node_styles "https://github.com/ikram-ikku/marki/blob/main/src/index.css"
click node_images "https://github.com/ikram-ikku/marki/tree/main/public/images/shoes"
click node_legacy "https://github.com/ikram-ikku/marki/blob/main/src/js/main.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_main,node_app,node_header,node_landing toneBlue
class node_filters,node_mobile_filters,node_shop_context,node_catalog,node_grid,node_card toneAmber
class node_cart,node_wishlist,node_quickview,node_toast toneMint
class node_styles,node_images toneRose
class node_html,node_vite,node_legacy toneNeutral
```

## Components

### React Storefront

- [React Bootstrap](https://github.com/ikram-ikku/marki/blob/main/src/main.jsx): client entry · `src/main.jsx`
- [Storefront Shell](https://github.com/ikram-ikku/marki/blob/main/src/App.jsx): React composition · `src/App.jsx`
- [Header & Utility Actions](https://github.com/ikram-ikku/marki/blob/main/src/components/Header.jsx): navigation UI · `src/components/Header.jsx`
- [Landing & Shop Heroes](https://github.com/ikram-ikku/marki/blob/main/src/components/Hero.jsx): presentation UI · `src/components/Hero.jsx`

### Commerce State & Discovery

- [Filter Controls](https://github.com/ikram-ikku/marki/blob/main/src/components/FilterBar.jsx): discovery UI · `src/components/FilterBar.jsx`
- [Mobile Filters](https://github.com/ikram-ikku/marki/blob/main/src/components/MobileFilterModal.jsx): discovery overlay · `src/components/MobileFilterModal.jsx`
- [Shop Context](https://github.com/ikram-ikku/marki/blob/main/src/context/ShopContext.jsx): shared commerce state · Owns cart, wishlist, selection, filters, and notifications. · `src/context/ShopContext.jsx`
- [Product Catalog](https://github.com/ikram-ikku/marki/blob/main/src/data/products.js): local product data · `src/data/products.js`
- [Product Grid](https://github.com/ikram-ikku/marki/blob/main/src/components/ProductGrid.jsx): catalog renderer · `src/components/ProductGrid.jsx`
- [Product Card](https://github.com/ikram-ikku/marki/blob/main/src/components/ProductCard.jsx): product interaction UI · `src/components/ProductCard.jsx`

### Interactive Overlays

- [Cart Drawer](https://github.com/ikram-ikku/marki/blob/main/src/components/CartDrawer.jsx): commerce overlay · `src/components/CartDrawer.jsx`
- [Wishlist Drawer](https://github.com/ikram-ikku/marki/blob/main/src/components/WishlistDrawer.jsx): commerce overlay · `src/components/WishlistDrawer.jsx`
- [Quick View Modal](https://github.com/ikram-ikku/marki/blob/main/src/components/QuickViewModal.jsx): product overlay · `src/components/QuickViewModal.jsx`
- [Toast Feedback](https://github.com/ikram-ikku/marki/blob/main/src/components/Toast.jsx): notification UI · `src/components/Toast.jsx`

### Styling & Assets

- [Storefront Styles](https://github.com/ikram-ikku/marki/blob/main/src/index.css): CSS · Global and domain-specific styling. · `src/index.css`
- [Product & Brand Images](https://github.com/ikram-ikku/marki/tree/main/public/images/shoes): static assets · `public/images/shoes`

### Other components

- [Browser Document](https://github.com/ikram-ikku/marki/blob/main/index.html): HTML entry · `index.html`
- [Vite Build](https://github.com/ikram-ikku/marki/blob/main/vite.config.js): build tool · `vite.config.js`
- [Legacy Imperative Scripts](https://github.com/ikram-ikku/marki/blob/main/src/js/main.js): parallel frontend boundary · Retained separately from React commerce state. · `src/js/main.js`

## Connections

- Browser Document → React Bootstrap: loads app
- Vite Build → React Bootstrap: builds
- React Bootstrap → Storefront Shell: mounts
- Storefront Shell → Header & Utility Actions: composes
- Storefront Shell → Landing & Shop Heroes: composes
- Storefront Shell → Filter Controls: composes
- Storefront Shell → Product Grid: composes
- Storefront Shell → Cart Drawer: hosts
- Storefront Shell → Wishlist Drawer: hosts
- Storefront Shell → Quick View Modal: hosts
- Storefront Shell → Toast Feedback: hosts
- Filter Controls → Shop Context: sets criteria
- Mobile Filters → Shop Context: sets criteria
- Shop Context → Product Catalog: uses catalog
- Shop Context → Product Grid: provides active criteria
- Product Grid → Product Catalog: renders matches
- Product Grid → Product Card: renders items
- Product Card → Shop Context: dispatches commerce actions
- Cart Drawer → Shop Context: reads and updates cart
- Wishlist Drawer → Shop Context: reads and updates wishlist
- Quick View Modal → Shop Context: reads selected product
- Toast Feedback → Shop Context: reads notifications
- Storefront Shell → Storefront Styles: applies
- Product Catalog → Product & Brand Images: references
- Legacy Imperative Scripts → Shop Context: kept separate
