# balamurali-006/dumpiq_final architecture

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

- Interactive diagram: https://gitdiagram.com/balamurali-006/dumpiq_final
- Repository: https://github.com/balamurali-006/dumpiq_final

## Overview

DumpIQ is a real-time mine-dump simulation: autonomous haul trucks repeatedly choose safe dump locations, navigate and reserve them, deposit material, and update shared state. The DumpMap service owns simulation state and dump records, while the browser receives live snapshots for a 3D dashboard and searchable dump log. The graph preserves the documented safety, route-planning, and visualization capabilities. Some agent and server internals were not fully excerpted, so links beyond shown calls and documented service behavior are omitted or marked optional.

Main entry points: [`frontend/src/components/Scene3D.jsx`](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Scene3D.jsx) (3D scene), [`dumpmap_server/server.py`](https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/server.py) (DumpMap API), [`truck_agent_server/truck_agent.py`](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/truck_agent.py) (Truck cycle), [`frontend/src/App.jsx`](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/App.jsx) (Dashboard app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation authority"]
  node_dump_service["DumpMap API<br/>[server.py]"]
  node_dumpmap["Grid and height map<br/>[dumpmap.py]"]
  node_safezone["Surface safety<br/>[safezone.py]"]
end

subgraph group_agents["Truck autonomy"]
  node_agent_server["Agent service<br/>[server.py]"]
  node_truck_agent["Truck cycle<br/>[truck_agent.py]"]
  node_spot_selection["SpotIQ selection<br/>[spotiq.py]"]
  node_path_planning["Hybrid A*<br/>[hybrid_a_star.py]"]
  node_terrain_model["PileNet model<br/>[pilenet_model.py]"]
end

subgraph group_frontend["Live dashboard"]
  node_app["Dashboard app<br/>[App.jsx]"]
  node_simulation_hook["Live state hook<br/>[useSimulation.js]"]
  node_scene["3D scene<br/>[Scene3D.jsx]"]
  node_terrain["Terrain view<br/>[Terrain.jsx]"]
  node_trucks_view["Truck view<br/>[Trucks.jsx]"]
  node_lanes["Dynamic lanes<br/>[DynamicLanes.jsx]"]
  node_reservations["Reservation zones"]
  node_dump_markers["Dump markers<br/>[DumpMarkers.jsx]"]
  node_safe_overlay["Safety overlay"]
  node_boundary["Polygon boundary"]
  node_hud["Simulation HUD<br/>[HUD.jsx]"]
  node_dump_log["Dump log panel<br/>[DumpLogPanel.jsx]"]
end

subgraph group_persistence["Dump records"]
  node_dump_db[("Dump log database<br/>[db.py]")]
end

node_operator(("Operator"))
node_browser(("Browser"))

node_operator -->|"views"| node_app
node_agent_server -->|"starts agents"| node_truck_agent
node_truck_agent -->|"fetches and updates"| node_dump_service
node_truck_agent -->|"selects spots"| node_spot_selection
node_truck_agent -->|"plans routes"| node_path_planning
node_truck_agent -.->|"uses classifier"| node_terrain_model
node_dump_service -->|"manages state"| node_dumpmap
node_dump_service -->|"checks safety"| node_safezone
node_dump_service -->|"records dumps"| node_dump_db
node_dump_service -->|"broadcasts snapshots"| node_browser
node_browser -->|"receives updates"| node_simulation_hook
node_app -->|"subscribes"| node_simulation_hook
node_app -->|"renders"| node_scene
node_app -->|"renders"| node_hud
node_app -->|"opens"| node_dump_log
node_scene -->|"renders"| node_terrain
node_scene -->|"renders"| node_trucks_view
node_scene -->|"renders"| node_lanes
node_scene -->|"renders"| node_reservations
node_scene -->|"renders"| node_dump_markers
node_scene -->|"renders"| node_safe_overlay
node_scene -->|"renders"| node_boundary
node_dump_log -->|"fetches records"| node_dump_service
node_browser -->|"views simulation"| node_scene
node_dump_db -->|"stores records"| node_dump_service

click node_agent_server "https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/server.py"
click node_truck_agent "https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/truck_agent.py"
click node_spot_selection "https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/spotiq.py"
click node_path_planning "https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/hybrid_a_star.py"
click node_terrain_model "https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/pilenet_model.py"
click node_dump_service "https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/server.py"
click node_dumpmap "https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/dumpmap.py"
click node_safezone "https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/safezone.py"
click node_dump_db "https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/db.py"
click node_app "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/App.jsx"
click node_simulation_hook "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/hooks/useSimulation.js"
click node_scene "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Scene3D.jsx"
click node_terrain "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Terrain.jsx"
click node_trucks_view "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Trucks.jsx"
click node_lanes "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DynamicLanes.jsx"
click node_reservations "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/ReservationZones.jsx"
click node_dump_markers "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DumpMarkers.jsx"
click node_safe_overlay "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/SafeZoneOverlay.jsx"
click node_boundary "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/PolygonBoundary.jsx"
click node_hud "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/HUD.jsx"
click node_dump_log "https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DumpLogPanel.jsx"

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_dump_service,node_dumpmap,node_safezone,node_browser toneBlue
class node_agent_server,node_truck_agent,node_spot_selection,node_path_planning,node_terrain_model toneAmber
class node_app,node_simulation_hook,node_scene,node_terrain,node_trucks_view,node_lanes,node_reservations,node_dump_markers,node_safe_overlay,node_boundary,node_hud,node_dump_log toneMint
class node_dump_db toneRose
class node_operator toneIndigo
```

## Components

### Simulation authority

- [DumpMap API](https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/server.py): `dumpmap_server/server.py`
- [Grid and height map](https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/dumpmap.py): `dumpmap_server/dumpmap.py`
- [Surface safety](https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/safezone.py): `dumpmap_server/safezone.py`

### Truck autonomy

- [Agent service](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/server.py): `truck_agent_server/server.py`
- [Truck cycle](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/truck_agent.py): `truck_agent_server/truck_agent.py`
- [SpotIQ selection](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/spotiq.py): `truck_agent_server/spotiq.py`
- [Hybrid A*](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/hybrid_a_star.py): `truck_agent_server/hybrid_a_star.py`
- [PileNet model](https://github.com/balamurali-006/dumpiq_final/blob/main/truck_agent_server/pilenet_model.py): `truck_agent_server/pilenet_model.py`

### Live dashboard

- [Dashboard app](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Live state hook](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/hooks/useSimulation.js): `frontend/src/hooks/useSimulation.js`
- [3D scene](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Scene3D.jsx): `frontend/src/components/Scene3D.jsx`
- [Terrain view](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Terrain.jsx): `frontend/src/components/Terrain.jsx`
- [Truck view](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/Trucks.jsx): `frontend/src/components/Trucks.jsx`
- [Dynamic lanes](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DynamicLanes.jsx): `frontend/src/components/DynamicLanes.jsx`
- [Reservation zones](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/ReservationZones.jsx): `frontend/src/components/ReservationZones.jsx`
- [Dump markers](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DumpMarkers.jsx): `frontend/src/components/DumpMarkers.jsx`
- [Safety overlay](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/SafeZoneOverlay.jsx): `frontend/src/components/SafeZoneOverlay.jsx`
- [Polygon boundary](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/PolygonBoundary.jsx): `frontend/src/components/PolygonBoundary.jsx`
- [Simulation HUD](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/HUD.jsx): `frontend/src/components/HUD.jsx`
- [Dump log panel](https://github.com/balamurali-006/dumpiq_final/blob/main/frontend/src/components/DumpLogPanel.jsx): `frontend/src/components/DumpLogPanel.jsx`

### Dump records

- [Dump log database](https://github.com/balamurali-006/dumpiq_final/blob/main/dumpmap_server/db.py): `dumpmap_server/db.py`

### Other components

- **Operator**
- **Browser**

## Connections

- Operator → Dashboard app: views (evidence: `README.md`)
- Agent service → Truck cycle: starts agents (evidence: `truck_agent_server/server.py`)
- Truck cycle → DumpMap API: fetches and updates (evidence: `README.md`)
- Truck cycle → SpotIQ selection: selects spots (evidence: `truck_agent_server/truck_agent.py`)
- Truck cycle → Hybrid A*: plans routes (evidence: `truck_agent_server/truck_agent.py`)
- Truck cycle → PileNet model: uses classifier (evidence: `truck_agent_server/truck_agent.py`)
- DumpMap API → Grid and height map: manages state (evidence: `dumpmap_server/server.py`)
- DumpMap API → Surface safety: checks safety (evidence: `dumpmap_server/server.py`)
- DumpMap API → Dump log database: records dumps (evidence: `dumpmap_server/server.py`)
- DumpMap API → Browser: broadcasts snapshots (evidence: `README.md`)
- Browser → Live state hook: receives updates (evidence: `frontend/src/hooks/useSimulation.js`)
- Dashboard app → Live state hook: subscribes (evidence: `frontend/src/App.jsx`)
- Dashboard app → 3D scene: renders (evidence: `frontend/src/App.jsx`)
- Dashboard app → Simulation HUD: renders (evidence: `frontend/src/App.jsx`)
- Dashboard app → Dump log panel: opens (evidence: `frontend/src/App.jsx`)
- 3D scene → Terrain view: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Truck view: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Dynamic lanes: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Reservation zones: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Dump markers: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Safety overlay: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- 3D scene → Polygon boundary: renders (evidence: `frontend/src/components/Scene3D.jsx`)
- Dump log panel → DumpMap API: fetches records (evidence: `frontend/src/components/DumpLogPanel.jsx`)
- Browser → 3D scene: views simulation (evidence: `README.md`)
- Dump log database → DumpMap API: stores records (evidence: `dumpmap_server/server.py`)
