# ragulchandru/organic-product architecture

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

- Interactive diagram: https://gitdiagram.com/ragulchandru/organic-product
- Repository: https://github.com/ragulchandru/organic-product

## Overview

Vaishu Organics is a React storefront for browsing traditional rice, millets, and oils, building a cart, and placing an order through WhatsApp. The main flow is shopper navigation and search → home or catalog discovery → product detail and variant selection → cart persistence and editing → WhatsApp checkout. A separate delivery page presents shipping guidance. The source index establishes several component relationships; the README is empty, and unsampled modules are represented only where their role is evident from the tree or documented imports.

Main entry points: [`src/App.tsx`](https://github.com/ragulchandru/organic-product/blob/main/src/App.tsx) (App router), [`src/pages/HomePage.tsx`](https://github.com/ragulchandru/organic-product/blob/main/src/pages/HomePage.tsx) (Home page), [`src/components/cart/OrderBagDrawer.tsx`](https://github.com/ragulchandru/organic-product/blob/main/src/components/cart/OrderBagDrawer.tsx) (Order bag drawer), [`src/pages/CatalogPage.tsx`](https://github.com/ragulchandru/organic-product/blob/main/src/pages/CatalogPage.tsx) (Catalog page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_header["Header<br/>[Header.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_deliverypage["Delivery page<br/>[DeliveryPage.tsx]"]
  node_deliverysection["Delivery guidance"]
end

subgraph group_discovery["Product discovery"]
  node_home["Home page<br/>[HomePage.tsx]"]
  node_catalog["Catalog page<br/>[CatalogPage.tsx]"]
  node_hero["Hero<br/>[Hero.tsx]"]
  node_trust["Trust bar<br/>[TrustBar.tsx]"]
  node_shopcategory["Shop categories<br/>[ShopByCategory.tsx]"]
  node_categoryfilter["Category filter<br/>[CategoryFilter.tsx]"]
  node_productgrid["Product grid<br/>[ProductGrid.tsx]"]
  node_productcard["Product card<br/>[ProductCard.tsx]"]
  node_productdetail["Product detail"]
end

subgraph group_ordering["Cart and ordering"]
  node_cartstate["Cart state<br/>[useCart.ts]"]
  node_cartdrawer["Order bag drawer<br/>[OrderBagDrawer.tsx]"]
  node_whatsapp["WhatsApp order link<br/>[whatsapp.ts]"]
  node_localstorage[("Browser local storage")]
end

subgraph group_shared["Shared product data"]
  node_products["Product catalog data<br/>[products.ts]"]
  node_categories["Category data<br/>[categories.ts]"]
  node_siteconfig["Site configuration<br/>[siteConfig.ts]"]
  node_button["Button<br/>[Button.tsx]"]
  node_badge["Badge<br/>[Badge.tsx]"]
  node_stepper["Quantity stepper"]
  node_utils["Search and formatting<br/>[utils.ts]"]
end

node_shopper(("Shopper"))
node_wa_service(("WhatsApp"))

node_shopper -.->|"uses storefront"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_footer
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_deliverypage
node_app -->|"renders"| node_productdetail
node_app -->|"renders"| node_cartdrawer
node_app -->|"uses cart state"| node_cartstate
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_trust
node_home -->|"renders"| node_shopcategory
node_home -->|"renders"| node_categoryfilter
node_home -->|"renders"| node_productgrid
node_home -->|"renders"| node_deliverysection
node_home -->|"reads products"| node_products
node_home -->|"filters products"| node_utils
node_catalog -->|"renders"| node_categoryfilter
node_catalog -->|"renders"| node_productgrid
node_catalog -->|"reads products"| node_products
node_catalog -->|"filters products"| node_utils
node_productgrid -->|"renders"| node_productcard
node_categoryfilter -->|"reads categories"| node_categories
node_productdetail -->|"uses"| node_button
node_productdetail -->|"uses"| node_badge
node_productdetail -->|"uses"| node_stepper
node_productdetail -->|"formats prices"| node_utils
node_deliverypage -->|"renders"| node_deliverysection
node_deliverysection -->|"reads shipping settings"| node_siteconfig
node_header -->|"reads site settings"| node_siteconfig
node_cartdrawer -->|"receives cart data"| node_cartstate
node_cartdrawer -->|"requests order link"| node_whatsapp
node_cartdrawer -->|"uses"| node_button
node_cartdrawer -->|"uses"| node_stepper
node_cartdrawer -->|"formats prices"| node_utils
node_cartstate -->|"persists cart"| node_localstorage
node_whatsapp -->|"reads contact settings"| node_siteconfig
node_cartdrawer -->|"opens order link"| node_wa_service

click node_app "https://github.com/ragulchandru/organic-product/blob/main/src/App.tsx"
click node_header "https://github.com/ragulchandru/organic-product/blob/main/src/components/layout/Header.tsx"
click node_footer "https://github.com/ragulchandru/organic-product/blob/main/src/components/layout/Footer.tsx"
click node_home "https://github.com/ragulchandru/organic-product/blob/main/src/pages/HomePage.tsx"
click node_catalog "https://github.com/ragulchandru/organic-product/blob/main/src/pages/CatalogPage.tsx"
click node_deliverypage "https://github.com/ragulchandru/organic-product/blob/main/src/pages/DeliveryPage.tsx"
click node_hero "https://github.com/ragulchandru/organic-product/blob/main/src/components/common/Hero.tsx"
click node_trust "https://github.com/ragulchandru/organic-product/blob/main/src/components/common/TrustBar.tsx"
click node_shopcategory "https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ShopByCategory.tsx"
click node_categoryfilter "https://github.com/ragulchandru/organic-product/blob/main/src/components/product/CategoryFilter.tsx"
click node_productgrid "https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductGrid.tsx"
click node_productcard "https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductCard.tsx"
click node_productdetail "https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductDetailModal.tsx"
click node_deliverysection "https://github.com/ragulchandru/organic-product/blob/main/src/components/common/DeliverySection.tsx"
click node_products "https://github.com/ragulchandru/organic-product/blob/main/src/data/products.ts"
click node_categories "https://github.com/ragulchandru/organic-product/blob/main/src/data/categories.ts"
click node_siteconfig "https://github.com/ragulchandru/organic-product/blob/main/src/config/siteConfig.ts"
click node_cartstate "https://github.com/ragulchandru/organic-product/blob/main/src/hooks/useCart.ts"
click node_cartdrawer "https://github.com/ragulchandru/organic-product/blob/main/src/components/cart/OrderBagDrawer.tsx"
click node_whatsapp "https://github.com/ragulchandru/organic-product/blob/main/src/lib/whatsapp.ts"
click node_button "https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/Button.tsx"
click node_badge "https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/Badge.tsx"
click node_stepper "https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/QuantityStepper.tsx"
click node_utils "https://github.com/ragulchandru/organic-product/blob/main/src/lib/utils.ts"

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_header,node_footer,node_deliverypage,node_deliverysection toneBlue
class node_home,node_catalog,node_hero,node_trust,node_shopcategory,node_categoryfilter,node_productgrid,node_productcard,node_productdetail toneAmber
class node_cartstate,node_cartdrawer,node_whatsapp,node_localstorage toneMint
class node_products,node_categories,node_siteconfig,node_button,node_badge,node_stepper,node_utils toneRose
class node_shopper,node_wa_service toneIndigo
```

## Components

### Storefront navigation

- [App router](https://github.com/ragulchandru/organic-product/blob/main/src/App.tsx): `src/App.tsx`
- [Header](https://github.com/ragulchandru/organic-product/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`
- [Footer](https://github.com/ragulchandru/organic-product/blob/main/src/components/layout/Footer.tsx): `src/components/layout/Footer.tsx`
- [Delivery page](https://github.com/ragulchandru/organic-product/blob/main/src/pages/DeliveryPage.tsx): `src/pages/DeliveryPage.tsx`
- [Delivery guidance](https://github.com/ragulchandru/organic-product/blob/main/src/components/common/DeliverySection.tsx): `src/components/common/DeliverySection.tsx`

### Product discovery

- [Home page](https://github.com/ragulchandru/organic-product/blob/main/src/pages/HomePage.tsx): `src/pages/HomePage.tsx`
- [Catalog page](https://github.com/ragulchandru/organic-product/blob/main/src/pages/CatalogPage.tsx): `src/pages/CatalogPage.tsx`
- [Hero](https://github.com/ragulchandru/organic-product/blob/main/src/components/common/Hero.tsx): `src/components/common/Hero.tsx`
- [Trust bar](https://github.com/ragulchandru/organic-product/blob/main/src/components/common/TrustBar.tsx): `src/components/common/TrustBar.tsx`
- [Shop categories](https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ShopByCategory.tsx): `src/components/product/ShopByCategory.tsx`
- [Category filter](https://github.com/ragulchandru/organic-product/blob/main/src/components/product/CategoryFilter.tsx): `src/components/product/CategoryFilter.tsx`
- [Product grid](https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductGrid.tsx): `src/components/product/ProductGrid.tsx`
- [Product card](https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductCard.tsx): `src/components/product/ProductCard.tsx`
- [Product detail](https://github.com/ragulchandru/organic-product/blob/main/src/components/product/ProductDetailModal.tsx): `src/components/product/ProductDetailModal.tsx`

### Cart and ordering

- [Cart state](https://github.com/ragulchandru/organic-product/blob/main/src/hooks/useCart.ts): `src/hooks/useCart.ts`
- [Order bag drawer](https://github.com/ragulchandru/organic-product/blob/main/src/components/cart/OrderBagDrawer.tsx): `src/components/cart/OrderBagDrawer.tsx`
- [WhatsApp order link](https://github.com/ragulchandru/organic-product/blob/main/src/lib/whatsapp.ts): `src/lib/whatsapp.ts`
- **Browser local storage**

### Shared product data

- [Product catalog data](https://github.com/ragulchandru/organic-product/blob/main/src/data/products.ts): `src/data/products.ts`
- [Category data](https://github.com/ragulchandru/organic-product/blob/main/src/data/categories.ts): `src/data/categories.ts`
- [Site configuration](https://github.com/ragulchandru/organic-product/blob/main/src/config/siteConfig.ts): `src/config/siteConfig.ts`
- [Button](https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/Button.tsx): `src/components/ui/Button.tsx`
- [Badge](https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/Badge.tsx): `src/components/ui/Badge.tsx`
- [Quantity stepper](https://github.com/ragulchandru/organic-product/blob/main/src/components/ui/QuantityStepper.tsx): `src/components/ui/QuantityStepper.tsx`
- [Search and formatting](https://github.com/ragulchandru/organic-product/blob/main/src/lib/utils.ts): `src/lib/utils.ts`

### Other components

- **Shopper**
- **WhatsApp**

## Connections

- Shopper → App router: uses storefront
- App router → Header: renders (evidence: `src/App.tsx`)
- App router → Footer: renders (evidence: `src/App.tsx`)
- App router → Home page: routes to (evidence: `src/App.tsx`)
- App router → Catalog page: routes to (evidence: `src/App.tsx`)
- App router → Delivery page: routes to (evidence: `src/App.tsx`)
- App router → Product detail: renders (evidence: `src/App.tsx`)
- App router → Order bag drawer: renders (evidence: `src/App.tsx`)
- App router → Cart state: uses cart state (evidence: `src/App.tsx`)
- Home page → Hero: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Trust bar: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Shop categories: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Category filter: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Product grid: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Delivery guidance: renders (evidence: `src/pages/HomePage.tsx`)
- Home page → Product catalog data: reads products (evidence: `src/pages/HomePage.tsx`)
- Home page → Search and formatting: filters products (evidence: `src/pages/HomePage.tsx`)
- Catalog page → Category filter: renders (evidence: `src/pages/CatalogPage.tsx`)
- Catalog page → Product grid: renders (evidence: `src/pages/CatalogPage.tsx`)
- Catalog page → Product catalog data: reads products (evidence: `src/pages/CatalogPage.tsx`)
- Catalog page → Search and formatting: filters products (evidence: `src/pages/CatalogPage.tsx`)
- Product grid → Product card: renders (evidence: `src/components/product/ProductGrid.tsx`)
- Category filter → Category data: reads categories (evidence: `src/components/product/CategoryFilter.tsx`)
- Product detail → Button: uses (evidence: `src/components/product/ProductDetailModal.tsx`)
- Product detail → Badge: uses (evidence: `src/components/product/ProductDetailModal.tsx`)
- Product detail → Quantity stepper: uses (evidence: `src/components/product/ProductDetailModal.tsx`)
- Product detail → Search and formatting: formats prices (evidence: `src/components/product/ProductDetailModal.tsx`)
- Delivery page → Delivery guidance: renders (evidence: `src/pages/DeliveryPage.tsx`)
- Delivery guidance → Site configuration: reads shipping settings (evidence: `src/components/common/DeliverySection.tsx`)
- Header → Site configuration: reads site settings (evidence: `src/components/layout/Header.tsx`)
- Order bag drawer → Cart state: receives cart data (evidence: `src/App.tsx`)
- Order bag drawer → WhatsApp order link: requests order link (evidence: `src/components/cart/OrderBagDrawer.tsx`)
- Order bag drawer → Button: uses (evidence: `src/components/cart/OrderBagDrawer.tsx`)
- Order bag drawer → Quantity stepper: uses (evidence: `src/components/cart/OrderBagDrawer.tsx`)
- Order bag drawer → Search and formatting: formats prices (evidence: `src/components/cart/OrderBagDrawer.tsx`)
- Cart state → Browser local storage: persists cart (evidence: `src/hooks/useCart.ts`)
- WhatsApp order link → Site configuration: reads contact settings (evidence: `src/lib/whatsapp.ts`)
- Order bag drawer → WhatsApp: opens order link (evidence: `src/components/cart/OrderBagDrawer.tsx`)
