How nicklashn/open-golf-tracer works
Open Golf Tracer is a local-first golf-video editor: users upload footage, the app prepares and analyzes it into editable shot data, then users refine a project and export finished social-video formats. The graph keeps analysis, editing, AI-assisted composition, and rendering/export distinct. Some API and worker relationships are documented in the README or SOURCE INDEX; unsampled implementation details are not expanded into additional call edges.
Main entry points: projects.py Projects and uploads API · Editor.tsx Video editor · tasks.py Media preparation · pipeline.py Shot detection and analysis
Components 24
Web editor
- Web application
apps/web/src/components/app/AppRoot.tsx - Video editor
apps/web/src/editor/Editor.tsx - Project and timeline model
packages/schema/src/project.ts
API and data
- Projects and uploads API
apps/api/golf_api/routes/projects.py - API application
apps/api/golf_api/main.py - Job queue
apps/api/golf_api/jobs.py - Project database
apps/api/golf_api/models.py - Local media storage
apps/api/golf_api/storage.py - Course map lookup
apps/api/golf_api/routes/geo.py
Media analysis
- Background worker
apps/worker/golf_worker/main.py - Media preparation
apps/worker/golf_worker/tasks.py - Video decoding
shottracer/video.py - Shot detection and analysis
shottracer/pipeline.py - Ball detection
shottracer/detect.py - Flight physics fitting
packages/physics/src/fit.ts
Composition
- AI-assisted composition
packages/compose/src/ai.ts - Composition rules and planning
packages/compose/src/rules.ts
Rendering and export
- Graphics and overlays
packages/render/src/layers.ts - Export and compose worker
apps/exporter/src/main.ts - Export API client
apps/exporter/src/api.ts
Other components
- Local user
- FFmpeg
- Optional AI provider
- OpenStreetMap services
Connections 27
- Local user → Web application: opens and edits
- Web application → Projects and uploads API: uploads and manages
- Projects and uploads API → Job queue: queues work
apps/api/golf_api/routes/projects.py - Projects and uploads API → Project database: reads and writes
apps/api/golf_api/routes/projects.py - Projects and uploads API → Local media storage: stores media
apps/api/golf_api/routes/projects.py - API application → Projects and uploads API: registers routes
apps/api/golf_api/main.py - Background worker → Job queue: claims jobs
apps/worker/golf_worker/main.py - Background worker → Media preparation: dispatches handlers
apps/worker/golf_worker/main.py - Media preparation → Local media storage: reads media
apps/worker/golf_worker/tasks.py - Media preparation → FFmpeg: prepares previews
apps/worker/golf_worker/tasks.py - Media preparation → Shot detection and analysis: runs analysis
apps/worker/golf_worker/tasks.py - Shot detection and analysis → Video decoding: reads frames
shottracer/pipeline.py - Shot detection and analysis → Ball detection: detects shots
shottracer/pipeline.py - Background worker → Project database: records job results
apps/worker/golf_worker/main.py - Shot detection and analysis → Project and timeline model: produces project data
- Projects and uploads API → Video editor: returns project data
- Video editor → Project and timeline model: edits timeline
- Video editor → Flight physics fitting: refits flight
- Video editor → Course map lookup: requests course features
- Course map lookup → OpenStreetMap services: queries course data
apps/api/golf_api/routes/geo.py - Video editor → AI-assisted composition: requests video plan
- AI-assisted composition → Optional AI provider: sends round summary
- AI-assisted composition → Composition rules and planning: uses planning rules
packages/compose/src/ai.ts - Export and compose worker → Export API client: claims and reports jobs
apps/exporter/src/main.ts - Export and compose worker → Graphics and overlays: renders overlays
- Export and compose worker → FFmpeg: encodes video
- Local user → Export and compose worker: requests export