How minduy314/gait-analysis works
This is a gait-analysis platform with a Next.js client and a FastAPI backend. Its principal workflow is to create a subject and session, upload a walking video, queue asynchronous analysis, then review assessment, progress, and reports. The backend also supports a research-reference pipeline and video-to-reference validation. Sampled source confirms the video-processing and assessment internals; several API-to-domain links are based on documented capabilities rather than inspected route implementations, and are marked unverified.
Main entry points: routes REST endpoints · video_pipeline_runner.py Video pipeline runner · main.py FastAPI application · assessment_engine.py Biomechanical assessment
Components 24
User interface
- Gait workspace
frontend/src/app - API client
frontend/src/lib/api-client.ts
API and identity
- FastAPI application
src/api/main.py - Authentication
src/api/auth/routes.py - REST endpoints
src/api/routes - Subjects and sessions
src/api/routes/sessions.py - Analysis jobs
src/jobs
Video analysis
- Video validation and frames
src/video - Pose estimation
src/pose_estimation - Camera view detection
src/view_detection/camera_view_classifier.py - Gait events and cycles
src/gait_events - Video feature extraction
src/feature_extraction/video_feature_extractor.py - Video pipeline runner
src/video/video_pipeline_runner.py
Research and assessment
- Biomechanical assessment
src/assessment/assessment_engine.py - Reference distributions
src/reference/reference_builder.py - Agreement validation
src/validation/validation_runner.py - Baseline and progress
src/progress/progress_engine.py - Individual and professional reports
src/reporting - Motion-capture data pipeline
src/data_loader - Reference feature extraction
src/feature_extraction/npz_feature_extractor.py
Persistence and outputs
- SQLite persistence
src/database/database.py - Data repositories
src/database/repositories.py - Secure file storage
src/storage/file_storage.py
Other components
- Platform user
Connections 28
- Platform user → Gait workspace: uses
- Gait workspace → API client: requests data
- API client → FastAPI application: calls REST API
- FastAPI application → REST endpoints: registers routers
src/api/main.py - FastAPI application → Authentication: registers router
src/api/main.py - Platform user → Authentication: registers or logs in
src/api/auth/routes.py - REST endpoints → Subjects and sessions: includes session endpoints
src/api/main.py - Subjects and sessions → Data repositories: uses repositories
src/api/routes/sessions.py - Platform user → Subjects and sessions: creates subject and session
- Platform user → REST endpoints: uploads recording
- REST endpoints → Secure file storage: stores upload
- REST endpoints → Analysis jobs: submits analysis
- Analysis jobs → Video pipeline runner: runs processing
- Video pipeline runner → Video validation and frames: validates and extracts frames
src/video/video_pipeline_runner.py - Video pipeline runner → Pose estimation: creates estimator
src/video/video_pipeline_runner.py - Video pipeline runner → Camera view detection: classifies poses
src/video/video_pipeline_runner.py - Video pipeline runner → Gait events and cycles: detects and segments gait
src/video/video_pipeline_runner.py - Video pipeline runner → Video feature extraction: extracts features
src/video/video_pipeline_runner.py - REST endpoints → Biomechanical assessment: requests assessment
- REST endpoints → Baseline and progress: requests progress
- REST endpoints → Individual and professional reports: requests reports
- Biomechanical assessment → Reference distributions: compares features
- Biomechanical assessment → Baseline and progress: informs tracking
- Platform user → Motion-capture data pipeline: maintains reference data
- Motion-capture data pipeline → Reference feature extraction: feeds extraction
- FastAPI application → SQLite persistence: initializes database
src/api/main.py - SQLite persistence → Data repositories: defines models
src/database/repositories.py - Baseline and progress → Individual and professional reports: provides tracking results