# 2024uch1376-spec/blinkit-clone architecture

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

- Interactive diagram: https://gitdiagram.com/2024uch1376-spec/blinkit-clone
- Repository: https://github.com/2024uch1376-spec/blinkit-clone

## Overview

#### Purpose and runtime
This is a Vite-served React single-page front-end that recreates a Blinkit-style quick-commerce flow. It uses React Router for page navigation, Tailwind/CSS for presentation and animations, FontAwesome icons, static assets, and local mock data; no backend, database, or real payment/location service is represented.

#### Bootstrap and application shell
- `src/main.jsx` mounts the React application into the browser.
- `src/App.jsx` is the central composition and state boundary: it configures routes and coordinates cross-cutting UI/business state such as cart, authentication, wallet, location, modal visibility, and order behavior.
- `app.js` and `index.html` are root-level browser/application artifacts; Vite configuration is in `vite.config.js`.

#### Catalog and discovery
The product catalog is local mock data in `src/data/products.js`. Home and category experiences render that data through reusable catalog surfaces:
- `src/pages/Home.jsx`
- `src/pages/CategoryDetail.jsx`
- `src/components/CategoryGrid.jsx`
- `src/components/CategorySlider.jsx`
- `src/components/ProductGrid.jsx`
- `src/components/ProductCard.jsx`

Search input flows from the header into filtered product suggestions via `src/components/SearchAutocompleteDropdown.jsx`; product selection can open `src/components/ProductDetailModal.jsx`.

#### Cart and checkout flow
Product add actions update application-level cart state, then drive several coordinated views:
- `src/components/CartFlyOverlay.jsx` provides add-to-cart animation feedback.
- `src/components/CartDrawer.jsx` exposes the active cart, quantities, pricing, fees, coupons, and order summary.
- `src/pages/CartPage.jsx` provides the dedicated cart route.
- `src/components/CheckoutModal.jsx` finalizes the simulated purchase flow.

Checkout is a front-end state transition: coupon validation, totals, wallet/payment decisions, and resulting order records are simulated rather than sent to external APIs.

#### Identity, location, and customer state
The header is the primary global interaction surface:
- `src/components/Header.jsx`
- `src/components/LoginModal.jsx`
- `src/components/LocationSearchModal.jsx`

Login uses simulated mobile OTP behavior. Location search simulates GPS/address selection. These states gate or personalize checkout, wallet, and order-history experiences but have no indicated persistence or external authentication/geocoding boundary.

#### Post-purchase and account areas
Account-oriented routes consume the app’s simulated user, order, and financial state:
- `src/pages/OrderHistory.jsx` presents orders and delivery status progression.
- `src/pages/Wallet.jsx` presents balance, promotional credit, cashback, and transactions.
- `src/pages/Favorites.jsx` manages saved products.
- `src/pages/Support.jsx` is the customer-support interaction surface.

`src/components/Footer.jsx` supplies shared navigation/context around these routes.

#### Presentation and assets
The design system is primarily Tailwind plus custom global styles:
- `src/index.css`
- `tailwind.config.js`
- `postcss.config.js`

Static imagery is served from `public/images` and `images`. The main architectural boundary is therefore browser-local React state and mock catalog data versus UI components/pages; the repository does not expose server-side APIs, persistence, payment processing, or deployed infrastructure.

Main entry points: [`src/App.jsx`](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/App.jsx) (App state & routes), [`src/components/CheckoutModal.jsx`](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CheckoutModal.jsx) (Checkout modal), [`src/components/CartDrawer.jsx`](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CartDrawer.jsx) (Cart views), [`src/components/ProductGrid.jsx`](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/ProductGrid.jsx) (Catalog surfaces)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser runtime"]
  node_vite{{"Vite app host<br/>build/runtime<br/>[vite.config.js]"}}
  node_entry["React entry<br/>bootstrap<br/>[main.jsx]"]
  node_app["App state &amp; routes<br/>application shell<br/>[App.jsx]"]
  node_header["Header<br/>global UI<br/>[Header.jsx]"]
end

