MotorSignal-App/server/waze_relay
Developer 3ca69f9be4 fix: activate and validate real motorcycle routing 2026-09-06 12:24:45 -04:00
..
middleware fix: activate and validate real motorcycle routing 2026-09-06 12:24:45 -04:00
routes fix: activate and validate real motorcycle routing 2026-09-06 12:24:45 -04:00
test feat: add real motorcycle routing provider foundation 2026-09-05 17:33:58 -04:00
Dockerfile feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00
README.md feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00
docker-compose.yml feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00
inspect_network.js feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00
inspect_route.js feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00
package-lock.json feat: add real motorcycle routing provider foundation 2026-09-05 17:33:58 -04:00
package.json feat: add real motorcycle routing provider foundation 2026-09-05 17:33:58 -04:00
server.js feat: add real motorcycle routing provider foundation 2026-09-05 17:33:58 -04:00
test_browser.js feat: Evolution UI theme, zero-lag 20Hz speedometer, interactive route preview, and Waze alert relay server 2026-08-28 03:23:23 -04:00

README.md

🚔 MotorSignal Waze Alert Relay Server

A high-performance, lightweight headless relay backend that queries Waze Live Map feeds and provides normalized Police Speed Traps, Speed Cameras, Red-Light Cameras, and Road Hazard Alerts directly to the MotorSignal Motorcycle Cockpit application.


🚀 Quick Start

Method 1: Run with Node.js (Local or VPS)

ash cd server/waze_relay npm install npm start The server will start on http://0.0.0.0:3000.

Method 2: Run with Docker / Docker Compose

ash cd server/waze_relay docker compose up -d


📱 Connecting to MotorSignal

  1. Open MotorSignal on your phone.
  2. Go to Settings → Community Traffic Provider.
  3. Under Custom Endpoint URL, enter your relay server URL: http://<YOUR_SERVER_IP>:3000/alerts (e.g., http://192.168.1.69:3000/alerts for local Wi-Fi, or https://your-domain.com/alerts for remote VPS).
  4. Tap TEST CONNECTION. You will see the green CONNECTED badge!

📡 REST API Endpoints

1. Health Check

  • GET /health or GET /
  • Response: json { "status": "ok", "service": "MotorSignal Waze Community Relay", "version": "1.0.0" }

2. Live Alerts Feed

  • GET /alerts?lat=37.7749&lng=-122.4194&radius=5000
  • Query Parameters:
    • lat: Latitude of vehicle
    • lng: Longitude of vehicle

adius: Search radius in meters (Default: 5000m)

  • Response: json { "provider": "waze_relay", "count": 2, "alerts": [ { "id": "wz_37.77490_-122.41940", "type": "POLICE", "category": "police", "latitude": 37.7749, "longitude": -122.4194, "roadName": "Market St", "description": "Hidden police speed trap reported on Market St", "severity": "high", "confidence": 0.9 } ] }

⚡ Features

  • Police Trap Detection: Parses POLICE_HIDDEN and POLICE_VISIBLE radar traps.
  • Camera Enforcement: Speed cameras and red-light enforcement cameras.
  • In-Memory Geo-Grid Caching: 30-second TTL prevents rate limiting and ensures sub-10ms response times for the motorcycle HUD.