How ikram-ikku/marki works
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: App.jsx Storefront Shell · ShopContext.jsx Shop Context · ProductGrid.jsx Product Grid · main.jsx React Bootstrap
Components 19
React Storefront
- React Bootstrap
src/main.jsx - Storefront Shell
src/App.jsx - Header & Utility Actions
src/components/Header.jsx - Landing & Shop Heroes
src/components/Hero.jsx
Commerce State & Discovery
- Filter Controls
src/components/FilterBar.jsx - Mobile Filters
src/components/MobileFilterModal.jsx - Shop Context · Owns cart, wishlist, selection, filters, and notifications.
src/context/ShopContext.jsx - Product Catalog
src/data/products.js - Product Grid
src/components/ProductGrid.jsx - Product Card
src/components/ProductCard.jsx
Interactive Overlays
- Cart Drawer
src/components/CartDrawer.jsx - Wishlist Drawer
src/components/WishlistDrawer.jsx - Quick View Modal
src/components/QuickViewModal.jsx - Toast Feedback
src/components/Toast.jsx
Styling & Assets
- Storefront Styles · Global and domain-specific styling.
src/index.css - Product & Brand Images
public/images/shoes
Other components
- Browser Document
index.html - Vite Build
vite.config.js - Legacy Imperative Scripts · Retained separately from React commerce state.
src/js/main.js
Connections 25
- 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