subgraph group_discovery["Catalog &amp; discovery"]
  node_catalog[("Mock product catalog<br/>local data<br/>[products.js]")]
  node_home["Home<br/>route page<br/>[Home.jsx]"]
  node_category["Category detail<br/>route page<br/>[CategoryDetail.jsx]"]
  node_catalog_surfaces["Catalog surfaces<br/>reusable UI<br/>[ProductGrid.jsx]"]
  node_search["Search autocomplete<br/>search UI"]
  node_product_modal["Product detail modal"]
end

subgraph group_commerce["Cart &amp; checkout"]
  node_cart["Cart views<br/>cart UI<br/>[CartDrawer.jsx]"]
  node_cart_fly["Cart fly overlay<br/>animation UI<br/>[CartFlyOverlay.jsx]"]
  node_checkout["Checkout modal<br/>simulated checkout<br/>[CheckoutModal.jsx]"]
end

subgraph group_account["Customer state"]
  node_identity_modals["Login &amp; location modals<br/>simulated services UI<br/>[LoginModal.jsx]"]
  node_orders["Order history<br/>route page<br/>[OrderHistory.jsx]"]
  node_wallet["Wallet<br/>route page<br/>[Wallet.jsx]"]
  node_favorites["Favorites<br/>route page<br/>[Favorites.jsx]"]
  node_support["Support<br/>route page<br/>[Support.jsx]"]
end

subgraph group_presentation["Presentation"]
  node_footer["Footer<br/>shared navigation<br/>[Footer.jsx]"]
  node_styles["Global styles<br/>Tailwind/CSS<br/>[index.css]"]
  node_assets["Static imagery<br/>static assets"]
end

node_vite -->|"serves"| node_entry
node_entry -->|"mounts"| node_app
node_app -->|"renders"| node_header
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_category
node_app -->|"coordinates cart state"| node_cart
node_app -->|"controls modal"| node_checkout
node_app -->|"controls identity/location"| node_identity_modals
node_app -->|"provides order state"| node_orders
node_app -->|"provides wallet state"| node_wallet
node_app -->|"provides saved products"| node_favorites
node_app -->|"routes to"| node_support
node_app -->|"renders"| node_footer
node_catalog -->|"supplies products"| node_home
node_catalog -->|"supplies products"| node_category
node_catalog -->|"filters"| node_search
node_home -->|"renders"| node_catalog_surfaces
node_category -->|"renders"| node_catalog_surfaces
node_header -->|"passes search input"| node_search
node_search -->|"selects product"| node_product_modal
node_catalog_surfaces -->|"opens product"| node_product_modal
node_product_modal -->|"adds item"| node_cart
node_cart -->|"triggers feedback"| node_cart_fly
node_cart -->|"starts checkout"| node_checkout
node_identity_modals -.->|"gates/personalizes"| node_checkout
node_checkout -->|"creates local order"| node_orders
node_checkout -->|"uses local wallet state"| node_wallet
node_styles -.->|"styles UI"| node_app
node_assets -.->|"product imagery"| node_catalog_surfaces

