How zaneham/callout works
Callout is a self-hosted, offline-capable computer-aided dispatch system. Dispatchers and field personnel use role-specific client views to manage incidents and units; server requests cross a C/OCaml bridge into the dispatch logic, while event history is persisted for replay and clients synchronize over WebSockets. The graph preserves incident, authority/sync, mapping, and administration capabilities documented by the README and tree. Several client and domain implementations were not sampled, so their detailed call wiring is intentionally limited.
Main entry points: app.ml Client app · engine.ml Dispatch engine · main.c Server event loop · http.c HTTP API
Components 26
Dispatch client
- Client app
src/client/app.ml - Login view
src/client/login_view.ml - Incident view
src/client/incident_view.ml - Dispatch view
src/client/dispatch_view.ml - Map view
src/client/map_view.ml - Admin view
src/client/admin_view.ml - SOP view
src/client/sop_view.ml - Offline queue
src/client/offline.ml
Server and persistence
- Server event loop
src/server/main.c - HTTP API
src/server/http.c - WebSocket transport
src/server/ws.c - C–OCaml bridge
src/server/bridge.c - SQLite event store
src/server/db.c - Database schema
db/schema.sql
Dispatch domain
- OCaml callbacks
src/bridge_ffi/bridge_ffi.ml - Dispatch engine
src/engine/engine.ml - Incident lifecycle
src/core/incident.ml - Dispatch and assignment
src/core/dispatch.ml - Unit state
src/core/unit.ml - Authentication and rank
src/core/auth.ml - Authority-ranked sync
src/core/sync.ml - Geospatial logic
src/core/geo.ml
Shared formats
- JSON codec
src/codec/codec.ml - Client/server protocol
src/shared/protocol.ml - Shared types
src/shared/types.ml
Other components
- Dispatch personnel
Connections 30
- Dispatch personnel → Client app: uses
- Client app → Login view: shows
- Client app → Incident view: shows
- Client app → Dispatch view: shows
- Client app → Map view: shows
- Client app → Admin view: shows
- Client app → SOP view: shows
- Client app → Offline queue: uses offline queue
- Client app → HTTP API: sends HTTP requests
- Client app → WebSocket transport: syncs events
- Server event loop → SQLite event store: opens and replays
- Server event loop → C–OCaml bridge: initializes and loads events
- Server event loop → HTTP API: initializes
- Server event loop → WebSocket transport: initializes
- HTTP API → SQLite event store: reads and writes
- HTTP API → C–OCaml bridge: dispatch callbacks
- WebSocket transport → C–OCaml bridge: forwards messages
- C–OCaml bridge → OCaml callbacks: invokes callbacks
- OCaml callbacks → Dispatch engine: handles dispatch commands
- Dispatch engine → Incident lifecycle: evaluates transitions
- Dispatch engine → Dispatch and assignment: evaluates assignments
- Dispatch engine → Unit state: uses unit state
- Dispatch engine → Authentication and rank: checks authority
- Dispatch engine → Authority-ranked sync: applies event priority
- Dispatch engine → Geospatial logic: uses location logic
- OCaml callbacks → JSON codec: encodes and decodes
- Database schema → SQLite event store: defines tables
- Client app → Client/server protocol: uses message format
- WebSocket transport → Client/server protocol: exchanges messages
- Dispatch engine → Shared types: uses domain types