# deepakpatil26/spiffy-farm-6274 architecture

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

- Interactive diagram: https://gitdiagram.com/deepakpatil26/spiffy-farm-6274
- Repository: https://github.com/deepakpatil26/spiffy-farm-6274

## Overview

This is a React fashion-commerce storefront with product discovery, account access, cart and wishlist, checkout/order history, and product/user administration. The user journey runs from browsing categories and product details through cart, payment, and order creation; Redux actions and Supabase-backed services provide the internal state and persistence layer. The graph preserves the documented capabilities, but edges are limited to relationships explicit in the README or sampled source/SOURCE INDEX; unsampled page internals are not assumed.

Main entry points: [`src/Components/MainRoutes.tsx`](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/MainRoutes.tsx) (Route Dispatch), [`src/lib/supabase.ts`](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/lib/supabase.ts) (Supabase Client), [`src/services/newProductService.ts`](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/newProductService.ts) (Product Services), [`src/services/productService.ts`](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/productService.ts) (Legacy Product Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_routes["Route Dispatch<br/>[MainRoutes.tsx]"]
  node_home["Home Discovery<br/>[NewHomePage.tsx]"]
  node_catalog["Category Browsing<br/>[CategoryPage.tsx]"]
  node_product["Product Details"]
  node_legacy["Men/Women Catalog<br/>[Men.tsx]"]
  node_legacy_detail["Legacy Product View<br/>[Singlecard.tsx]"]
  node_search["Product Search<br/>[SearchBar.tsx]"]
end

subgraph group_commerce["Shopping and Orders"]
  node_cart_page["Cart<br/>[Cart.tsx]"]
  node_wishlist["Wishlist<br/>[Wishlist.tsx]"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_payment["Payment and Order<br/>[Payment.tsx]"]
  node_order_history["Order History<br/>[OrderHistory.tsx]"]
end

subgraph group_identity["Accounts"]
  node_login["Login and Signup<br/>[Login.tsx]"]
  node_account["Account Profile<br/>[Account.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_products["Product Administration"]
  node_admin_edit["Product Editing<br/>[AdminEdit.tsx]"]
  node_admin_users["User Management<br/>[ManageUsers.tsx]"]
  node_admin_function["Admin Users Function<br/>[index.ts]"]
end

subgraph group_platform["State and Data"]
  node_product_service["Product Services"]
  node_legacy_product_service["Legacy Product Services<br/>[productService.ts]"]
  node_cart_actions["Cart State Actions<br/>[action.ts]"]
  node_cart_service["Cart Persistence<br/>[cartService.ts]"]
  node_wishlist_actions["Wishlist Actions<br/>[action.ts]"]
  node_wishlist_service["Wishlist Persistence<br/>[wishlistService.ts]"]
  node_order_service["Order Service<br/>[orderService.ts]"]
  node_auth_service["Authentication Service<br/>[authService.ts]"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
  node_products_store[("Products Data")]
  node_cart_store[("Cart Data")]
  node_wishlist_store[("Wishlist Data")]
  node_auth_store[("Auth Session")]
  node_redux_store["Redux Store<br/>[store.ts]"]
end

node_shopper(("Shopper"))

node_shopper -->|"navigates"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_product
node_routes -->|"routes to"| node_legacy
node_routes -->|"routes to"| node_legacy_detail
node_routes -->|"routes to"| node_cart_page
node_routes -->|"routes to"| node_wishlist
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_payment
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_account
node_routes -->|"routes to"| node_order_history
node_routes -->|"routes to"| node_admin_products
node_routes -->|"routes to"| node_admin_edit
node_routes -->|"routes to"| node_admin_users
node_home -->|"loads products"| node_legacy_product_service
node_product -->|"loads product"| node_product_service
node_search -->|"searches products"| node_product_service
node_legacy -.->|"uses state"| node_redux_store
node_legacy_detail -->|"loads product"| node_legacy_product_service
node_product_service -->|"queries"| node_supabase
node_legacy_product_service -->|"queries"| node_supabase
node_product_service -->|"reads/writes"| node_products_store
node_legacy_product_service -->|"reads/writes"| node_products_store
node_product -->|"dispatches cart"| node_cart_actions
node_product -->|"dispatches wishlist"| node_wishlist_actions
node_cart_page -.->|"uses actions"| node_cart_actions
node_cart_actions -->|"calls"| node_cart_service
node_cart_service -->|"queries"| node_supabase
node_cart_service -->|"loads product data"| node_legacy_product_service
node_cart_service -->|"reads/writes"| node_cart_store
node_cart_actions -.->|"dispatches updates"| node_redux_store
node_wishlist -.->|"uses actions"| node_wishlist_actions
node_wishlist_actions -->|"calls"| node_wishlist_service
node_wishlist_service -->|"queries"| node_supabase
node_wishlist_service -.->|"reads/writes"| node_wishlist_store
node_checkout -.->|"continues to"| node_payment
node_payment -->|"creates order"| node_order_service
node_payment -->|"clears cart"| node_cart_actions
node_order_service -->|"persists"| node_supabase
node_order_service -.->|"uses order data"| node_products_store
node_order_history -.->|"loads orders"| node_order_service
node_login -.->|"authenticates"| node_auth_service
node_auth_service -->|"auth calls"| node_supabase
node_account -->|"accesses profile"| node_supabase
node_supabase -->|"maintains session"| node_auth_store
node_admin_products -->|"manages products"| node_product_service

click node_routes "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/MainRoutes.tsx"
click node_home "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/NewHomePage.tsx"
click node_catalog "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/CategoryPage.tsx"
click node_product "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/ProductDetailPage.tsx"
click node_legacy "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Men.tsx"
click node_legacy_detail "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Singlecard.tsx"
click node_product_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/newProductService.ts"
click node_legacy_product_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/productService.ts"
click node_search "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Home/SearchBar.tsx"
click node_cart_page "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Cart.tsx"
click node_cart_actions "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/cartReducer/action.ts"
click node_cart_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/cartService.ts"
click node_wishlist "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Wishlist.tsx"
click node_wishlist_actions "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/wishlistReducer/action.ts"
click node_wishlist_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/wishlistService.ts"
click node_checkout "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Checkout.tsx"
click node_payment "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Payment.tsx"
click node_order_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/orderService.ts"
click node_order_history "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/OrderHistory.tsx"
click node_login "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Login.tsx"
click node_account "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Account.tsx"
click node_auth_service "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/authService.ts"
click node_admin_products "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/AdminManageProduct.tsx"
click node_admin_edit "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/AdminEdit.tsx"
click node_admin_users "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/ManageUsers.tsx"
click node_admin_function "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/supabase/functions/admin-users/index.ts"
click node_supabase "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/lib/supabase.ts"
click node_redux_store "https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/store.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_routes,node_home,node_catalog,node_product,node_legacy,node_legacy_detail,node_search toneBlue
class node_cart_page,node_wishlist,node_checkout,node_payment,node_order_history toneAmber
class node_login,node_account toneMint
class node_admin_products,node_admin_edit,node_admin_users,node_admin_function toneRose
class node_product_service,node_legacy_product_service,node_cart_actions,node_cart_service,node_wishlist_actions,node_wishlist_service,node_order_service,node_auth_service,node_supabase,node_products_store,node_cart_store,node_wishlist_store,node_auth_store,node_redux_store,node_shopper toneIndigo
```

## Components

### Storefront

- [Route Dispatch](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/MainRoutes.tsx): `src/Components/MainRoutes.tsx`
- [Home Discovery](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/NewHomePage.tsx): `src/pages/NewHomePage.tsx`
- [Category Browsing](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/CategoryPage.tsx): `src/pages/CategoryPage.tsx`
- [Product Details](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/ProductDetailPage.tsx): `src/pages/ProductDetailPage.tsx`
- [Men/Women Catalog](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Men.tsx): `src/pages/Men.tsx`
- [Legacy Product View](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Singlecard.tsx): `src/Components/Singlecard.tsx`
- [Product Search](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Home/SearchBar.tsx): `src/Components/Home/SearchBar.tsx`

### Shopping and Orders

- [Cart](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Cart.tsx): `src/pages/Cart.tsx`
- [Wishlist](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Wishlist.tsx): `src/pages/Wishlist.tsx`
- [Checkout](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Checkout.tsx): `src/pages/Checkout.tsx`
- [Payment and Order](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Payment.tsx): `src/pages/Payment.tsx`
- [Order History](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/OrderHistory.tsx): `src/pages/OrderHistory.tsx`

### Accounts

- [Login and Signup](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Account Profile](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/pages/Account.tsx): `src/pages/Account.tsx`

### Administration

- [Product Administration](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/AdminManageProduct.tsx): `src/Components/Admin/AdminManageProduct.tsx`
- [Product Editing](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/AdminEdit.tsx): `src/Components/Admin/AdminEdit.tsx`
- [User Management](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/Components/Admin/ManageUsers.tsx): `src/Components/Admin/ManageUsers.tsx`
- [Admin Users Function](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/supabase/functions/admin-users/index.ts): `supabase/functions/admin-users/index.ts`

### State and Data

- [Product Services](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/newProductService.ts): `src/services/newProductService.ts`
- [Legacy Product Services](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/productService.ts): `src/services/productService.ts`
- [Cart State Actions](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/cartReducer/action.ts): `src/redux/cartReducer/action.ts`
- [Cart Persistence](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/cartService.ts): `src/services/cartService.ts`
- [Wishlist Actions](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/wishlistReducer/action.ts): `src/redux/wishlistReducer/action.ts`
- [Wishlist Persistence](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/wishlistService.ts): `src/services/wishlistService.ts`
- [Order Service](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/orderService.ts): `src/services/orderService.ts`
- [Authentication Service](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/services/authService.ts): `src/services/authService.ts`
- [Supabase Client](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Products Data**
- **Cart Data**
- **Wishlist Data**
- **Auth Session**
- [Redux Store](https://github.com/deepakpatil26/spiffy-farm-6274/blob/main/src/redux/store.ts): `src/redux/store.ts`

### Other components

- **Shopper**

## Connections

- Shopper → Route Dispatch: navigates (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Home Discovery: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Category Browsing: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Product Details: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Men/Women Catalog: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Legacy Product View: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Cart: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Wishlist: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Checkout: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Payment and Order: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Login and Signup: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Account Profile: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Order History: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Product Administration: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → Product Editing: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Route Dispatch → User Management: routes to (evidence: `src/Components/MainRoutes.tsx`)
- Home Discovery → Legacy Product Services: loads products
- Product Details → Product Services: loads product (evidence: `src/pages/ProductDetailPage.tsx`)
- Product Search → Product Services: searches products (evidence: `src/Components/Home/SearchBar.tsx`)
- Men/Women Catalog → Redux Store: uses state
- Legacy Product View → Legacy Product Services: loads product (evidence: `src/Components/Singlecard.tsx`)
- Product Services → Supabase Client: queries (evidence: `src/services/newProductService.ts`)
- Legacy Product Services → Supabase Client: queries (evidence: `src/services/productService.ts`)
- Product Services → Products Data: reads/writes (evidence: `src/services/newProductService.ts`)
- Legacy Product Services → Products Data: reads/writes (evidence: `src/services/productService.ts`)
- Product Details → Cart State Actions: dispatches cart (evidence: `src/pages/ProductDetailPage.tsx`)
- Product Details → Wishlist Actions: dispatches wishlist (evidence: `src/pages/ProductDetailPage.tsx`)
- Cart → Cart State Actions: uses actions
- Cart State Actions → Cart Persistence: calls (evidence: `src/redux/cartReducer/action.ts`)
- Cart Persistence → Supabase Client: queries (evidence: `src/services/cartService.ts`)
- Cart Persistence → Legacy Product Services: loads product data (evidence: `src/services/cartService.ts`)
- Cart Persistence → Cart Data: reads/writes (evidence: `src/services/cartService.ts`)
- Cart State Actions → Redux Store: dispatches updates
- Wishlist → Wishlist Actions: uses actions
- Wishlist Actions → Wishlist Persistence: calls (evidence: `src/redux/wishlistReducer/action.ts`)
- Wishlist Persistence → Supabase Client: queries (evidence: `src/services/wishlistService.ts`)
- Wishlist Persistence → Wishlist Data: reads/writes
- Checkout → Payment and Order: continues to
- Payment and Order → Order Service: creates order (evidence: `src/pages/Payment.tsx`)
- Payment and Order → Cart State Actions: clears cart (evidence: `src/pages/Payment.tsx`)
- Order Service → Supabase Client: persists (evidence: `src/services/orderService.ts`)
- Order Service → Products Data: uses order data
- Order History → Order Service: loads orders
- Login and Signup → Authentication Service: authenticates
- Authentication Service → Supabase Client: auth calls (evidence: `src/services/authService.ts`)
- Account Profile → Supabase Client: accesses profile (evidence: `src/pages/Account.tsx`)
- Supabase Client → Auth Session: maintains session (evidence: `src/lib/supabase.ts`)
- Product Administration → Product Services: manages products (evidence: `src/Components/Admin/AdminManageProduct.tsx`)
