# aaryan-sharmaa/prana-pulse architecture

> Architecture diagram of the GitHub repository aaryan-sharmaa/prana-pulse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aaryan-sharmaa/prana-pulse
- Repository: https://github.com/aaryan-sharmaa/prana-pulse

## Overview

PranaPulse is a yoga-guidance web app combining an AI chat for personalized pose advice with browser-based pose verification, plus account screens. The main flow is a user asking a question in the chat, the client sending it to the server, and the server returning a Groq-generated response for display. A separate practice flow loads a pose model and classifies webcam video in the browser. The sampled sources establish these flows; route and authentication wiring is only partially visible, so uncertain links are omitted.

Main entry points: [`Client/src/App.jsx`](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/App.jsx) (App router), [`Server/controllers/chatController.js`](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/controllers/chatController.js) (Chat controller), [`Client/src/components/ai/Ai.jsx`](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/ai/Ai.jsx) (AI chat), [`Client/src/components/poseverifier/Poseverifier.jsx`](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/poseverifier/Poseverifier.jsx) (Pose verifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["App router<br/>[App.jsx]"]
  node_landing["Home page<br/>[Front.jsx]"]
end

subgraph group_guidance["Yoga guidance"]
  node_chat_ui["AI chat<br/>[Ai.jsx]"]
  node_pose_ui["Pose verifier<br/>[Poseverifier.jsx]"]
  node_model_service{{"Pose model"}}
end

subgraph group_identity["Accounts"]
  node_signin_ui["Sign-in screen<br/>[Signin.jsx]"]
  node_signup_ui["Sign-up screen<br/>[Signup.jsx]"]
end

subgraph group_server["Server services"]
  node_chat_api["Chat API route<br/>[chatRoute.js]"]
  node_chat_controller["Chat controller<br/>[chatController.js]"]
  node_groq{{"Groq AI"}}
  node_auth_api["Auth routes<br/>[authRoute.js]"]
  node_auth_controller["Auth controller<br/>[authController.js]"]
  node_supabase_client["Supabase client<br/>[Supabase.js]"]
  node_server_app["Express server<br/>[server.js]"]
end

node_user(("Visitor"))
node_supabase_auth{{"Supabase Auth"}}

node_user -->|"visits"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_chat_ui
node_app -->|"routes to"| node_pose_ui
node_app -->|"routes to"| node_signin_ui
node_app -->|"routes to"| node_signup_ui
node_user -->|"asks yoga"| node_chat_ui
node_chat_ui -->|"posts chat"| node_chat_api
node_server_app -->|"mounts"| node_chat_api
node_chat_api -->|"dispatches"| node_chat_controller
node_chat_controller -->|"requests completion"| node_groq
node_groq -->|"returns response"| node_chat_controller
node_chat_controller -->|"returns answer"| node_chat_ui
node_user -->|"practices pose"| node_pose_ui
node_pose_ui -->|"loads and predicts"| node_model_service
node_user -->|"signs in"| node_signin_ui
node_user -->|"signs up"| node_signup_ui
node_server_app -->|"mounts"| node_auth_api
node_auth_api -->|"dispatches"| node_auth_controller
node_auth_controller -->|"uses"| node_supabase_client
node_supabase_client -->|"authenticates"| node_supabase_auth

click node_app "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/App.jsx"
click node_landing "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/Body/Front.jsx"
click node_chat_ui "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/ai/Ai.jsx"
click node_pose_ui "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/poseverifier/Poseverifier.jsx"
click node_signin_ui "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/authentication/Signin.jsx"
click node_signup_ui "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/authentication/Signup.jsx"
click node_chat_api "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/routes/chatRoute.js"
click node_chat_controller "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/controllers/chatController.js"
click node_auth_api "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/routes/authRoute.js"
click node_auth_controller "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/controllers/authController.js"
click node_supabase_client "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/Supabase.js"
click node_server_app "https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/utils/server.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_landing toneBlue
class node_chat_ui,node_pose_ui,node_model_service toneAmber
class node_signin_ui,node_signup_ui toneMint
class node_chat_api,node_chat_controller,node_groq,node_auth_api,node_auth_controller,node_supabase_client,node_server_app toneRose
class node_user,node_supabase_auth toneIndigo
```

## Components

### Web experience

- [App router](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/App.jsx): `Client/src/App.jsx`
- [Home page](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/Body/Front.jsx): `Client/src/components/Body/Front.jsx`

### Yoga guidance

- [AI chat](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/ai/Ai.jsx): `Client/src/components/ai/Ai.jsx`
- [Pose verifier](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/components/poseverifier/Poseverifier.jsx): `Client/src/components/poseverifier/Poseverifier.jsx`
- **Pose model**

### Accounts

- [Sign-in screen](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/authentication/Signin.jsx): `Client/src/authentication/Signin.jsx`
- [Sign-up screen](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Client/src/authentication/Signup.jsx): `Client/src/authentication/Signup.jsx`

### Server services

- [Chat API route](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/routes/chatRoute.js): `Server/routes/chatRoute.js`
- [Chat controller](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/controllers/chatController.js): `Server/controllers/chatController.js`
- **Groq AI**
- [Auth routes](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/routes/authRoute.js): `Server/routes/authRoute.js`
- [Auth controller](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/controllers/authController.js): `Server/controllers/authController.js`
- [Supabase client](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/Supabase.js): `Server/Supabase.js`
- [Express server](https://github.com/aaryan-sharmaa/prana-pulse/blob/main/Server/utils/server.js): `Server/utils/server.js`

### Other components

- **Visitor**
- **Supabase Auth**

## Connections

- Visitor → App router: visits
- App router → Home page: routes to
- App router → AI chat: routes to
- App router → Pose verifier: routes to
- App router → Sign-in screen: routes to
- App router → Sign-up screen: routes to
- Visitor → AI chat: asks yoga
- AI chat → Chat API route: posts chat
- Express server → Chat API route: mounts
- Chat API route → Chat controller: dispatches
- Chat controller → Groq AI: requests completion
- Groq AI → Chat controller: returns response
- Chat controller → AI chat: returns answer
- Visitor → Pose verifier: practices pose
- Pose verifier → Pose model: loads and predicts
- Visitor → Sign-in screen: signs in
- Visitor → Sign-up screen: signs up
- Express server → Auth routes: mounts
- Auth routes → Auth controller: dispatches
- Auth controller → Supabase client: uses
- Supabase client → Supabase Auth: authenticates
