SuperbTrack GPS Platform

Select a module to open — or use the API endpoints below with Invoke-RestMethod in PowerShell.

MODULE 1

📡 TCP GPS Ingestion Server

Listens on port 5000 for raw GPS device packets (GT06 / GT02 protocol). Decodes, stores to PostgreSQL & Redis streams.

cmd/ingest/main.go — no web UI
MODULE 2

🔌 REST API Explorer

Test all API endpoints — login, vehicles, positions, trips.

api-test.html
MODULE 3

📶 WebSocket Live Tracking

Real-time vehicle positions streamed via WebSocket from Redis. Map updates instantly as GPS packets arrive.

dashboard.html → /api/ws
MODULE 4

🗺️ Alert Engine & Geofences

Speeding, geofence enter/exit, after-hours (JPJ), idle detection. Draw geofences on map. Real-time toast alerts.

dashboard.html → /api/alerts

REST API Endpoints

Method Endpoint Description
POST /api/auth/login Get JWT token
GET /api/auth/me Current user info
GET /api/vehicles List all vehicles + live position
GET /api/vehicles/{id}/positions GPS history (?from=&to=)
GET /api/vehicles/{id}/trips Trip list
GET /health Server health check
WS /api/ws?token=JWT WebSocket live stream
GET /api/alerts List alerts (filter: vehicle_id, type, severity, unacked)
GET /api/alerts/unacked-count Unacknowledged alert badge count
PUT /api/alerts/{id}/acknowledge Acknowledge a single alert
PUT /api/alerts/acknowledge-all Acknowledge all unread alerts
GET /api/alert-rules List alert rules
POST /api/alert-rules Create alert rule (speeding, geofence, idle, after_hours)
DEL /api/alert-rules/{id} Delete (soft) alert rule
GET /api/geofences List geofences
POST /api/geofences Create geofence (polygon JSONB)
DEL /api/geofences/{id} Delete (soft) geofence