# victormbojorquez/drivetec architecture

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

- Interactive diagram: https://gitdiagram.com/victormbojorquez/drivetec
- Repository: https://github.com/victormbojorquez/drivetec
- Video tour (about a minute): https://gitdiagram.com/victormbojorquez/drivetec/video

## Overview

Drive Tec is a Django emergency-call dispatch application. Operators review an incoming call, obtain a transcription and structured incident report, locate the incident, and review suggested response units before deciding whether to dispatch. The README documents five analysis stages, report lifecycle, maps, unit management, and chained audit verification. The frontend is a single HTML file, but its internals were not sampled; those capabilities and pipeline stages are therefore represented at the documented subsystem level. Some optional integrations are documented or visible in backend excerpts; unsampled implementation details are not inferred.

Main entry points: [`drivetec/urls.py`](https://github.com/victormbojorquez/drivetec/blob/main/drivetec/urls.py) (URL routing), [`core/static/maps.js`](https://github.com/victormbojorquez/drivetec/blob/main/core/static/maps.js) (Operational map), [`core/app/index.html`](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html) (Live call), [`core/views.py`](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py) (Local Whisper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operator_ui["Operator interface"]
  node_web_ui["Command center<br/>[index.html]"]
  node_live_call["Live call<br/>[index.html]"]
  node_report_ui["Report lifecycle<br/>[index.html]"]
  node_dictionary["Token dictionary<br/>[index.html]"]
end

subgraph group_call_analysis["Call analysis"]
  node_analysis_pipeline["Analysis pipeline<br/>[index.html]"]
  node_browser_speech["Browser speech<br/>[index.html]"]
  node_whisper_api["Local Whisper<br/>[views.py]"]
  node_translation_api["Translation<br/>[views.py]"]
end

subgraph group_dispatch["Dispatch operations"]
  node_unit_map["Operational map<br/>[maps.js]"]
  node_simulated_map["Simulated map<br/>[simmap.js]"]
  node_geocoding["Geocoding<br/>[views.py]"]
  node_unit_ranking["Unit ranking<br/>[views.py]"]
end

subgraph group_backend["Django backend"]
  node_state_api["State API<br/>[views.py]"]
  node_audit_verify["Audit verification<br/>[views.py]"]
  node_url_routes["URL routing<br/>[urls.py]"]
end

subgraph group_persistence_integrations["Persistence and integrations"]
  node_domain_models[("Dispatch records<br/>[models.py]")]
  node_google_services["Google services"]
  node_faster_whisper["faster-whisper"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_web_ui
node_web_ui -->|"opens"| node_live_call
node_web_ui -->|"reviews"| node_report_ui
node_web_ui -->|"browses"| node_dictionary
node_live_call -->|"transcribes"| node_browser_speech
node_live_call -->|"uploads audio"| node_whisper_api
node_live_call -->|"submits call"| node_analysis_pipeline
node_analysis_pipeline -->|"produces report"| node_report_ui
node_live_call -.->|"requests translation"| node_translation_api
node_url_routes -->|"routes"| node_state_api
node_url_routes -->|"routes"| node_geocoding
node_url_routes -->|"routes"| node_unit_ranking
node_url_routes -->|"routes"| node_whisper_api
node_url_routes -->|"routes"| node_translation_api
node_url_routes -->|"routes"| node_audit_verify
node_state_api -->|"reads and writes"| node_domain_models
node_audit_verify -->|"reads events"| node_domain_models
node_unit_map -->|"syncs state"| node_state_api
node_unit_map -->|"requests location"| node_geocoding
node_unit_map -->|"requests ETA"| node_unit_ranking
node_unit_map -->|"requests verification"| node_audit_verify
node_unit_map -->|"renders with"| node_simulated_map
node_geocoding -->|"calls geocoding"| node_google_services
node_unit_ranking -->|"requests routes"| node_google_services
node_translation_api -->|"calls translation"| node_google_services
node_whisper_api -->|"transcribes audio"| node_faster_whisper
node_operator -->|"approves dispatch"| node_report_ui

click node_web_ui "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_live_call "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_report_ui "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_dictionary "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_analysis_pipeline "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_browser_speech "https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html"
click node_whisper_api "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_translation_api "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_unit_map "https://github.com/victormbojorquez/drivetec/blob/main/core/static/maps.js"
click node_simulated_map "https://github.com/victormbojorquez/drivetec/blob/main/core/static/simmap.js"
click node_geocoding "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_unit_ranking "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_state_api "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_audit_verify "https://github.com/victormbojorquez/drivetec/blob/main/core/views.py"
click node_url_routes "https://github.com/victormbojorquez/drivetec/blob/main/drivetec/urls.py"
click node_domain_models "https://github.com/victormbojorquez/drivetec/blob/main/core/models.py"

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_web_ui,node_live_call,node_report_ui,node_dictionary toneBlue
class node_analysis_pipeline,node_browser_speech,node_whisper_api,node_translation_api toneAmber
class node_unit_map,node_simulated_map,node_geocoding,node_unit_ranking toneMint
class node_state_api,node_audit_verify,node_url_routes toneRose
class node_domain_models,node_google_services,node_faster_whisper,node_operator toneIndigo
```

## Components

### Operator interface

- [Command center](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`
- [Live call](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`
- [Report lifecycle](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`
- [Token dictionary](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`

### Call analysis

- [Analysis pipeline](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`
- [Browser speech](https://github.com/victormbojorquez/drivetec/blob/main/core/app/index.html): `core/app/index.html`
- [Local Whisper](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`
- [Translation](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`

### Dispatch operations

- [Operational map](https://github.com/victormbojorquez/drivetec/blob/main/core/static/maps.js): `core/static/maps.js`
- [Simulated map](https://github.com/victormbojorquez/drivetec/blob/main/core/static/simmap.js): `core/static/simmap.js`
- [Geocoding](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`
- [Unit ranking](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`

### Django backend

- [State API](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`
- [Audit verification](https://github.com/victormbojorquez/drivetec/blob/main/core/views.py): `core/views.py`
- [URL routing](https://github.com/victormbojorquez/drivetec/blob/main/drivetec/urls.py): `drivetec/urls.py`

### Persistence and integrations

- [Dispatch records](https://github.com/victormbojorquez/drivetec/blob/main/core/models.py): `core/models.py`
- **Google services**
- **faster-whisper**

### Other components

- **Operator**

## Connections

- Operator → Command center: uses (evidence: `README.md`)
- Command center → Live call: opens (evidence: `README.md`)
- Command center → Report lifecycle: reviews (evidence: `README.md`)
- Command center → Token dictionary: browses (evidence: `README.md`)
- Live call → Browser speech: transcribes (evidence: `README.md`)
- Live call → Local Whisper: uploads audio (evidence: `README.md`)
- Live call → Analysis pipeline: submits call (evidence: `README.md`)
- Analysis pipeline → Report lifecycle: produces report (evidence: `README.md`)
- Live call → Translation: requests translation
- URL routing → State API: routes (evidence: `drivetec/urls.py`)
- URL routing → Geocoding: routes (evidence: `drivetec/urls.py`)
- URL routing → Unit ranking: routes (evidence: `drivetec/urls.py`)
- URL routing → Local Whisper: routes (evidence: `drivetec/urls.py`)
- URL routing → Translation: routes (evidence: `drivetec/urls.py`)
- URL routing → Audit verification: routes (evidence: `drivetec/urls.py`)
- State API → Dispatch records: reads and writes (evidence: `core/views.py`)
- Audit verification → Dispatch records: reads events (evidence: `core/views.py`)
- Operational map → State API: syncs state (evidence: `core/static/maps.js`)
- Operational map → Geocoding: requests location (evidence: `core/static/maps.js`)
- Operational map → Unit ranking: requests ETA (evidence: `core/static/maps.js`)
- Operational map → Audit verification: requests verification (evidence: `core/static/maps.js`)
- Operational map → Simulated map: renders with (evidence: `core/static/maps.js`)
- Geocoding → Google services: calls geocoding (evidence: `core/views.py`)
- Unit ranking → Google services: requests routes (evidence: `core/views.py`)
- Translation → Google services: calls translation (evidence: `core/views.py`)
- Local Whisper → faster-whisper: transcribes audio (evidence: `README.md`)
- Operator → Report lifecycle: approves dispatch (evidence: `README.md`)
