# jaiganesh2108/shoply-ai architecture

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

- Interactive diagram: https://gitdiagram.com/jaiganesh2108/shoply-ai
- Repository: https://github.com/jaiganesh2108/shoply-ai

## Overview

Shoply is an AI-assisted commerce application: shoppers browse products or describe a need to the assistant, then use account, cart, order, and payment screens. The shown frontend routes these experiences through App; the assistant sends chat messages through its API helper. Django backend apps cover products, users, carts, orders, payments, and AI. Most page-to-API and backend route wiring was not sampled, so those connections are omitted or marked unverified rather than asserted as observed.

Main entry points: [`frontend/src/App.jsx`](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/App.jsx) (Route app), [`frontend/src/pages/Home.jsx`](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Home.jsx) (Home and catalog), [`backend/cart/views.py`](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/views.py) (Cart endpoints), [`backend/products/views.py`](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/products/views.py) (Product endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Route app<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_home["Home and catalog<br/>[Home.jsx]"]
  node_products["Product browsing<br/>[Products.jsx]"]
  node_productdetail["Product detail<br/>[ProductDetail.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_signup["Signup<br/>[Signup.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_cartpage["Cart screen<br/>[Cart.jsx]"]
  node_orderspage["Orders screen<br/>[Orders.jsx]"]
  node_paymentpage["Payment screen<br/>[Payment.jsx]"]
  node_authutils["Token handling<br/>[authUtils.js]"]
  node_crowd["Crowd canvas<br/>[crowd-canvas.jsx]"]
end

subgraph group_assist["Shopping assistant"]
  node_assistant["Chat interface<br/>[AssistantChat.jsx]"]
  node_aiapi["Assistant API<br/>[ai.js]"]
  node_aiviews["AI endpoints<br/>[views.py]"]
end

subgraph group_commerce["Commerce backend"]
  node_productservice["Product endpoints<br/>[views.py]"]
  node_productdata[("Product model<br/>[models.py]")]
  node_cartservice["Cart endpoints<br/>[views.py]"]
  node_cartdata[("Cart model<br/>[models.py]")]
  node_cartserializer["Cart serializer<br/>[serializers.py]"]
  node_orders["Order domain<br/>[views.py]"]
  node_payments["Payment domain<br/>[views.py]"]
end

subgraph group_identity["Identity backend"]
  node_users["User domain<br/>[views.py]"]
end

node_shopper(("Shopper"))

node_shopper -.->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes"| node_home
node_app -->|"routes"| node_products
node_app -->|"routes"| node_productdetail
node_app -->|"routes"| node_login
node_app -->|"routes"| node_signup
node_app -->|"routes"| node_profile
node_app -->|"routes"| node_cartpage
node_app -->|"routes"| node_orderspage
node_app -->|"routes"| node_paymentpage
node_app -->|"checks expiry"| node_authutils
node_home -->|"renders"| node_assistant
node_home -->|"renders"| node_crowd
node_assistant -->|"sends messages"| node_aiapi
node_aiapi -.->|"requests"| node_aiviews
node_products -.->|"requests"| node_productservice
node_productdetail -.->|"requests"| node_productservice
node_cartpage -.->|"requests"| node_cartservice
node_orderspage -.->|"requests"| node_orders
node_paymentpage -.->|"requests"| node_payments
node_login -.->|"requests"| node_users
node_signup -.->|"requests"| node_users
node_profile -.->|"requests"| node_users
node_productservice -->|"queries"| node_productdata
node_cartservice -->|"queries"| node_cartdata
node_cartservice -->|"serializes"| node_cartserializer

click node_app "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/Navbar/Navbar.jsx"
click node_home "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Home.jsx"
click node_products "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Products.jsx"
click node_productdetail "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/ProductDetail.jsx"
click node_login "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Login.jsx"
click node_signup "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Signup.jsx"
click node_profile "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Profile.jsx"
click node_cartpage "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Cart.jsx"
click node_orderspage "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Orders.jsx"
click node_paymentpage "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Payment.jsx"
click node_authutils "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/api/authUtils.js"
click node_assistant "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/AssistantChat/AssistantChat.jsx"
click node_aiapi "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/api/ai.js"
click node_crowd "https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/ui/crowd-canvas.jsx"
click node_productservice "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/products/views.py"
click node_productdata "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/products/models.py"
click node_cartservice "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/views.py"
click node_cartdata "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/models.py"
click node_cartserializer "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/serializers.py"
click node_orders "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/orders/views.py"
click node_payments "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/payments/views.py"
click node_users "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/users/views.py"
click node_aiviews "https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/ai/views.py"

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_home,node_products,node_productdetail,node_login,node_signup,node_profile,node_cartpage,node_orderspage,node_paymentpage,node_authutils,node_crowd toneBlue
class node_assistant,node_aiapi,node_aiviews toneAmber
class node_productservice,node_productdata,node_cartservice,node_cartdata,node_cartserializer,node_orders,node_payments toneMint
class node_users toneRose
class node_shopper toneIndigo
```

## Components

### Web experience

- [Route app](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/Navbar/Navbar.jsx): `frontend/src/components/Navbar/Navbar.jsx`
- [Home and catalog](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Product browsing](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Products.jsx): `frontend/src/pages/Products.jsx`
- [Product detail](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/ProductDetail.jsx): `frontend/src/pages/ProductDetail.jsx`
- [Login](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Signup](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Signup.jsx): `frontend/src/pages/Signup.jsx`
- [Profile](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Cart screen](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Cart.jsx): `frontend/src/pages/Cart.jsx`
- [Orders screen](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Orders.jsx): `frontend/src/pages/Orders.jsx`
- [Payment screen](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/pages/Payment.jsx): `frontend/src/pages/Payment.jsx`
- [Token handling](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/api/authUtils.js): `frontend/src/api/authUtils.js`
- [Crowd canvas](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/ui/crowd-canvas.jsx): `frontend/src/components/ui/crowd-canvas.jsx`

### Shopping assistant

- [Chat interface](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/components/AssistantChat/AssistantChat.jsx): `frontend/src/components/AssistantChat/AssistantChat.jsx`
- [Assistant API](https://github.com/jaiganesh2108/shoply-ai/blob/main/frontend/src/api/ai.js): `frontend/src/api/ai.js`
- [AI endpoints](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/ai/views.py): `backend/ai/views.py`

### Commerce backend

- [Product endpoints](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/products/views.py): `backend/products/views.py`
- [Product model](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/products/models.py): `backend/products/models.py`
- [Cart endpoints](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/views.py): `backend/cart/views.py`
- [Cart model](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/models.py): `backend/cart/models.py`
- [Cart serializer](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/cart/serializers.py): `backend/cart/serializers.py`
- [Order domain](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/orders/views.py): `backend/orders/views.py`
- [Payment domain](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/payments/views.py): `backend/payments/views.py`

### Identity backend

- [User domain](https://github.com/jaiganesh2108/shoply-ai/blob/main/backend/users/views.py): `backend/users/views.py`

### Other components

- **Shopper**

## Connections

- Shopper → Route app: uses
- Route app → Navigation: renders (evidence: `frontend/src/App.jsx`)
- Route app → Home and catalog: routes (evidence: `frontend/src/App.jsx`)
- Route app → Product browsing: routes (evidence: `frontend/src/App.jsx`)
- Route app → Product detail: routes (evidence: `frontend/src/App.jsx`)
- Route app → Login: routes (evidence: `frontend/src/App.jsx`)
- Route app → Signup: routes (evidence: `frontend/src/App.jsx`)
- Route app → Profile: routes (evidence: `frontend/src/App.jsx`)
- Route app → Cart screen: routes (evidence: `frontend/src/App.jsx`)
- Route app → Orders screen: routes (evidence: `frontend/src/App.jsx`)
- Route app → Payment screen: routes (evidence: `frontend/src/App.jsx`)
- Route app → Token handling: checks expiry (evidence: `frontend/src/App.jsx`)
- Home and catalog → Chat interface: renders (evidence: `frontend/src/pages/Home.jsx`)
- Home and catalog → Crowd canvas: renders (evidence: `frontend/src/pages/Home.jsx`)
- Chat interface → Assistant API: sends messages (evidence: `frontend/src/components/AssistantChat/AssistantChat.jsx`)
- Assistant API → AI endpoints: requests
- Product browsing → Product endpoints: requests
- Product detail → Product endpoints: requests
- Cart screen → Cart endpoints: requests
- Orders screen → Order domain: requests
- Payment screen → Payment domain: requests
- Login → User domain: requests
- Signup → User domain: requests
- Profile → User domain: requests
- Product endpoints → Product model: queries (evidence: `backend/products/views.py`)
- Cart endpoints → Cart model: queries (evidence: `backend/cart/views.py`)
- Cart endpoints → Cart serializer: serializes (evidence: `backend/cart/views.py`)
