# saddala-harish/varamclothing architecture

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

- Interactive diagram: https://gitdiagram.com/saddala-harish/varamclothing
- Repository: https://github.com/saddala-harish/varamclothing

## Overview

Varamclothing is a clothing storefront with product discovery, product details, a persistent cart, checkout, order lookup, and administration. Shoppers browse collections, select product options, add items to the cart, and place orders; administrators manage products, orders, and settings. Supabase provides the backend, while WhatsApp is an additional contact/order channel. Edges reflect only the supplied excerpts, SOURCE INDEX references, or README; unsampled routes and admin behavior are represented without speculative call chains.

Main entry points: [`src/integrations/supabase/client.ts`](https://github.com/saddala-harish/varamclothing/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/routes/product.$slug.tsx`](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/product.%24slug.tsx) (Product details), [`src/routes/index.tsx`](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/index.tsx) (Home discovery), [`src/routes/checkout.tsx`](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/checkout.tsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home discovery<br/>[index.tsx]"]
  node_catalog["Shop catalog<br/>[shop.tsx]"]
  node_product["Product details<br/>[product.$slug.tsx]"]
  node_productcard["Product card<br/>[ProductCard.tsx]"]
  node_info["Brand and contact<br/>[about.tsx]"]
  node_contact["Contact page<br/>[contact.tsx]"]
end

subgraph group_purchase["Purchase flow"]
  node_cart[("Cart state<br/>[cart.tsx]")]
  node_cartpage["Cart page<br/>[cart.tsx]"]
  node_checkout["Checkout<br/>[checkout.tsx]"]
  node_order["Order lookup<br/>[order.$id.tsx]"]
end

subgraph group_admin["Administration"]
  node_adminroute["Admin entry<br/>[admin.tsx]"]
  node_productsadmin["Product management<br/>[ProductsAdmin.tsx]"]
  node_ordersadmin["Order management<br/>[OrdersAdmin.tsx]"]
  node_settingsadmin["Store settings<br/>[SettingsAdmin.tsx]"]
end

subgraph group_platform["Backend and platform"]
  node_storedata["Product and settings queries<br/>[store.ts]"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_authstorage["Preview auth storage"]
  node_format["Store formatting<br/>[format.ts]"]
  node_router["Router setup<br/>[router.tsx]"]
  node_routetree["Route registry<br/>[routeTree.gen.ts]"]
end

node_shopper(("Shopper"))
node_supabaseservice[("Supabase backend")]
node_whatsapp["WhatsApp"]

node_shopper -->|"browses"| node_home
node_shopper -->|"browses"| node_catalog
node_shopper -->|"views"| node_product
node_shopper -->|"reviews cart"| node_cartpage
node_shopper -->|"checks out"| node_checkout
node_shopper -->|"tracks order"| node_order
node_home -->|"queries products"| node_storedata
node_home -->|"renders cards"| node_productcard
node_home -->|"formats display"| node_format
node_home -->|"creates contact link"| node_whatsapp
node_catalog -.->|"renders listings"| node_productcard
node_product -->|"queries products"| node_storedata
node_product -->|"updates cart"| node_cart
node_product -->|"formats display"| node_format
node_product -->|"renders recommendations"| node_productcard
node_product -->|"creates contact link"| node_whatsapp
node_cartpage -.->|"reads and updates"| node_cart
node_checkout -->|"reads cart"| node_cart
node_checkout -->|"queries settings"| node_storedata
node_checkout -->|"calculates delivery"| node_format
node_checkout -->|"places order"| node_supabase
node_order -.->|"loads order"| node_supabase
node_adminroute -.->|"hosts management"| node_productsadmin
node_adminroute -.->|"hosts management"| node_ordersadmin
node_adminroute -.->|"hosts management"| node_settingsadmin
node_productsadmin -->|"manages products"| node_supabase
node_productsadmin -->|"formats fields"| node_format
node_productsadmin -->|"uses product types"| node_storedata
node_ordersadmin -.->|"manages orders"| node_supabase
node_settingsadmin -.->|"manages settings"| node_supabase
node_supabase -->|"configures auth storage"| node_authstorage
node_supabase -->|"sends backend requests"| node_supabaseservice
node_storedata -.->|"accesses backend"| node_supabase
node_info -.->|"informs"| node_shopper
node_contact -.->|"offers contact"| node_whatsapp
node_router -->|"registers routes"| node_routetree

click node_home "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/index.tsx"
click node_catalog "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/shop.tsx"
click node_product "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/product.%24slug.tsx"
click node_productcard "https://github.com/saddala-harish/varamclothing/blob/main/src/components/site/ProductCard.tsx"
click node_info "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/about.tsx"
click node_contact "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/contact.tsx"
click node_cart "https://github.com/saddala-harish/varamclothing/blob/main/src/lib/cart.tsx"
click node_cartpage "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/cart.tsx"
click node_checkout "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/checkout.tsx"
click node_order "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/order.%24id.tsx"
click node_adminroute "https://github.com/saddala-harish/varamclothing/blob/main/src/routes/admin.tsx"
click node_productsadmin "https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/ProductsAdmin.tsx"
click node_ordersadmin "https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/OrdersAdmin.tsx"
click node_settingsadmin "https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/SettingsAdmin.tsx"
click node_storedata "https://github.com/saddala-harish/varamclothing/blob/main/src/lib/store.ts"
click node_supabase "https://github.com/saddala-harish/varamclothing/blob/main/src/integrations/supabase/client.ts"
click node_authstorage "https://github.com/saddala-harish/varamclothing/blob/main/src/integrations/supabase/previewAuthStorage.ts"
click node_format "https://github.com/saddala-harish/varamclothing/blob/main/src/lib/format.ts"
click node_router "https://github.com/saddala-harish/varamclothing/blob/main/src/router.tsx"
click node_routetree "https://github.com/saddala-harish/varamclothing/blob/main/src/routeTree.gen.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_home,node_catalog,node_product,node_productcard,node_info,node_contact toneBlue
class node_cart,node_cartpage,node_checkout,node_order,node_supabaseservice toneAmber
class node_adminroute,node_productsadmin,node_ordersadmin,node_settingsadmin toneMint
class node_storedata,node_supabase,node_authstorage,node_format,node_router,node_routetree toneRose
class node_shopper,node_whatsapp toneIndigo
```

## Components

### Storefront

- [Home discovery](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Shop catalog](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/shop.tsx): `src/routes/shop.tsx`
- [Product details](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/product.%24slug.tsx): `src/routes/product.$slug.tsx`
- [Product card](https://github.com/saddala-harish/varamclothing/blob/main/src/components/site/ProductCard.tsx): `src/components/site/ProductCard.tsx`
- [Brand and contact](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/about.tsx): `src/routes/about.tsx`
- [Contact page](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/contact.tsx): `src/routes/contact.tsx`

### Purchase flow

- [Cart state](https://github.com/saddala-harish/varamclothing/blob/main/src/lib/cart.tsx): `src/lib/cart.tsx`
- [Cart page](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/cart.tsx): `src/routes/cart.tsx`
- [Checkout](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/checkout.tsx): `src/routes/checkout.tsx`
- [Order lookup](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/order.%24id.tsx): `src/routes/order.$id.tsx`

### Administration

- [Admin entry](https://github.com/saddala-harish/varamclothing/blob/main/src/routes/admin.tsx): `src/routes/admin.tsx`
- [Product management](https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/ProductsAdmin.tsx): `src/components/admin/ProductsAdmin.tsx`
- [Order management](https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/OrdersAdmin.tsx): `src/components/admin/OrdersAdmin.tsx`
- [Store settings](https://github.com/saddala-harish/varamclothing/blob/main/src/components/admin/SettingsAdmin.tsx): `src/components/admin/SettingsAdmin.tsx`

### Backend and platform

- [Product and settings queries](https://github.com/saddala-harish/varamclothing/blob/main/src/lib/store.ts): `src/lib/store.ts`
- [Supabase client](https://github.com/saddala-harish/varamclothing/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Preview auth storage](https://github.com/saddala-harish/varamclothing/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`
- [Store formatting](https://github.com/saddala-harish/varamclothing/blob/main/src/lib/format.ts): `src/lib/format.ts`
- [Router setup](https://github.com/saddala-harish/varamclothing/blob/main/src/router.tsx): `src/router.tsx`
- [Route registry](https://github.com/saddala-harish/varamclothing/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`

### Other components

- **Shopper**
- **Supabase backend**
- **WhatsApp**

## Connections

- Shopper → Home discovery: browses
- Shopper → Shop catalog: browses
- Shopper → Product details: views
- Shopper → Cart page: reviews cart
- Shopper → Checkout: checks out (evidence: `src/routes/checkout.tsx`)
- Shopper → Order lookup: tracks order
- Home discovery → Product and settings queries: queries products (evidence: `src/routes/index.tsx`)
- Home discovery → Product card: renders cards (evidence: `src/routes/index.tsx`)
- Home discovery → Store formatting: formats display (evidence: `src/routes/index.tsx`)
- Home discovery → WhatsApp: creates contact link (evidence: `src/routes/index.tsx`)
- Shop catalog → Product card: renders listings
- Product details → Product and settings queries: queries products (evidence: `src/routes/product.$slug.tsx`)
- Product details → Cart state: updates cart (evidence: `src/routes/product.$slug.tsx`)
- Product details → Store formatting: formats display (evidence: `src/routes/product.$slug.tsx`)
- Product details → Product card: renders recommendations (evidence: `src/routes/product.$slug.tsx`)
- Product details → WhatsApp: creates contact link (evidence: `src/routes/product.$slug.tsx`)
- Cart page → Cart state: reads and updates
- Checkout → Cart state: reads cart (evidence: `src/routes/checkout.tsx`)
- Checkout → Product and settings queries: queries settings (evidence: `src/routes/checkout.tsx`)
- Checkout → Store formatting: calculates delivery (evidence: `src/routes/checkout.tsx`)
- Checkout → Supabase client: places order (evidence: `src/routes/checkout.tsx`)
- Order lookup → Supabase client: loads order
- Admin entry → Product management: hosts management
- Admin entry → Order management: hosts management
- Admin entry → Store settings: hosts management
- Product management → Supabase client: manages products (evidence: `src/components/admin/ProductsAdmin.tsx`)
- Product management → Store formatting: formats fields (evidence: `src/components/admin/ProductsAdmin.tsx`)
- Product management → Product and settings queries: uses product types (evidence: `src/components/admin/ProductsAdmin.tsx`)
- Order management → Supabase client: manages orders
- Store settings → Supabase client: manages settings
- Supabase client → Preview auth storage: configures auth storage (evidence: `src/integrations/supabase/client.ts`)
- Supabase client → Supabase backend: sends backend requests (evidence: `src/integrations/supabase/client.ts`)
- Product and settings queries → Supabase client: accesses backend
- Brand and contact → Shopper: informs
- Contact page → WhatsApp: offers contact
- Router setup → Route registry: registers routes (evidence: `src/router.tsx`)
