How owntracks/recorder works
OwnTracks Recorder ingests location updates over MQTT or HTTP, processes and stores them, then exposes them through REST, WebSocket, and browser views; ocat independently reads stored records for export. The graph also includes documented reverse-geocoding, hooks, fences, and caching capabilities. Several implementation files were not excerpted, so their internal connections are omitted or shown only where the README documents the behavior.
Main entry points: recorder.c Recorder · storage.c Record files · http.c HTTP server and API · map_google.js Live map client
Components 24
Ingestion and processing
- Recorder
recorder.c - Reverse geocoding
geo.c - Geofences
fences.c - Lua hooks
hooks.c
Storage and retrieval
- Record files
storage.c - Geo cache
gcache.c
HTTP and exports
- HTTP server and API
http.c - Mongoose server
mongoose.c - ocat exports
ocat.c - Views and authentication
docroot
Browser views
- Live map client
docroot/last/map_google.js - WebSocket client
docroot/last/websock.js - Map helpers
docroot/utils/map.js - Display helpers
docroot/utils/misc.js - Browser debugging
docroot/utils/debug.js - Google map helpers
docroot/utils/map_google.js
Shared runtime
- JSON handling
json.c - Geohash encoding
geohash.c - Time zone detection
zonedetect.c - Runtime state
udata.h - String utilities
utstring.h
Other components
- OwnTracks apps
- MQTT broker
- HTTP publishers
Connections 25
- OwnTracks apps → MQTT broker: publish updates
- MQTT broker → Recorder: deliver updates
- OwnTracks apps → HTTP publishers: send updates
- HTTP publishers → Recorder: POST updates
- Recorder → Record files: store records
- Recorder → Reverse geocoding: resolve locations
- Recorder → Geo cache: use cached geodata
recorder.c - Recorder → Lua hooks: invoke hooks
- Recorder → Geofences: process fences
- HTTP server and API → Record files: read records
http.c - HTTP server and API → Mongoose server: serve requests
- HTTP server and API → Views and authentication: serve pages
- Record files → ocat exports: read records
- HTTP server and API → WebSocket client: send live updates
- WebSocket client → Live map client: deliver locations
docroot/last/map_google.js - Live map client → Map helpers: render popups
docroot/last/map_google.js - Live map client → Display helpers: format labels
docroot/last/map_google.js - Live map client → Google map helpers: manage markers
docroot/last/map_google.js - WebSocket client → Browser debugging: log messages
docroot/last/websock.js - Map helpers → Display helpers: format locations
docroot/utils/map.js - Map helpers → Browser debugging: log map setup
docroot/utils/map.js - Google map helpers → Browser debugging: log map updates
docroot/utils/map_google.js - Recorder → JSON handling: decode payloads
recorder.c - Record files → Geohash encoding: encode locations
- Record files → Time zone detection: resolve time zones