Tracksolid deployment with timescale & grafana with backup
Find a file
david kiania 5703d70aa6
Some checks failed
Static Analysis / static (push) Has been cancelled
Tests / test (push) Has been cancelled
feat(api): dedicated FastAPI read-API for map dashboards (replaces n8n)
n8n was a thin HTTP->SQL proxy for the Live Position and Fleet Trips maps and
proved fragile (credential reloads, :latest drift, shared connection limits).
This service calls the same proven reporting.* functions directly, reusing the
existing psycopg2 pool / Docker image / Coolify deploy.

Endpoints mirror the n8n webhook paths so the only frontend change is N8N_BASE:
  GET  /webhook/live-positions  -> {summary, geojson}   (fn_live_positions)
  GET  /webhook/vehicle-track   -> GeoJSON Feature       (fn_vehicle_track)
  GET  /webhook/fleet-dashboard -> filter options
  POST /webhook/fleet-dashboard -> trips payload         (fn_trips_for_map)

Response shapes replicate the n8n "Build response JSON" nodes exactly; empty
filters/sentinels ('', null, undefined) normalize to SQL wildcards. CORS limited
to the dashboard origins. Added dashboard_api service to docker-compose (port
8890, Coolify-routed). SQL contracts validated against prod.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 04:23:37 +03:00
.claude feat(dwh): bronze pipeline migrations, runbook, and execution manual 2026-04-25 01:07:53 +03:00
.forgejo/workflows feat: add db_audit health checks, runner, and scheduled Forgejo workflow 2026-04-12 21:40:29 +03:00
administration Add DB connection string to ops manual, add administration notes, remove stale deploy guide 2026-04-10 22:34:56 +03:00
backup feat(dwh): bronze pipeline migrations, runbook, and execution manual 2026-04-25 01:07:53 +03:00
data chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
db_audit feat: add db_audit health checks, runner, and scheduled Forgejo workflow 2026-04-12 21:40:29 +03:00
docs chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
dwh feat(dwh): bronze pipeline migrations, runbook, and execution manual 2026-04-25 01:07:53 +03:00
grafana fix(grafana): raise geomap maxZoom from 12 to 22 for full-resolution drill-in 2026-04-27 18:32:14 +03:00
legacy chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
migrations chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
n8n-workflows Add n8n workflow templates and change webhook port to 8888 2026-04-08 18:54:42 +03:00
tests FIX-M21: alarm cross-feed + stale-IMEI recovery for live_positions 2026-05-21 22:33:21 +03:00
.env fix: point DATABASE_URL at timescale_db container (not legacy 31.97.44.246:5888) 2026-04-18 15:43:49 +03:00
.gitignore Add webhook receiver, consolidate shared utilities, expand telemetry coverage 2026-04-08 16:31:17 +03:00
.python-version chore: align .python-version to 3.12.0 (matches Docker image and pyproject.toml) 2026-04-12 21:41:43 +03:00
55_ts_coolify_gemini_prod.code-workspace feat(dwh): bronze pipeline migrations, runbook, and execution manual 2026-04-25 01:07:53 +03:00
audit_device_reconciliation.py feat(analytics): Phase 0 — analytics-config migration and CSV importer rewrite 2026-04-27 23:42:37 +03:00
backfill_trips_enrichment.py feat(trips): add --skip-geocode flag to backfill script 2026-05-01 22:12:07 +03:00
CLAUDE.md chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
dashboard_api_rev.py feat(api): dedicated FastAPI read-API for map dashboards (replaces n8n) 2026-06-01 04:23:37 +03:00
docker-compose.yaml feat(api): dedicated FastAPI read-API for map dashboards (replaces n8n) 2026-06-01 04:23:37 +03:00
Dockerfile Fix migration failures: switch to full TimescaleDB + use psql runner 2026-04-08 17:17:58 +03:00
import_drivers_csv.py chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
ingest_events_rev.py perf+fix: SAVEPOINT-per-item pollers, batched GPS inserts, parallel detail fetch 2026-04-18 00:33:55 +03:00
ingest_movement_rev.py FIX-M21: alarm cross-feed + stale-IMEI recovery for live_positions 2026-05-21 22:33:21 +03:00
pyproject.toml ci: add ruff + mypy static analysis config and Forgejo workflow 2026-04-12 21:32:33 +03:00
README.md first commit 2026-04-07 20:41:16 +03:00
run_migrations.py chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
run_migrations.sh chore(repo): reorganize tree into migrations/ data/ legacy/ docs/ 2026-06-01 02:27:30 +03:00
sync_driver_audit.py perf+fix: SAVEPOINT-per-item pollers, batched GPS inserts, parallel detail fetch 2026-04-18 00:33:55 +03:00
ts_shared_rev.py FIX-M21: alarm cross-feed + stale-IMEI recovery for live_positions 2026-05-21 22:33:21 +03:00
webhook_receiver_rev.py FIX-M21: alarm cross-feed + stale-IMEI recovery for live_positions 2026-05-21 22:33:21 +03:00