How technodisaster63/liftguard-ai works
LiftGuard is an offline-capable movement coaching platform: a browser starts a session, supplies or selects camera video, and receives live rep counts, form flags, and fatigue feedback; stopping saves a session report. The backend also supports user/face enrollment, settings, analytics, hardware control, and opt-in landmark contributions. The shared analysis engine and movement-mode layer underpin live and recorded-video analysis. Several relationships are documented in the README or visible in excerpts; unsampled feature implementations are represented at their supported paths, without inferring internal calls.
Main entry points: main.py FastAPI application · routes_sessions.py Session routes · session_manager.py Session manager · liftguard_engine.py LiftGuard engine
Components 34
Browser dashboard
- Dashboard
frontend/app/dashboard/page.tsx - Live coaching UI
frontend/app/live/page.tsx - Sessions and reports
frontend/app/sessions/page.tsx - Settings UI
frontend/app/settings/page.tsx - User and enrollment UI
frontend/app/register/page.tsx - Hardware UI
frontend/app/hardware/page.tsx - Contribution UI
frontend/app/contributions/page.tsx - API client
frontend/lib/api.ts - Live socket client
frontend/lib/ws.ts
Backend API
- FastAPI application
backend/app/main.py - Session routes
backend/app/api/routes_sessions.py - Live WebSocket
backend/app/api/ws_live.py - Settings routes
backend/app/api/routes_settings.py - Analytics routes
backend/app/api/routes_analytics.py - User routes
backend/app/api/routes_users.py - Hardware routes
backend/app/api/routes_hardware.py - Contribution routes
backend/app/api/routes_contrib.py
Movement analysis
- Session manager
backend/app/core/session_manager.py - LiftGuard engine
backend/app/core/liftguard_engine.py - Live movement feed
backend/app/video_analysis/live.py - Movement modes
backend/app/video_analysis/movements.py - Automatic mode
backend/app/video_analysis/auto_mode.py - Video analyzer
backend/app/video_analysis/analyzer.py - Fatigue tracking
backend/app/tracking/fatigue_engine.py - Risk index
backend/app/ml/injury_risk_index_v2.py
Identity and records
- Local user manager
backend/app/identity/user_manager_lite.py - Face ID
backend/app/identity/face_id.py - Session history store
backend/app/db/database.py - Settings store
backend/app/core/settings_store.py - Landmark contribution store
backend/app/contrib/store.py
Optional integrations
- Arduino controller
backend/app/hardware/arduino_controller.py
Other components
- Lifter
- Camera
- Video file
Connections 36
- Lifter → Dashboard: uses
README.md - Dashboard → API client: requests
frontend/app/dashboard/page.tsx - Live coaching UI → Live socket client: streams frames
README.md - API client → FastAPI application: calls API
README.md - Live socket client → Live WebSocket: exchanges live data
README.md - FastAPI application → Session routes: registers router
backend/app/main.py - FastAPI application → Live WebSocket: registers router
backend/app/main.py - FastAPI application → User routes: registers router
backend/app/main.py - FastAPI application → Hardware routes: registers router
backend/app/main.py - FastAPI application → Analytics routes: registers router
backend/app/main.py - FastAPI application → Settings routes: registers router
backend/app/main.py - FastAPI application → Contribution routes: registers router
backend/app/main.py - Session routes → Session manager: starts session
backend/app/api/routes_sessions.py - Session routes → Session history store: persists reports
backend/app/api/routes_sessions.py - Session routes → Landmark contribution store: records contributions
backend/app/api/routes_sessions.py - Session routes → Movement modes: validates mode
backend/app/api/routes_sessions.py - Session manager → LiftGuard engine: constructs
backend/app/core/session_manager.py - Camera → Session manager: provides frames
README.md - Video file → Video analyzer: analyzes clip
README.md - Session manager → Live movement feed: runs live analysis
README.md - Live movement feed → Movement modes: uses selected mode
backend/app/video_analysis/movements.py - LiftGuard engine → Automatic mode: uses
backend/app/core/liftguard_engine.py - Automatic mode → Movement modes: selects mode
backend/app/video_analysis/auto_mode.py - LiftGuard engine → Fatigue tracking: updates
backend/app/core/liftguard_engine.py - LiftGuard engine → Risk index: computes risk
backend/app/core/liftguard_engine.py - Session manager → Local user manager: identifies lifter
backend/app/core/session_manager.py - Local user manager → Face ID: uses embeddings
backend/app/identity/user_manager_lite.py - User routes → Local user manager: manages users
backend/app/api/routes_users.py - Analytics routes → Session routes: queries sessions
backend/app/api/routes_analytics.py - Settings UI → Settings routes: configures sessions
README.md - Settings routes → Settings store: reads and writes
backend/app/api/routes_settings.py - Hardware UI → Hardware routes: controls hardware
README.md - Hardware routes → Arduino controller: controls device
- Contribution UI → Contribution routes: submits contribution
README.md - Contribution routes → Landmark contribution store: stores landmarks
backend/app/api/routes_contrib.py - User and enrollment UI → User routes: registers lifter
README.md