# anvithdommata/crashvzn architecture

> Architecture diagram of the GitHub repository anvithdommata/crashvzn, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anvithdommata/crashvzn
- Repository: https://github.com/anvithdommata/crashvzn

## Overview

Sunhacks is an incident-reconstruction desktop application: footage is processed into a scene package, which users inspect and analyze in the viewer, optionally with an AI assistant. The graph emphasizes the documented reconstruction pipeline, scene-motion engine, and assistant tool path. The README gives no product workflow or feature details, and many UI, Electron, and pipeline modules were not sampled; unverified connections are therefore omitted rather than inferred.

Main entry points: [`pipeline/src/reconstruct/build.py`](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/build.py) (Package builder), [`packages/assistant/src/session.ts`](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/session.ts) (Assistant session), [`pipeline/src/reconstruct/steps/ingest.py`](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/ingest.py) (Footage ingest), [`pipeline/src/reconstruct/steps/kinematics.py`](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/kinematics.py) (Track kinematics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reconstruction["Reconstruction pipeline"]
  node_builder["Package builder<br/>[build.py]"]
  node_ingest["Footage ingest<br/>[ingest.py]"]
  node_tracking["Detection and tracking<br/>[detect_track.py]"]
  node_geometry["Geometry model<br/>[geometry.py]"]
  node_kinematics["Track kinematics<br/>[kinematics.py]"]
  node_scene_models["Scene package models<br/>[models.py]"]
  node_package["Scene package output<br/>[package.py]"]
end

subgraph group_viewer["Scene engine"]
  node_gemini_engine["Scene construction<br/>[engine.ts]"]
  node_motion["Motion planning<br/>[motion.ts]"]
  node_incident_spec["Incident specification<br/>[spec.ts]"]
  node_vehicle_models["Vehicle builder<br/>[cars.ts]"]
  node_road_spec["Road specification<br/>[spec.ts]"]
end

subgraph group_assistant["Assistant tools"]
  node_assistant_session["Assistant session<br/>[session.ts]"]
  node_mcp["MCP server<br/>[server.ts]"]
  node_tool_registry["Tool registry<br/>[registry.ts]"]
  node_scene_controller["Scene controller<br/>[controller.ts]"]
  node_provider["AI provider<br/>[types.ts]"]
end

subgraph group_desktop["Desktop experience"]
  node_viewer_ui["Scene viewer<br/>[SceneViewer.tsx]"]
  node_landing["Product website<br/>[App.tsx]"]
end

node_operator(("Incident analyst"))
node_footage["Mosaic footage"]

node_operator -->|"provides footage"| node_footage
node_footage -.->|"processes footage"| node_builder
node_builder -->|"runs ingest"| node_ingest
node_builder -->|"runs tracking"| node_tracking
node_builder -->|"runs kinematics"| node_kinematics
node_builder -->|"writes package"| node_package
node_ingest -->|"uses geometry"| node_geometry
node_ingest -->|"uses models"| node_scene_models
node_kinematics -->|"uses geometry"| node_geometry
node_kinematics -->|"uses models"| node_scene_models
node_builder -->|"builds records"| node_scene_models
node_gemini_engine -->|"builds vehicles"| node_vehicle_models
node_gemini_engine -->|"resolves roads"| node_road_spec
node_motion -->|"plans specification"| node_incident_spec
node_viewer_ui -.->|"uses scene engine"| node_gemini_engine
node_operator -.->|"inspects incident"| node_viewer_ui
node_assistant_session -->|"starts server"| node_mcp
node_assistant_session -->|"runs fast-path tools"| node_tool_registry
node_assistant_session -->|"selects provider"| node_provider
node_mcp -->|"dispatches tools"| node_tool_registry
node_tool_registry -->|"calls controller"| node_scene_controller
node_assistant_session -.->|"answers requests"| node_operator
node_landing -.->|"introduces product"| node_operator

click node_builder "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/build.py"
click node_ingest "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/ingest.py"
click node_tracking "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/detect_track.py"
click node_geometry "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/geometry.py"
click node_kinematics "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/kinematics.py"
click node_scene_models "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/models.py"
click node_package "https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/package.py"
click node_gemini_engine "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/engine.ts"
click node_motion "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/motion.ts"
click node_incident_spec "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/spec.ts"
click node_vehicle_models "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/scene/cars.ts"
click node_road_spec "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/road/spec.ts"
click node_viewer_ui "https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/SceneViewer.tsx"
click node_assistant_session "https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/session.ts"
click node_mcp "https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/mcp/server.ts"
click node_tool_registry "https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/tools/registry.ts"
click node_scene_controller "https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/controller.ts"
click node_provider "https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/providers/types.ts"
click node_landing "https://github.com/anvithdommata/crashvzn/blob/main/landing/src/App.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_builder,node_ingest,node_tracking,node_geometry,node_kinematics,node_scene_models,node_package toneBlue
class node_gemini_engine,node_motion,node_incident_spec,node_vehicle_models,node_road_spec toneAmber
class node_assistant_session,node_mcp,node_tool_registry,node_scene_controller,node_provider toneMint
class node_viewer_ui,node_landing toneRose
class node_operator,node_footage toneIndigo
```

## Components

### Reconstruction pipeline

- [Package builder](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/build.py): `pipeline/src/reconstruct/build.py`
- [Footage ingest](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/ingest.py): `pipeline/src/reconstruct/steps/ingest.py`
- [Detection and tracking](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/detect_track.py): `pipeline/src/reconstruct/steps/detect_track.py`
- [Geometry model](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/geometry.py): `pipeline/src/reconstruct/geometry.py`
- [Track kinematics](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/kinematics.py): `pipeline/src/reconstruct/steps/kinematics.py`
- [Scene package models](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/models.py): `pipeline/src/reconstruct/models.py`
- [Scene package output](https://github.com/anvithdommata/crashvzn/blob/main/pipeline/src/reconstruct/steps/package.py): `pipeline/src/reconstruct/steps/package.py`

### Scene engine

- [Scene construction](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/engine.ts): `FrontEnd/app/src/gemini/engine.ts`
- [Motion planning](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/motion.ts): `FrontEnd/app/src/gemini/motion.ts`
- [Incident specification](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/gemini/spec.ts): `FrontEnd/app/src/gemini/spec.ts`
- [Vehicle builder](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/scene/cars.ts): `FrontEnd/app/src/scene/cars.ts`
- [Road specification](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/road/spec.ts): `FrontEnd/app/src/road/spec.ts`

### Assistant tools

- [Assistant session](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/session.ts): `packages/assistant/src/session.ts`
- [MCP server](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/mcp/server.ts): `packages/assistant/src/mcp/server.ts`
- [Tool registry](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/tools/registry.ts): `packages/assistant/src/tools/registry.ts`
- [Scene controller](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/controller.ts): `packages/assistant/src/controller.ts`
- [AI provider](https://github.com/anvithdommata/crashvzn/blob/main/packages/assistant/src/providers/types.ts): `packages/assistant/src/providers/types.ts`

### Desktop experience

- [Scene viewer](https://github.com/anvithdommata/crashvzn/blob/main/FrontEnd/app/src/SceneViewer.tsx): `FrontEnd/app/src/SceneViewer.tsx`
- [Product website](https://github.com/anvithdommata/crashvzn/blob/main/landing/src/App.tsx): `landing/src/App.tsx`

### Other components

- **Incident analyst**
- **Mosaic footage**

## Connections

- Incident analyst → Mosaic footage: provides footage
- Mosaic footage → Package builder: processes footage
- Package builder → Footage ingest: runs ingest (evidence: `pipeline/src/reconstruct/build.py`)
- Package builder → Detection and tracking: runs tracking (evidence: `pipeline/src/reconstruct/build.py`)
- Package builder → Track kinematics: runs kinematics (evidence: `pipeline/src/reconstruct/build.py`)
- Package builder → Scene package output: writes package (evidence: `pipeline/src/reconstruct/build.py`)
- Footage ingest → Geometry model: uses geometry (evidence: `pipeline/src/reconstruct/steps/ingest.py`)
- Footage ingest → Scene package models: uses models (evidence: `pipeline/src/reconstruct/steps/ingest.py`)
- Track kinematics → Geometry model: uses geometry (evidence: `pipeline/src/reconstruct/steps/kinematics.py`)
- Track kinematics → Scene package models: uses models (evidence: `pipeline/src/reconstruct/steps/kinematics.py`)
- Package builder → Scene package models: builds records (evidence: `pipeline/src/reconstruct/build.py`)
- Scene construction → Vehicle builder: builds vehicles (evidence: `FrontEnd/app/src/gemini/engine.ts`)
- Scene construction → Road specification: resolves roads (evidence: `FrontEnd/app/src/gemini/engine.ts`)
- Motion planning → Incident specification: plans specification (evidence: `FrontEnd/app/src/gemini/motion.ts`)
- Scene viewer → Scene construction: uses scene engine
- Incident analyst → Scene viewer: inspects incident
- Assistant session → MCP server: starts server (evidence: `packages/assistant/src/session.ts`)
- Assistant session → Tool registry: runs fast-path tools (evidence: `packages/assistant/src/session.ts`)
- Assistant session → AI provider: selects provider (evidence: `packages/assistant/src/session.ts`)
- MCP server → Tool registry: dispatches tools (evidence: `packages/assistant/src/mcp/server.ts`)
- Tool registry → Scene controller: calls controller (evidence: `packages/assistant/src/tools/registry.ts`)
- Assistant session → Incident analyst: answers requests
- Product website → Incident analyst: introduces product
