# sharvarisalkar/yoga_pose_detection_and_correction_project architecture

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

- Interactive diagram: https://gitdiagram.com/sharvarisalkar/yoga_pose_detection_and_correction_project
- Repository: https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project

## Overview

This is a Flask yoga-practice site: users start a webcam session, hold poses for real-time correction and timed progress, advance through poses and two rounds, then review saved session history. The backend routes requests and video frames to the pose detector; the browser practice client displays feedback and controls round transitions. The README also describes six supported poses and the web interface. Source excerpts show session persistence and detector logic; templates and history-page wiring were not sampled, so those links are limited to documented or visible relationships.

Main entry points: [`app.py`](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py) (Flask routes), [`pose_detector.py`](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py) (Pose detector), [`static/practice.js`](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/practice.js) (Practice browser), [`static/style.css`](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/style.css) (Interface styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Practice interface"]
  node_browser["Practice browser<br/>[practice.js]"]
  node_pages["Web pages"]
  node_styles["Interface styling<br/>[style.css]"]
end

subgraph group_backend["Session backend"]
  node_routes["Flask routes<br/>[app.py]"]
  node_frame_stream["Video feed<br/>[app.py]"]
  node_pose_api["Pose status API<br/>[app.py]"]
  node_session_flow["Session and rounds<br/>[app.py]"]
end

subgraph group_vision["Pose processing"]
  node_detector["Pose detector<br/>[pose_detector.py]"]
  node_landmarks["Landmark estimation<br/>[pose_detector.py]"]
  node_pose_checks["Pose validation<br/>[pose_detector.py]"]
  node_hold_meditation["Hold and meditation timing<br/>[pose_detector.py]"]
  node_pose_sequence["Pose and round sequence<br/>[pose_detector.py]"]
end

subgraph group_history["Session history"]
  node_history_store[("Session history")]
  node_history_page["History view<br/>[history.html]"]
end

node_practitioner(("Practitioner"))
node_camera["Webcam"]

node_practitioner -->|"practices through"| node_browser
node_browser -.->|"renders"| node_pages
node_browser -->|"requests session actions"| node_routes
node_routes -->|"creates"| node_detector
node_routes -->|"captures frames"| node_camera
node_routes -->|"serves video"| node_frame_stream
node_routes -->|"serves status"| node_pose_api
node_pose_api -->|"processes frames"| node_detector
node_frame_stream -->|"processes frames"| node_detector
node_detector -.->|"estimates landmarks"| node_landmarks
node_detector -->|"validates pose"| node_pose_checks
node_detector -->|"tracks timing"| node_hold_meditation
node_session_flow -->|"advances poses"| node_detector
node_routes -->|"handles actions"| node_session_flow
node_routes -->|"reads and writes"| node_history_store
node_routes -->|"renders history"| node_history_page
node_styles -.->|"styles interface"| node_browser

click node_browser "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/practice.js"
click node_pages "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/tree/main/templates"
click node_styles "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/style.css"
click node_routes "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py"
click node_frame_stream "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py"
click node_pose_api "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py"
click node_session_flow "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py"
click node_detector "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py"
click node_landmarks "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py"
click node_pose_checks "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py"
click node_hold_meditation "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py"
click node_pose_sequence "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py"
click node_history_store "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/data/session_history.json"
click node_history_page "https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/templates/history.html"

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_browser,node_pages,node_styles toneBlue
class node_routes,node_frame_stream,node_pose_api,node_session_flow toneAmber
class node_detector,node_landmarks,node_pose_checks,node_hold_meditation,node_pose_sequence toneMint
class node_history_store,node_history_page toneRose
class node_practitioner,node_camera toneIndigo
```

## Components

### Practice interface

- [Practice browser](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/practice.js): `static/practice.js`
- [Web pages](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/tree/main/templates): `templates`
- [Interface styling](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/static/style.css): `static/style.css`

### Session backend

- [Flask routes](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py): `app.py`
- [Video feed](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py): `app.py`
- [Pose status API](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py): `app.py`
- [Session and rounds](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/app.py): `app.py`

### Pose processing

- [Pose detector](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py): `pose_detector.py`
- [Landmark estimation](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py): `pose_detector.py`
- [Pose validation](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py): `pose_detector.py`
- [Hold and meditation timing](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py): `pose_detector.py`
- [Pose and round sequence](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/pose_detector.py): `pose_detector.py`

### Session history

- [Session history](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/data/session_history.json): `data/session_history.json`
- [History view](https://github.com/sharvarisalkar/yoga_pose_detection_and_correction_project/blob/main/templates/history.html): `templates/history.html`

### Other components

- **Practitioner**
- **Webcam**

## Connections

- Practitioner → Practice browser: practices through (evidence: `README.md`)
- Practice browser → Web pages: renders
- Practice browser → Flask routes: requests session actions (evidence: `static/practice.js`)
- Flask routes → Pose detector: creates (evidence: `app.py`)
- Flask routes → Webcam: captures frames (evidence: `app.py`)
- Flask routes → Video feed: serves video (evidence: `app.py`)
- Flask routes → Pose status API: serves status (evidence: `app.py`)
- Pose status API → Pose detector: processes frames (evidence: `app.py`)
- Video feed → Pose detector: processes frames (evidence: `app.py`)
- Pose detector → Landmark estimation: estimates landmarks (evidence: `pose_detector.py`)
- Pose detector → Pose validation: validates pose (evidence: `pose_detector.py`)
- Pose detector → Hold and meditation timing: tracks timing (evidence: `pose_detector.py`)
- Session and rounds → Pose detector: advances poses (evidence: `app.py`)
- Flask routes → Session and rounds: handles actions (evidence: `app.py`)
- Flask routes → Session history: reads and writes (evidence: `app.py`)
- Flask routes → History view: renders history (evidence: `app.py`)
- Interface styling → Practice browser: styles interface
