# adityaa61/trendy-threads---frontend- architecture

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

- Interactive diagram: https://gitdiagram.com/adityaa61/trendy-threads---frontend-
- Repository: https://github.com/adityaa61/trendy-threads---frontend-

## Overview

TrendyThreads is represented here by the React/TypeScript storefront and admin client; the listed tree contains no backend implementation. The main user journey is browsing products, managing a cart, and checking out, alongside authentication, profile/order history, and admin management. The graph separates UI routes, commerce, admin, and Redux state. API links are shown only where excerpts establish them; backend and Cloudinary internals are documented capabilities but are not present in this repository tree.

Main entry points: [`src/App.tsx`](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/App.tsx) (Router App), [`src/Redux/store.ts`](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/store.ts) (Redux Store), [`src/Redux/slices/cartSlice.ts`](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/cartSlice.ts) (Cart State), [`src/pages/Checkout.tsx`](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/Checkout.tsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_app["Router App<br/>[App.tsx]"]
  node_userlayout["Storefront Layout<br/>[UserLayout.tsx]"]
  node_authui["Login &amp; Register"]
  node_profile["Profile &amp; Orders<br/>[Profile.tsx]"]
end

subgraph group_commerce["Storefront Commerce"]
  node_catalog["Product Catalog"]
  node_productdetail["Product Details<br/>[ProductDetails.tsx]"]
  node_cartui["Cart UI<br/>[CartDrawer.tsx]"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_payment["Payment Button<br/>[PaypalButton.tsx]"]
end

subgraph group_admin["Admin Console"]
  node_adminlayout["Admin Layout<br/>[AdminLayout.tsx]"]
  node_dashboard["Admin Dashboard<br/>[AdminDashboard.tsx]"]
  node_productadmin["Product Management"]
  node_editproduct["Edit Product<br/>[EditProduct.tsx]"]
  node_orderadmin["Order Management"]
  node_useradmin["User Management<br/>[UserManagement.tsx]"]
end

subgraph group_state["Client State"]
  node_store["Redux Store<br/>[store.ts]"]
  node_authstate["Authentication State<br/>[authSlice.ts]"]
  node_cartstate["Cart State<br/>[cartSlice.ts]"]
  node_checkoutstate["Checkout State<br/>[checkoutSlice.ts]"]
  node_productstate["Product State<br/>[productSlice.ts]"]
  node_orderstate["Order State<br/>[orderSlice.ts]"]
  node_adminstate["Admin State<br/>[adminSlice.ts]"]
  node_adminproductstate["Admin Product State"]
  node_adminorderstate["Admin Order State<br/>[adminOrderSlice.ts]"]
end

node_shopper(("Shopper"))
node_backend{{"Backend API"}}
node_cloudinary{{"Cloudinary"}}

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_userlayout
node_app -->|"routes to"| node_adminlayout
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_productdetail
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_authui
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_productadmin
node_app -->|"routes to"| node_editproduct
node_app -->|"routes to"| node_orderadmin
node_app -->|"routes to"| node_useradmin
node_userlayout -->|"renders"| node_cartui
node_userlayout -->|"dispatches"| node_cartstate
node_productdetail -->|"dispatches"| node_cartstate
node_checkout -->|"dispatches"| node_checkoutstate
node_checkout -->|"dispatches"| node_cartstate
node_checkout -->|"renders"| node_payment
node_authui -->|"uses"| node_authstate
node_profile -->|"reads"| node_authstate
node_productadmin -->|"dispatches"| node_adminproductstate
node_editproduct -->|"dispatches"| node_adminproductstate
node_orderadmin -->|"dispatches"| node_adminorderstate
node_useradmin -->|"dispatches"| node_adminstate
node_store -->|"registers reducer"| node_authstate
node_store -->|"registers reducer"| node_productstate
node_store -->|"registers reducer"| node_cartstate
node_store -->|"registers reducer"| node_checkoutstate
node_store -->|"registers reducer"| node_orderstate
node_store -->|"registers reducer"| node_adminstate
node_store -->|"registers reducer"| node_adminproductstate
node_store -->|"registers reducer"| node_adminorderstate
node_authstate -->|"requests auth"| node_backend
node_cartstate -->|"requests cart"| node_backend
node_editproduct -->|"uploads image"| node_backend
node_backend -.->|"stores images"| node_cloudinary

click node_app "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/App.tsx"
click node_userlayout "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/layout/UserLayout.tsx"
click node_catalog "https://github.com/adityaa61/trendy-threads---frontend-/tree/main/src/pages"
click node_productdetail "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/ProductDetails.tsx"
click node_cartui "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/components/CartDrawer.tsx"
click node_checkout "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/Checkout.tsx"
click node_payment "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/components/PaypalButton.tsx"
click node_authui "https://github.com/adityaa61/trendy-threads---frontend-/tree/main/src/pages"
click node_profile "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/Profile.tsx"
click node_adminlayout "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/AdminLayout.tsx"
click node_dashboard "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/AdminDashboard.tsx"
click node_productadmin "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/ProductManagement.tsx"
click node_editproduct "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/EditProduct.tsx"
click node_orderadmin "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/OrderManagement.tsx"
click node_useradmin "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/UserManagement.tsx"
click node_store "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/store.ts"
click node_authstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/authSlice.ts"
click node_cartstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/cartSlice.ts"
click node_checkoutstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/checkoutSlice.ts"
click node_productstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/productSlice.ts"
click node_orderstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/orderSlice.ts"
click node_adminstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminSlice.ts"
click node_adminproductstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminProductSlice.ts"
click node_adminorderstate "https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminOrderSlice.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_userlayout,node_authui,node_profile toneBlue
class node_catalog,node_productdetail,node_cartui,node_checkout,node_payment toneAmber
class node_adminlayout,node_dashboard,node_productadmin,node_editproduct,node_orderadmin,node_useradmin,node_backend toneMint
class node_store,node_authstate,node_cartstate,node_checkoutstate,node_productstate,node_orderstate,node_adminstate,node_adminproductstate,node_adminorderstate toneRose
class node_shopper,node_cloudinary toneIndigo
```

## Components

### Application UI

- [Router App](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/App.tsx): `src/App.tsx`
- [Storefront Layout](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/layout/UserLayout.tsx): `src/layout/UserLayout.tsx`
- [Login & Register](https://github.com/adityaa61/trendy-threads---frontend-/tree/main/src/pages): `src/pages`
- [Profile & Orders](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/Profile.tsx): `src/pages/Profile.tsx`

### Storefront Commerce

- [Product Catalog](https://github.com/adityaa61/trendy-threads---frontend-/tree/main/src/pages): `src/pages`
- [Product Details](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/ProductDetails.tsx): `src/pages/ProductDetails.tsx`
- [Cart UI](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/components/CartDrawer.tsx): `src/components/CartDrawer.tsx`
- [Checkout](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/pages/Checkout.tsx): `src/pages/Checkout.tsx`
- [Payment Button](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/components/PaypalButton.tsx): `src/components/PaypalButton.tsx`

### Admin Console

- [Admin Layout](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/AdminLayout.tsx): `src/Admin/AdminLayout.tsx`
- [Admin Dashboard](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/AdminDashboard.tsx): `src/Admin/AdminDashboard.tsx`
- [Product Management](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/ProductManagement.tsx): `src/Admin/ProductManagement.tsx`
- [Edit Product](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/EditProduct.tsx): `src/Admin/EditProduct.tsx`
- [Order Management](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/OrderManagement.tsx): `src/Admin/OrderManagement.tsx`
- [User Management](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Admin/UserManagement.tsx): `src/Admin/UserManagement.tsx`

### Client State

- [Redux Store](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/store.ts): `src/Redux/store.ts`
- [Authentication State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/authSlice.ts): `src/Redux/slices/authSlice.ts`
- [Cart State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/cartSlice.ts): `src/Redux/slices/cartSlice.ts`
- [Checkout State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/checkoutSlice.ts): `src/Redux/slices/checkoutSlice.ts`
- [Product State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/productSlice.ts): `src/Redux/slices/productSlice.ts`
- [Order State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/orderSlice.ts): `src/Redux/slices/orderSlice.ts`
- [Admin State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminSlice.ts): `src/Redux/slices/adminSlice.ts`
- [Admin Product State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminProductSlice.ts): `src/Redux/slices/adminProductSlice.ts`
- [Admin Order State](https://github.com/adityaa61/trendy-threads---frontend-/blob/main/src/Redux/slices/adminOrderSlice.ts): `src/Redux/slices/adminOrderSlice.ts`

### Other components

- **Shopper**
- **Backend API**
- **Cloudinary**

## Connections

- Shopper → Router App: uses (evidence: `src/App.tsx`)
- Router App → Storefront Layout: routes to (evidence: `src/App.tsx`)
- Router App → Admin Layout: routes to (evidence: `src/App.tsx`)
- Router App → Product Catalog: routes to (evidence: `src/App.tsx`)
- Router App → Product Details: routes to (evidence: `src/App.tsx`)
- Router App → Checkout: routes to (evidence: `src/App.tsx`)
- Router App → Login & Register: routes to (evidence: `src/App.tsx`)
- Router App → Profile & Orders: routes to (evidence: `src/App.tsx`)
- Router App → Admin Dashboard: routes to (evidence: `src/App.tsx`)
- Router App → Product Management: routes to (evidence: `src/App.tsx`)
- Router App → Edit Product: routes to (evidence: `src/App.tsx`)
- Router App → Order Management: routes to (evidence: `src/App.tsx`)
- Router App → User Management: routes to (evidence: `src/App.tsx`)
- Storefront Layout → Cart UI: renders (evidence: `src/layout/UserLayout.tsx`)
- Storefront Layout → Cart State: dispatches (evidence: `src/layout/UserLayout.tsx`)
- Product Details → Cart State: dispatches (evidence: `src/pages/ProductDetails.tsx`)
- Checkout → Checkout State: dispatches (evidence: `src/pages/Checkout.tsx`)
- Checkout → Cart State: dispatches (evidence: `src/pages/Checkout.tsx`)
- Checkout → Payment Button: renders (evidence: `src/pages/Checkout.tsx`)
- Login & Register → Authentication State: uses (evidence: `src/pages/Register.tsx`)
- Profile & Orders → Authentication State: reads (evidence: `src/pages/Profile.tsx`)
- Product Management → Admin Product State: dispatches (evidence: `src/Admin/ProductManagement.tsx`)
- Edit Product → Admin Product State: dispatches (evidence: `src/Admin/EditProduct.tsx`)
- Order Management → Admin Order State: dispatches (evidence: `src/Admin/OrderManagement.tsx`)
- User Management → Admin State: dispatches (evidence: `src/Admin/UserManagement.tsx`)
- Redux Store → Authentication State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Product State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Cart State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Checkout State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Order State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Admin State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Admin Product State: registers reducer (evidence: `src/Redux/store.ts`)
- Redux Store → Admin Order State: registers reducer (evidence: `src/Redux/store.ts`)
- Authentication State → Backend API: requests auth (evidence: `src/Redux/slices/authSlice.ts`)
- Cart State → Backend API: requests cart (evidence: `src/Redux/slices/cartSlice.ts`)
- Edit Product → Backend API: uploads image (evidence: `src/Admin/EditProduct.tsx`)
- Backend API → Cloudinary: stores images (evidence: `README.md`)