click node_vite "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/vite.config.js"
click node_entry "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/main.jsx"
click node_app "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/App.jsx"
click node_header "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/Header.jsx"
click node_catalog "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/data/products.js"
click node_home "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Home.jsx"
click node_category "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/CategoryDetail.jsx"
click node_catalog_surfaces "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/ProductGrid.jsx"
click node_search "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/SearchAutocompleteDropdown.jsx"
click node_product_modal "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/ProductDetailModal.jsx"
click node_cart "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CartDrawer.jsx"
click node_cart_fly "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CartFlyOverlay.jsx"
click node_checkout "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CheckoutModal.jsx"
click node_identity_modals "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/LoginModal.jsx"
click node_orders "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/OrderHistory.jsx"
click node_wallet "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Wallet.jsx"
click node_favorites "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Favorites.jsx"
click node_support "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Support.jsx"
click node_footer "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/Footer.jsx"
click node_styles "https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/index.css"
click node_assets "https://github.com/2024uch1376-spec/blinkit-clone/tree/main/public/images"

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_vite,node_entry,node_app,node_header toneBlue
class node_catalog,node_home,node_category,node_catalog_surfaces,node_search,node_product_modal toneAmber
class node_cart,node_cart_fly,node_checkout toneMint
class node_identity_modals,node_orders,node_wallet,node_favorites,node_support toneRose
class node_footer,node_styles,node_assets toneIndigo
```

## Components

### Browser runtime

- [Vite app host](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/vite.config.js): build/runtime · Serves the browser SPA. · `vite.config.js`
- [React entry](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/main.jsx): bootstrap · `src/main.jsx`
- [App state & routes](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/App.jsx): application shell · Central boundary for cart, identity, wallet, location, modals, and orders. · `src/App.jsx`
- [Header](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/Header.jsx): global UI · `src/components/Header.jsx`

### Catalog & discovery

- [Mock product catalog](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/data/products.js): local data · `src/data/products.js`
- [Home](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Home.jsx): route page · `src/pages/Home.jsx`
- [Category detail](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/CategoryDetail.jsx): route page · `src/pages/CategoryDetail.jsx`
- [Catalog surfaces](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/ProductGrid.jsx): reusable UI · Category grids, sliders, product grid, and product cards. · `src/components/ProductGrid.jsx`
- [Search autocomplete](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/SearchAutocompleteDropdown.jsx): search UI · `src/components/SearchAutocompleteDropdown.jsx`
- [Product detail modal](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/ProductDetailModal.jsx): modal · `src/components/ProductDetailModal.jsx`

### Cart & checkout

- [Cart views](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CartDrawer.jsx): cart UI · Drawer and dedicated cart route expose quantities, pricing, fees, and coupons. · `src/components/CartDrawer.jsx`
- [Cart fly overlay](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CartFlyOverlay.jsx): animation UI · `src/components/CartFlyOverlay.jsx`
- [Checkout modal](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/CheckoutModal.jsx): simulated checkout · Calculates payment decisions and creates local orders. · `src/components/CheckoutModal.jsx`

### Customer state

- [Login & location modals](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/LoginModal.jsx): simulated services UI · Simulates OTP login and GPS/address selection. · `src/components/LoginModal.jsx`
- [Order history](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/OrderHistory.jsx): route page · Displays locally simulated orders and delivery progression. · `src/pages/OrderHistory.jsx`
- [Wallet](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Wallet.jsx): route page · `src/pages/Wallet.jsx`
- [Favorites](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Favorites.jsx): route page · `src/pages/Favorites.jsx`
- [Support](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/pages/Support.jsx): route page · `src/pages/Support.jsx`

### Presentation

- [Footer](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/components/Footer.jsx): shared navigation · `src/components/Footer.jsx`
- [Global styles](https://github.com/2024uch1376-spec/blinkit-clone/blob/main/src/index.css): Tailwind/CSS · `src/index.css`
- [Static imagery](https://github.com/2024uch1376-spec/blinkit-clone/tree/main/public/images): static assets · `public/images`

## Connections

- Vite app host → React entry: serves
- React entry → App state & routes: mounts
- App state & routes → Header: renders
- App state & routes → Home: routes to
- App state & routes → Category detail: routes to
- App state & routes → Cart views: coordinates cart state
- App state & routes → Checkout modal: controls modal
- App state & routes → Login & location modals: controls identity/location
- App state & routes → Order history: provides order state
- App state & routes → Wallet: provides wallet state
- App state & routes → Favorites: provides saved products
- App state & routes → Support: routes to
- App state & routes → Footer: renders
- Mock product catalog → Home: supplies products
- Mock product catalog → Category detail: supplies products
- Mock product catalog → Search autocomplete: filters
- Home → Catalog surfaces: renders
- Category detail → Catalog surfaces: renders
- Header → Search autocomplete: passes search input
- Search autocomplete → Product detail modal: selects product
- Catalog surfaces → Product detail modal: opens product
- Product detail modal → Cart views: adds item
- Cart views → Cart fly overlay: triggers feedback
- Cart views → Checkout modal: starts checkout
- Login & location modals → Checkout modal: gates/personalizes
- Checkout modal → Order history: creates local order
- Checkout modal → Wallet: uses local wallet state
- Global styles → App state & routes: styles UI
- Static imagery → Catalog surfaces: product imagery
