# shuvetajovia/lns architecture

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

- Interactive diagram: https://gitdiagram.com/shuvetajovia/lns
- Repository: https://github.com/shuvetajovia/lns

## Overview

Mother Nature combines a customer storefront with an Electron admin portal. The customer journey is browse products, validate delivery availability, manage cart/account state, then submit an order and pay through Razorpay. The storefront uses shared shop state and CSV/API services; administrators manage products, orders, reviews, and delivery areas through a local CSV-backed service. The admin source is only partly excerpted, so its service relationship is shown only where indexed or documented.

Main entry points: [`src/App.jsx`](https://github.com/shuvetajovia/lns/blob/main/src/App.jsx) (Store app), [`src/context/ShopContext.jsx`](https://github.com/shuvetajovia/lns/blob/main/src/context/ShopContext.jsx) (Shop state), [`src/pages/CheckoutPage.jsx`](https://github.com/shuvetajovia/lns/blob/main/src/pages/CheckoutPage.jsx) (Checkout), [`src/components/ProductCard.jsx`](https://github.com/shuvetajovia/lns/blob/main/src/components/ProductCard.jsx) (Product card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_store_app["Store app<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_cart_drawer["Cart drawer<br/>[CartDrawer.jsx]"]
  node_pincode_modal["Delivery validation<br/>[PincodeModal.jsx]"]
  node_auth_modal["Account modal<br/>[AuthModal.jsx]"]
  node_reviews["Reviews and footer<br/>[Footer.jsx]"]
end

subgraph group_shopping["Browse and purchase"]
  node_home["Home and stories<br/>[HomePage.jsx]"]
  node_shop["Product catalog<br/>[ShopPage.jsx]"]
  node_product_detail["Product details"]
  node_product_card["Product card<br/>[ProductCard.jsx]"]
  node_checkout["Checkout<br/>[CheckoutPage.jsx]"]
end

subgraph group_state["Shared shop state"]
  node_shop_state["Shop state<br/>[ShopContext.jsx]"]
  node_catalog_data["Product catalog data<br/>[products.js]"]
  node_pincode_data[("Pincode database<br/>[pincodes.json]")]
end

subgraph group_admin["Administration"]
  node_admin_app["Admin portal<br/>[App.jsx]"]
  node_admin_service["Admin CSV service<br/>[CloudService.js]"]
end

subgraph group_persistence["Data and integrations"]
  node_store_service["Store CSV/API service<br/>[CloudService.js]"]
  node_csv_data[("Store CSV files")]
  node_order_api{{"Order API"}}
  node_razorpay{{"Razorpay"}}
  node_admin_csv[("Admin CSV data")]
end

node_customer(("Customer"))
node_admin_user(("Store administrator"))

node_customer -->|"uses storefront"| node_store_app
node_store_app -->|"routes to"| node_home
node_store_app -->|"routes to"| node_shop
node_store_app -->|"routes to"| node_product_detail
node_store_app -->|"routes to"| node_checkout
node_store_app -->|"provides state"| node_shop_state
node_store_app -->|"renders"| node_navbar
node_store_app -->|"renders"| node_cart_drawer
node_store_app -->|"renders"| node_pincode_modal
node_store_app -->|"renders"| node_auth_modal
node_store_app -->|"renders"| node_reviews
node_home -->|"renders"| node_product_card
node_shop -->|"renders"| node_product_card
node_product_detail -->|"renders"| node_product_card
node_home -->|"uses state"| node_shop_state
node_shop -->|"uses state"| node_shop_state
node_product_detail -->|"uses state"| node_shop_state
node_checkout -->|"uses state"| node_shop_state
node_product_card -->|"updates cart"| node_shop_state
node_shop_state -->|"loads products"| node_catalog_data
node_shop_state -->|"validates pincodes"| node_pincode_data
node_navbar -->|"uses state"| node_shop_state
node_cart_drawer -->|"uses state"| node_shop_state
node_pincode_modal -->|"uses state"| node_shop_state
node_auth_modal -->|"uses state"| node_shop_state
node_checkout -->|"submits orders"| node_store_service
node_store_service -->|"fetches CSV"| node_csv_data
node_store_service -->|"posts orders"| node_order_api
node_checkout -.->|"initiates payment"| node_razorpay
node_admin_user -->|"manages store"| node_admin_app
node_admin_app -->|"uses service"| node_admin_service
node_admin_service -->|"reads and writes"| node_admin_csv

click node_store_app "https://github.com/shuvetajovia/lns/blob/main/src/App.jsx"
click node_home "https://github.com/shuvetajovia/lns/blob/main/src/pages/HomePage.jsx"
click node_shop "https://github.com/shuvetajovia/lns/blob/main/src/pages/ShopPage.jsx"
click node_product_detail "https://github.com/shuvetajovia/lns/blob/main/src/pages/ProductDetailPage.jsx"
click node_product_card "https://github.com/shuvetajovia/lns/blob/main/src/components/ProductCard.jsx"
click node_checkout "https://github.com/shuvetajovia/lns/blob/main/src/pages/CheckoutPage.jsx"
click node_shop_state "https://github.com/shuvetajovia/lns/blob/main/src/context/ShopContext.jsx"
click node_catalog_data "https://github.com/shuvetajovia/lns/blob/main/src/data/products.js"
click node_pincode_data "https://github.com/shuvetajovia/lns/blob/main/src/pincodes.json"
click node_navbar "https://github.com/shuvetajovia/lns/blob/main/src/components/Navbar.jsx"
click node_cart_drawer "https://github.com/shuvetajovia/lns/blob/main/src/components/CartDrawer.jsx"
click node_pincode_modal "https://github.com/shuvetajovia/lns/blob/main/src/components/PincodeModal.jsx"
click node_auth_modal "https://github.com/shuvetajovia/lns/blob/main/src/components/AuthModal.jsx"
click node_reviews "https://github.com/shuvetajovia/lns/blob/main/src/components/Footer.jsx"
click node_store_service "https://github.com/shuvetajovia/lns/blob/main/src/CloudService.js"
click node_csv_data "https://github.com/shuvetajovia/lns/tree/main/data"
click node_admin_app "https://github.com/shuvetajovia/lns/blob/main/admin-portal/src/App.jsx"
click node_admin_service "https://github.com/shuvetajovia/lns/blob/main/admin-portal/src/CloudService.js"
click node_admin_csv "https://github.com/shuvetajovia/lns/tree/main/data"

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_store_app,node_navbar,node_cart_drawer,node_pincode_modal,node_auth_modal,node_reviews toneBlue
class node_home,node_shop,node_product_detail,node_product_card,node_checkout toneAmber
class node_shop_state,node_catalog_data,node_pincode_data toneMint
class node_admin_app,node_admin_service toneRose
class node_store_service,node_csv_data,node_order_api,node_razorpay,node_admin_csv,node_customer,node_admin_user toneIndigo
```

## Components

### Customer storefront

- [Store app](https://github.com/shuvetajovia/lns/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/shuvetajovia/lns/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Cart drawer](https://github.com/shuvetajovia/lns/blob/main/src/components/CartDrawer.jsx): `src/components/CartDrawer.jsx`
- [Delivery validation](https://github.com/shuvetajovia/lns/blob/main/src/components/PincodeModal.jsx): `src/components/PincodeModal.jsx`
- [Account modal](https://github.com/shuvetajovia/lns/blob/main/src/components/AuthModal.jsx): `src/components/AuthModal.jsx`
- [Reviews and footer](https://github.com/shuvetajovia/lns/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Browse and purchase

- [Home and stories](https://github.com/shuvetajovia/lns/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [Product catalog](https://github.com/shuvetajovia/lns/blob/main/src/pages/ShopPage.jsx): `src/pages/ShopPage.jsx`
- [Product details](https://github.com/shuvetajovia/lns/blob/main/src/pages/ProductDetailPage.jsx): `src/pages/ProductDetailPage.jsx`
- [Product card](https://github.com/shuvetajovia/lns/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Checkout](https://github.com/shuvetajovia/lns/blob/main/src/pages/CheckoutPage.jsx): `src/pages/CheckoutPage.jsx`

### Shared shop state

- [Shop state](https://github.com/shuvetajovia/lns/blob/main/src/context/ShopContext.jsx): `src/context/ShopContext.jsx`
- [Product catalog data](https://github.com/shuvetajovia/lns/blob/main/src/data/products.js): `src/data/products.js`
- [Pincode database](https://github.com/shuvetajovia/lns/blob/main/src/pincodes.json): `src/pincodes.json`

### Administration

- [Admin portal](https://github.com/shuvetajovia/lns/blob/main/admin-portal/src/App.jsx): `admin-portal/src/App.jsx`
- [Admin CSV service](https://github.com/shuvetajovia/lns/blob/main/admin-portal/src/CloudService.js): `admin-portal/src/CloudService.js`

### Data and integrations

- [Store CSV/API service](https://github.com/shuvetajovia/lns/blob/main/src/CloudService.js): `src/CloudService.js`
- [Store CSV files](https://github.com/shuvetajovia/lns/tree/main/data): `data`
- **Order API**
- **Razorpay**
- [Admin CSV data](https://github.com/shuvetajovia/lns/tree/main/data): `data`

### Other components

- **Customer**
- **Store administrator**

## Connections

- Customer → Store app: uses storefront (evidence: `README.md`)
- Store app → Home and stories: routes to (evidence: `src/App.jsx`)
- Store app → Product catalog: routes to (evidence: `src/App.jsx`)
- Store app → Product details: routes to (evidence: `src/App.jsx`)
- Store app → Checkout: routes to (evidence: `src/App.jsx`)
- Store app → Shop state: provides state (evidence: `src/App.jsx`)
- Store app → Navigation: renders (evidence: `src/App.jsx`)
- Store app → Cart drawer: renders (evidence: `src/App.jsx`)
- Store app → Delivery validation: renders (evidence: `src/App.jsx`)
- Store app → Account modal: renders (evidence: `src/App.jsx`)
- Store app → Reviews and footer: renders (evidence: `src/App.jsx`)
- Home and stories → Product card: renders (evidence: `src/pages/HomePage.jsx`)
- Product catalog → Product card: renders (evidence: `src/pages/ShopPage.jsx`)
- Product details → Product card: renders (evidence: `src/pages/ProductDetailPage.jsx`)
- Home and stories → Shop state: uses state (evidence: `src/pages/HomePage.jsx`)
- Product catalog → Shop state: uses state (evidence: `src/pages/ShopPage.jsx`)
- Product details → Shop state: uses state (evidence: `src/pages/ProductDetailPage.jsx`)
- Checkout → Shop state: uses state (evidence: `src/pages/CheckoutPage.jsx`)
- Product card → Shop state: updates cart (evidence: `src/components/ProductCard.jsx`)
- Shop state → Product catalog data: loads products (evidence: `src/context/ShopContext.jsx`)
- Shop state → Pincode database: validates pincodes (evidence: `src/context/ShopContext.jsx`)
- Navigation → Shop state: uses state (evidence: `src/components/Navbar.jsx`)
- Cart drawer → Shop state: uses state (evidence: `src/components/CartDrawer.jsx`)
- Delivery validation → Shop state: uses state (evidence: `src/components/PincodeModal.jsx`)
- Account modal → Shop state: uses state (evidence: `src/components/AuthModal.jsx`)
- Checkout → Store CSV/API service: submits orders (evidence: `src/pages/CheckoutPage.jsx`)
- Store CSV/API service → Store CSV files: fetches CSV (evidence: `src/CloudService.js`)
- Store CSV/API service → Order API: posts orders (evidence: `src/CloudService.js`)
- Checkout → Razorpay: initiates payment (evidence: `README.md`)
- Store administrator → Admin portal: manages store (evidence: `README.md`)
- Admin portal → Admin CSV service: uses service (evidence: `admin-portal/src/App.jsx`)
- Admin CSV service → Admin CSV data: reads and writes (evidence: `admin-portal/src/CloudService.js`)
