Lightweight pose-correction app that runs a Python CV/ML backend (FastAPI), a React + Vite frontend, and an optional Spring Boot security backend. Includes live webcam pose analysis and voice feedback for corrective guidance.
api/— FastAPI backend that processes webcam frames, runs pose checkers fromlogic/, and exposes a WebSocket at/ws/{client_id}.frontend/— React + Vite single-page app (TypeScript) used for live camera feed and UI (src/pages/Practice.tsxhandles the WebSocket client).logic/— Pose-checker implementations andvoice_feedback.pyutilities used by the backend (legacy TTS available here).Poses/— Landmark/pose data (e.g.yoga_pose_landmarks.json).sec/— Spring Boot project (optional) providing auth/MFA and APIs used by the frontend.
-
Open PowerShell in the repository root (
d:\YogaFix). -
Create and activate a Python virtual environment (recommended name:
.venv):
python -m venv .venv
# Activate for this PowerShell session
.\.venv\Scripts\Activate.ps1If PowerShell blocks the activation script because of execution policy, run (temporary for the session):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
.\.venv\Scripts\Activate.ps1- Install Python dependencies:
pip install -r requirements.txt- Start the FastAPI backend (from
d:\YogaFix\api):
cd api
# dev: use uvicorn for autoreload
py -m uvicorn main:app --reload --host 0.0.0.0 --port 8000- Start the frontend (from
d:\YogaFix\frontend):
cd frontend
npm install
npm run dev- (Optional) Start the Spring Boot server (from
d:\YogaFix\sec):
cd sec
./mvnw.cmd spring-boot:runThis repository is provided as-is. Feel free to open issues or contribute improvements via pull requests.