Select a module to open — or use the API endpoints below with Invoke-RestMethod in PowerShell.
Listens on port 5000 for raw GPS device packets (GT06 / GT02 protocol). Decodes, stores to PostgreSQL & Redis streams.
Test all API endpoints — login, vehicles, positions, trips.
Real-time vehicle positions streamed via WebSocket from Redis. Map updates instantly as GPS packets arrive.
Speeding, geofence enter/exit, after-hours (JPJ), idle detection. Draw geofences on map. Real-time toast alerts.
| 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 |