1.4 KiB
SignalMap client
A collaborative danger zone explorer built with React, Vite, and Leaflet. Crowd members can drop signals on an OpenStreetMap base layer; the UI highlights the hottest areas as a heatmap and keeps track of active contributors without any authentication.
Getting started
-
Install dependencies (Node.js 20+ recommended):
npm install -
Start the Vite dev server:
npm run devThe app assumes the API is available at
http://localhost:8000/api.php. You can override this by settingVITE_API_BASEin an.envfile. -
Start the lightweight PHP backend (from the repository root):
php -S 0.0.0.0:8000 -t server/publicThe backend stores data in
server/var/points.sqlite(ignored by git). It identifies users by IP address and provides aggregated heatmap cells plus contributor statistics.
Features
- Leaflet + OpenStreetMap map canvas with a live heat layer (via
leaflet.heat). - Click-to-report interaction that drops a signal at the clicked coordinates.
- Heatmap aggregation and "danger zone" overlays that spotlight the busiest cells.
- Live contributor feed showing the most recent pings and top spotters.
- Accessible, shadcn-inspired UI components without any authentication requirement.
Production build
npm run build
The output will be placed in dist/. Serve it with your favourite static host while keeping the PHP API reachable at /api.php.