# krupashetty004/shiva_fashion architecture

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

- Interactive diagram: https://gitdiagram.com/krupashetty004/shiva_fashion
- Repository: https://github.com/krupashetty004/shiva_fashion

## Overview

Shiva Fashion is a React storefront with customer browsing, product-detail and cart journeys, contact/order enquiries, and an admin area for managing store data and messages. App routes requests to the corresponding pages and syncs cloud data at startup. Pages use a shared storage service backed by browser local storage, with optional Firebase synchronization. The excerpts do not establish every page’s storage calls or the full admin-login flow, so those links are omitted; WhatsApp links are shown as unverified where their implementation is not excerpted.

Main entry points: [`src/App.tsx`](https://github.com/krupashetty004/shiva_fashion/blob/main/src/App.tsx) (Application router), [`src/services/storage.ts`](https://github.com/krupashetty004/shiva_fashion/blob/main/src/services/storage.ts) (Store data service), [`src/pages/ProductDetails.tsx`](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/ProductDetails.tsx) (Product details), [`src/pages/Home.tsx`](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Home.tsx) (Home and promotions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Application router<br/>[App.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_home["Home and promotions<br/>[Home.tsx]"]
  node_contact["Contact enquiries<br/>[Contact.tsx]"]
end

subgraph group_shopping["Shopping"]
  node_shop["Shop and filters<br/>[Shop.tsx]"]
  node_details["Product details<br/>[ProductDetails.tsx]"]
  node_cart["Cart and ordering<br/>[Cart.tsx]"]
  node_productcard["Product card<br/>[ProductCard.tsx]"]
end

subgraph group_admin["Administration"]
  node_adminlogin["Admin login<br/>[AdminLogin.tsx]"]
  node_dashboard["Admin dashboard<br/>[AdminDashboard.tsx]"]
end

subgraph group_data["Data and integrations"]
  node_storage["Store data service<br/>[storage.ts]"]
  node_browserdata[("Browser storage")]
  node_firebase[("Firebase")]
end

node_customer(("Customer"))
node_whatsapp["WhatsApp"]

node_customer -.->|"opens storefront"| node_app
node_app -->|"routes"| node_home
node_app -->|"routes"| node_shop
node_app -->|"routes"| node_details
node_app -->|"routes"| node_cart
node_app -->|"routes"| node_contact
node_app -->|"routes"| node_adminlogin
node_app -->|"routes"| node_dashboard
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_app -->|"syncs at startup"| node_storage
node_navbar -->|"reads cart"| node_storage
node_home -->|"reads storefront data"| node_storage
node_shop -->|"reads products"| node_storage
node_details -->|"saves enquiry"| node_storage
node_cart -->|"reads and updates cart"| node_storage
node_contact -.->|"uses data service"| node_storage
node_dashboard -->|"manages store data"| node_storage
node_home -->|"renders products"| node_productcard
node_shop -->|"renders products"| node_productcard
node_details -->|"renders related products"| node_productcard
node_storage -->|"reads and writes"| node_browserdata
node_storage -->|"syncs data"| node_firebase
node_cart -.->|"opens order"| node_whatsapp
node_details -.->|"offers ordering"| node_whatsapp

click node_app "https://github.com/krupashetty004/shiva_fashion/blob/main/src/App.tsx"
click node_navbar "https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/Navbar.tsx"
click node_footer "https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/Footer.tsx"
click node_home "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Home.tsx"
click node_shop "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Shop.tsx"
click node_details "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/ProductDetails.tsx"
click node_cart "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Cart.tsx"
click node_productcard "https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/ProductCard.tsx"
click node_contact "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Contact.tsx"
click node_adminlogin "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/AdminLogin.tsx"
click node_dashboard "https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/AdminDashboard.tsx"
click node_storage "https://github.com/krupashetty004/shiva_fashion/blob/main/src/services/storage.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_navbar,node_footer,node_home,node_contact toneBlue
class node_shop,node_details,node_cart,node_productcard toneAmber
class node_adminlogin,node_dashboard toneMint
class node_storage,node_browserdata,node_firebase toneRose
class node_customer,node_whatsapp toneIndigo
```

## Components

### Storefront

- [Application router](https://github.com/krupashetty004/shiva_fashion/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Footer](https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`
- [Home and promotions](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Contact enquiries](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Contact.tsx): `src/pages/Contact.tsx`

### Shopping

- [Shop and filters](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Shop.tsx): `src/pages/Shop.tsx`
- [Product details](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/ProductDetails.tsx): `src/pages/ProductDetails.tsx`
- [Cart and ordering](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/Cart.tsx): `src/pages/Cart.tsx`
- [Product card](https://github.com/krupashetty004/shiva_fashion/blob/main/src/components/ProductCard.tsx): `src/components/ProductCard.tsx`

### Administration

- [Admin login](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/AdminLogin.tsx): `src/pages/AdminLogin.tsx`
- [Admin dashboard](https://github.com/krupashetty004/shiva_fashion/blob/main/src/pages/AdminDashboard.tsx): `src/pages/AdminDashboard.tsx`

### Data and integrations

- [Store data service](https://github.com/krupashetty004/shiva_fashion/blob/main/src/services/storage.ts): `src/services/storage.ts`
- **Browser storage**
- **Firebase**

### Other components

- **Customer**
- **WhatsApp**

## Connections

- Customer → Application router: opens storefront
- Application router → Home and promotions: routes (evidence: `src/App.tsx`)
- Application router → Shop and filters: routes (evidence: `src/App.tsx`)
- Application router → Product details: routes (evidence: `src/App.tsx`)
- Application router → Cart and ordering: routes (evidence: `src/App.tsx`)
- Application router → Contact enquiries: routes (evidence: `src/App.tsx`)
- Application router → Admin login: routes (evidence: `src/App.tsx`)
- Application router → Admin dashboard: routes (evidence: `src/App.tsx`)
- Application router → Navigation: renders (evidence: `src/App.tsx`)
- Application router → Footer: renders (evidence: `src/App.tsx`)
- Application router → Store data service: syncs at startup (evidence: `src/App.tsx`)
- Navigation → Store data service: reads cart (evidence: `src/components/Navbar.tsx`)
- Home and promotions → Store data service: reads storefront data (evidence: `src/pages/Home.tsx`)
- Shop and filters → Store data service: reads products (evidence: `src/pages/Shop.tsx`)
- Product details → Store data service: saves enquiry (evidence: `src/pages/ProductDetails.tsx`)
- Cart and ordering → Store data service: reads and updates cart (evidence: `src/pages/Cart.tsx`)
- Contact enquiries → Store data service: uses data service (evidence: `src/pages/Contact.tsx`)
- Admin dashboard → Store data service: manages store data (evidence: `src/pages/AdminDashboard.tsx`)
- Home and promotions → Product card: renders products (evidence: `src/pages/Home.tsx`)
- Shop and filters → Product card: renders products (evidence: `src/pages/Shop.tsx`)
- Product details → Product card: renders related products (evidence: `src/pages/ProductDetails.tsx`)
- Store data service → Browser storage: reads and writes (evidence: `src/services/storage.ts`)
- Store data service → Firebase: syncs data (evidence: `src/services/storage.ts`)
- Cart and ordering → WhatsApp: opens order (evidence: `src/pages/Cart.tsx`)
- Product details → WhatsApp: offers ordering
