How leohq1/formcheck works
FormCheck is an asynchronous badminton-clip coaching application: a player submits a clip, the API stores and queues it, a worker analyzes movement, and the browser presents progress and coaching results. The graph includes documented video, pose, biomechanics, rules, and retrieval/generation stages. Some runtime wiring—especially from the durable worker into the provisional analysis pipeline and coaching subsystem—is not established by the sampled excerpts, so those connections are omitted or marked unverified.
Main entry points: pipeline.py Analysis pipeline · tasks.py Analysis worker · routes.py HTTP API · engine.py Technique rules
Components 21
Web client
- Web application
apps/web/src/App.tsx - Clip upload
apps/web/src/pages/UploadPage.tsx - Analysis results
apps/web/src/pages/AnalysisPage.tsx - API client
apps/web/src/api/httpClient.ts
API and jobs
- HTTP API
services/formcheck/api/routes.py - Object storage
services/formcheck/storage.py - Job queue
services/formcheck/worker/broker.py - Analysis records
services/formcheck/db.py - Analysis worker
services/formcheck/worker/tasks.py
Movement analysis
- Analysis pipeline
services/worker/analysis/formcheck_analysis/pipeline.py - Video preparation
packages/video/formcheck_video/normalization.py - Pose estimation
packages/pose/formcheck_pose/mediapipe_estimator.py - Quality checks
packages/biomechanics/formcheck_biomechanics/quality.py - Stroke segmentation
packages/biomechanics/formcheck_biomechanics/segmentation.py - Phase estimation
packages/biomechanics/formcheck_biomechanics/phases.py - Biomechanics features
packages/biomechanics/formcheck_biomechanics/features/arm_extension.py - Biomechanics config
packages/biomechanics/formcheck_biomechanics/config.py - Technique rules
packages/rules/formcheck_rules/engine.py
Coaching feedback
- Coaching retrieval
packages/rag/src/formcheck_rag/retrieval.py - Feedback generation
packages/rag/src/formcheck_rag/generator.py
Other components
- Player
Connections 25
- Player → Web application: uses
README.md - Web application → Clip upload: presents
README.md - Clip upload → API client: submits clip
README.md - Analysis results → API client: requests results
README.md - API client → HTTP API: calls API
README.md - HTTP API → Object storage: stores uploads
services/formcheck/api/routes.py - HTTP API → Job queue: enqueues jobs
services/formcheck/api/main.py - HTTP API → Analysis records: reads and writes
services/formcheck/api/routes.py - Job queue → Analysis worker: dispatches jobs
services/formcheck/worker/tasks.py - Analysis worker → Analysis records: persists results
services/formcheck/worker/tasks.py - Analysis worker → Object storage: reads clip
services/formcheck/worker/tasks.py - Analysis worker → Analysis pipeline: invokes analysis
- Analysis pipeline → Video preparation: runs preparation
- Analysis pipeline → Pose estimation: runs estimation
- Analysis pipeline → Quality checks: assesses quality
- Analysis pipeline → Stroke segmentation: segments stroke
- Analysis pipeline → Phase estimation: estimates phases
- Analysis pipeline → Biomechanics features: extracts features
services/worker/analysis/formcheck_analysis/pipeline.py - Analysis pipeline → Technique rules: evaluates rules
services/worker/analysis/formcheck_analysis/pipeline.py - Biomechanics features → Biomechanics config: uses configuration
packages/biomechanics/formcheck_biomechanics/features/arm_extension.py - Technique rules → Biomechanics features: evaluates values
packages/rules/formcheck_rules/engine.py - Technique rules → Coaching retrieval: supplies findings
- Coaching retrieval → Feedback generation: provides passages
- Feedback generation → Analysis worker: returns coaching
- Analysis worker → Analysis results: serves result
README.md