How aarnavkannan/sunhacks works
Sunhacks is an incident-reconstruction and review product: footage is processed into a scene package, then explored in a desktop viewer with motion analysis and an assistant. The tree also contains a parallel BackEnd pipeline, shared scene types, voice support, and a download-focused landing site. The README gives no product workflow details, so pipeline relationships below rely on build.py’s indexed imports; several frontend and integration relationships remain unshown in the excerpts and are omitted.
Main entry points: reconstruct/build.py Scene builder · reconstruct/build.py Backend builder · engine.ts Scene engine · registry.ts Tool registry
Components 26
Scene reconstruction
- Scene builder
pipeline/src/reconstruct/build.py - Footage ingest
pipeline/src/reconstruct/steps/ingest.py - Geometry model
pipeline/src/reconstruct/geometry.py - Scene models
pipeline/src/reconstruct/models.py - Step cache
pipeline/src/reconstruct/steps/cache.py - Track kinematics
pipeline/src/reconstruct/steps/kinematics.py - Backend builder
BackEnd/pipeline/src/reconstruct/build.py - Backend geometry
BackEnd/pipeline/src/reconstruct/geometry.py - Backend models
BackEnd/pipeline/src/reconstruct/models.py - Backend cache
BackEnd/pipeline/src/reconstruct/steps/cache.py - Backend kinematics
BackEnd/pipeline/src/reconstruct/steps/kinematics.py
Desktop review
- Scene viewer
FrontEnd/app/src/SceneViewer.tsx - Scene engine
FrontEnd/app/src/gemini/engine.ts - Motion planner
FrontEnd/app/src/gemini/motion.ts - Incident spec
FrontEnd/app/src/gemini/spec.ts - Kinematics analysis
FrontEnd/app/src/kinematics/derive.ts - Video ingest
FrontEnd/app/src/lib/ingest.ts - Video export
FrontEnd/app/src/lib/exportVideo.ts
Assistant and voice
- Assistant session
packages/assistant/src/session.ts - Tool registry
packages/assistant/src/tools/registry.ts - Scene controller
packages/assistant/src/controller.ts - MCP server
packages/assistant/src/mcp/server.ts - System prompt
packages/assistant/src/prompt/system-prompt.ts - Voice controller
FrontEnd/app/src/voice/controller.ts
Product site
- Landing site
landing/src/App.tsx
Other components
- Reviewer
Connections 17
- Scene builder → Footage ingest: uses ingest
pipeline/src/reconstruct/build.py - Scene builder → Geometry model: uses geometry
pipeline/src/reconstruct/build.py - Scene builder → Scene models: uses models
pipeline/src/reconstruct/build.py - Scene builder → Step cache: uses cache
pipeline/src/reconstruct/build.py - Scene builder → Track kinematics: uses kinematics
pipeline/src/reconstruct/build.py - Backend builder → Backend geometry: uses geometry
BackEnd/pipeline/src/reconstruct/build.py - Backend builder → Backend models: uses models
BackEnd/pipeline/src/reconstruct/build.py - Backend builder → Backend cache: uses cache
BackEnd/pipeline/src/reconstruct/build.py - Backend builder → Backend kinematics: uses kinematics
BackEnd/pipeline/src/reconstruct/build.py - Scene engine → Incident spec: resolves spec
FrontEnd/app/src/gemini/engine.ts - Scene engine → Motion planner: plans motion
FrontEnd/app/src/gemini/engine.ts - Scene engine → Incident spec: builds roads
FrontEnd/app/src/gemini/engine.ts - Assistant session → MCP server: starts server
packages/assistant/src/session.ts - Assistant session → Tool registry: calls tools
packages/assistant/src/session.ts - MCP server → Tool registry: dispatches tools
packages/assistant/src/mcp/server.ts - Tool registry → Scene controller: invokes methods
packages/assistant/src/tools/registry.ts - Reviewer → Landing site: visits