# tharun1305/fsd_project architecture

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

- Interactive diagram: https://gitdiagram.com/tharun1305/fsd_project
- Repository: https://github.com/tharun1305/fsd_project

## Overview

GV Clothing is implemented as a product-catalogue and B2B enquiry storefront with an admin management interface, backed by an Express API and local JSON storage with optional Firestore synchronization. The main customer journey is browsing the catalogue, viewing products, and submitting enquiries or sample requests; administrators review and update incoming requests. The README also advertises cart, checkout, and order workflows, but the supplied tree and excerpts do not establish corresponding implementation, so they are not mapped. Some page and API details are unsampled; only documented or excerpt-supported links are shown.

Main entry points: [`src/App.jsx`](https://github.com/tharun1305/fsd_project/blob/main/src/App.jsx) (App Router), [`src/context/DataContext.jsx`](https://github.com/tharun1305/fsd_project/blob/main/src/context/DataContext.jsx) (Shared Store Data), [`src/pages/ProductsPage.jsx`](https://github.com/tharun1305/fsd_project/blob/main/src/pages/ProductsPage.jsx) (Product Browsing), [`src/pages/HomePage.jsx`](https://github.com/tharun1305/fsd_project/blob/main/src/pages/HomePage.jsx) (Home and Collections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["App Router<br/>[App.jsx]"]
  node_header["Navigation and Search<br/>[Header.jsx]"]
  node_catalog["Product Browsing<br/>[ProductsPage.jsx]"]
  node_productcard["Product Card<br/>[ProductCard.jsx]"]
  node_productdetail["Product Details"]
  node_homepage["Home and Collections<br/>[HomePage.jsx]"]
  node_catalogue["Digital Catalogue"]
  node_pdf["Catalogue Export<br/>[pdfCatalog.js]"]
end

subgraph group_requests["Customer Requests"]
  node_enquiry["Bulk Enquiry"]
  node_samples["Sample Requests"]
  node_callback["Callback Requests"]
  node_whatsapp["WhatsApp Contact<br/>[whatsapp.js]"]
end

subgraph group_admin["Administration"]
  node_auth["Admin Authentication<br/>[AuthContext.jsx]"]
  node_adminlogin["Admin Login<br/>[AdminLoginPage.jsx]"]
  node_dashboard["Admin Dashboard"]
end

subgraph group_backend["Backend and Storage"]
  node_data["Shared Store Data<br/>[DataContext.jsx]"]
  node_fallback["Fallback Content<br/>[fallbackData.js]"]
  node_i18n["Translations<br/>[i18n.js]"]
  node_api["REST API<br/>[index.js]"]
  node_db["Data Access<br/>[db.js]"]
  node_jsondata[("Local JSON Records")]
  node_firestore[("Firestore Adapter<br/>[firestore.js]")]
end

node_customer(("Customer"))
node_whatsapp_service(("WhatsApp"))

node_customer -->|"opens"| node_app
node_app -->|"renders"| node_header
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_homepage
node_app -->|"routes to"| node_catalogue
node_catalog -->|"renders"| node_productcard
node_homepage -->|"renders"| node_productcard
node_catalogue -->|"uses"| node_pdf
node_catalog -->|"reads"| node_data
node_homepage -->|"reads"| node_data
node_productcard -->|"opens contact"| node_whatsapp
node_whatsapp -->|"opens link"| node_whatsapp_service
node_data -->|"loads fallback"| node_fallback
node_data -->|"uses translations"| node_i18n
node_app -->|"routes to"| node_enquiry
node_app -->|"routes to"| node_samples
node_app -->|"routes to"| node_callback
node_enquiry -->|"submits"| node_data
node_samples -->|"submits"| node_data
node_callback -->|"submits"| node_data
node_data -->|"requests data"| node_api
node_api -->|"calls"| node_db
node_db -->|"reads and writes"| node_jsondata
node_db -.->|"syncs optionally"| node_firestore
node_app -->|"provides session"| node_auth
node_adminlogin -->|"authenticates"| node_auth
node_auth -->|"posts login"| node_api
node_dashboard -->|"manages records"| node_data

click node_app "https://github.com/tharun1305/fsd_project/blob/main/src/App.jsx"
click node_header "https://github.com/tharun1305/fsd_project/blob/main/src/components/Header.jsx"
click node_catalog "https://github.com/tharun1305/fsd_project/blob/main/src/pages/ProductsPage.jsx"
click node_productcard "https://github.com/tharun1305/fsd_project/blob/main/src/components/ProductCard.jsx"
click node_productdetail "https://github.com/tharun1305/fsd_project/blob/main/src/pages/ProductDetailPage.jsx"
click node_homepage "https://github.com/tharun1305/fsd_project/blob/main/src/pages/HomePage.jsx"
click node_catalogue "https://github.com/tharun1305/fsd_project/blob/main/src/pages/DigitalCataloguePage.jsx"
click node_pdf "https://github.com/tharun1305/fsd_project/blob/main/src/utils/pdfCatalog.js"
click node_data "https://github.com/tharun1305/fsd_project/blob/main/src/context/DataContext.jsx"
click node_fallback "https://github.com/tharun1305/fsd_project/blob/main/src/data/fallbackData.js"
click node_i18n "https://github.com/tharun1305/fsd_project/blob/main/src/utils/i18n.js"
click node_enquiry "https://github.com/tharun1305/fsd_project/blob/main/src/pages/BulkEnquiryPage.jsx"
click node_samples "https://github.com/tharun1305/fsd_project/blob/main/src/pages/SampleRequestPage.jsx"
click node_callback "https://github.com/tharun1305/fsd_project/blob/main/src/pages/CallbackRequestPage.jsx"
click node_whatsapp "https://github.com/tharun1305/fsd_project/blob/main/src/utils/whatsapp.js"
click node_auth "https://github.com/tharun1305/fsd_project/blob/main/src/context/AuthContext.jsx"
click node_adminlogin "https://github.com/tharun1305/fsd_project/blob/main/src/pages/AdminLoginPage.jsx"
click node_dashboard "https://github.com/tharun1305/fsd_project/blob/main/src/pages/AdminDashboardPage.jsx"
click node_api "https://github.com/tharun1305/fsd_project/blob/main/server/index.js"
click node_db "https://github.com/tharun1305/fsd_project/blob/main/server/db.js"
click node_jsondata "https://github.com/tharun1305/fsd_project/tree/main/server/data"
click node_firestore "https://github.com/tharun1305/fsd_project/blob/main/server/firestore.js"

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_catalog,node_productcard,node_productdetail,node_homepage,node_catalogue,node_pdf toneBlue
class node_enquiry,node_samples,node_callback,node_whatsapp toneAmber
class node_auth,node_adminlogin,node_dashboard toneMint
class node_data,node_fallback,node_i18n,node_api,node_db,node_jsondata,node_firestore toneRose
class node_customer,node_whatsapp_service toneIndigo
```

## Components

### Storefront

- [App Router](https://github.com/tharun1305/fsd_project/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation and Search](https://github.com/tharun1305/fsd_project/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Product Browsing](https://github.com/tharun1305/fsd_project/blob/main/src/pages/ProductsPage.jsx): `src/pages/ProductsPage.jsx`
- [Product Card](https://github.com/tharun1305/fsd_project/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Product Details](https://github.com/tharun1305/fsd_project/blob/main/src/pages/ProductDetailPage.jsx): `src/pages/ProductDetailPage.jsx`
- [Home and Collections](https://github.com/tharun1305/fsd_project/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`
- [Digital Catalogue](https://github.com/tharun1305/fsd_project/blob/main/src/pages/DigitalCataloguePage.jsx): `src/pages/DigitalCataloguePage.jsx`
- [Catalogue Export](https://github.com/tharun1305/fsd_project/blob/main/src/utils/pdfCatalog.js): `src/utils/pdfCatalog.js`

### Customer Requests

- [Bulk Enquiry](https://github.com/tharun1305/fsd_project/blob/main/src/pages/BulkEnquiryPage.jsx): `src/pages/BulkEnquiryPage.jsx`
- [Sample Requests](https://github.com/tharun1305/fsd_project/blob/main/src/pages/SampleRequestPage.jsx): `src/pages/SampleRequestPage.jsx`
- [Callback Requests](https://github.com/tharun1305/fsd_project/blob/main/src/pages/CallbackRequestPage.jsx): `src/pages/CallbackRequestPage.jsx`
- [WhatsApp Contact](https://github.com/tharun1305/fsd_project/blob/main/src/utils/whatsapp.js): `src/utils/whatsapp.js`

### Administration

- [Admin Authentication](https://github.com/tharun1305/fsd_project/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Admin Login](https://github.com/tharun1305/fsd_project/blob/main/src/pages/AdminLoginPage.jsx): `src/pages/AdminLoginPage.jsx`
- [Admin Dashboard](https://github.com/tharun1305/fsd_project/blob/main/src/pages/AdminDashboardPage.jsx): `src/pages/AdminDashboardPage.jsx`

### Backend and Storage

- [Shared Store Data](https://github.com/tharun1305/fsd_project/blob/main/src/context/DataContext.jsx): `src/context/DataContext.jsx`
- [Fallback Content](https://github.com/tharun1305/fsd_project/blob/main/src/data/fallbackData.js): `src/data/fallbackData.js`
- [Translations](https://github.com/tharun1305/fsd_project/blob/main/src/utils/i18n.js): `src/utils/i18n.js`
- [REST API](https://github.com/tharun1305/fsd_project/blob/main/server/index.js): `server/index.js`
- [Data Access](https://github.com/tharun1305/fsd_project/blob/main/server/db.js): `server/db.js`
- [Local JSON Records](https://github.com/tharun1305/fsd_project/tree/main/server/data): `server/data`
- [Firestore Adapter](https://github.com/tharun1305/fsd_project/blob/main/server/firestore.js): `server/firestore.js`

### Other components

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

## Connections

- Customer → App Router: opens (evidence: `README.md`)
- App Router → Navigation and Search: renders (evidence: `src/App.jsx`)
- App Router → Product Browsing: routes to (evidence: `src/App.jsx`)
- App Router → Home and Collections: routes to (evidence: `src/App.jsx`)
- App Router → Digital Catalogue: routes to (evidence: `src/App.jsx`)
- Product Browsing → Product Card: renders (evidence: `src/pages/ProductsPage.jsx`)
- Home and Collections → Product Card: renders (evidence: `src/pages/HomePage.jsx`)
- Digital Catalogue → Catalogue Export: uses (evidence: `src/pages/DigitalCataloguePage.jsx`)
- Product Browsing → Shared Store Data: reads (evidence: `src/pages/ProductsPage.jsx`)
- Home and Collections → Shared Store Data: reads (evidence: `src/pages/HomePage.jsx`)
- Product Card → WhatsApp Contact: opens contact (evidence: `src/components/ProductCard.jsx`)
- WhatsApp Contact → WhatsApp: opens link (evidence: `src/utils/whatsapp.js`)
- Shared Store Data → Fallback Content: loads fallback (evidence: `src/context/DataContext.jsx`)
- Shared Store Data → Translations: uses translations (evidence: `src/context/DataContext.jsx`)
- App Router → Bulk Enquiry: routes to (evidence: `src/App.jsx`)
- App Router → Sample Requests: routes to (evidence: `src/App.jsx`)
- App Router → Callback Requests: routes to (evidence: `src/App.jsx`)
- Bulk Enquiry → Shared Store Data: submits (evidence: `src/pages/BulkEnquiryPage.jsx`)
- Sample Requests → Shared Store Data: submits (evidence: `src/pages/SampleRequestPage.jsx`)
- Callback Requests → Shared Store Data: submits (evidence: `src/pages/CallbackRequestPage.jsx`)
- Shared Store Data → REST API: requests data (evidence: `src/context/DataContext.jsx`)
- REST API → Data Access: calls (evidence: `server/index.js`)
- Data Access → Local JSON Records: reads and writes (evidence: `server/db.js`)
- Data Access → Firestore Adapter: syncs optionally (evidence: `server/db.js`)
- App Router → Admin Authentication: provides session (evidence: `src/App.jsx`)
- Admin Login → Admin Authentication: authenticates (evidence: `src/pages/AdminLoginPage.jsx`)
- Admin Authentication → REST API: posts login (evidence: `src/context/AuthContext.jsx`)
- Admin Dashboard → Shared Store Data: manages records (evidence: `src/pages/AdminDashboardPage.jsx`)
