Files
points-of-interest/client
2025-10-12 13:47:44 +02:00
..
2025-10-10 00:19:50 +02:00
2025-10-12 13:47:44 +02:00
2025-10-10 00:19:50 +02:00
2025-10-12 03:29:23 +02:00
2025-10-12 03:29:23 +02:00
2025-10-12 03:29:23 +02:00
2025-10-12 03:29:23 +02:00
2025-10-12 03:29:23 +02:00
2025-10-12 03:29:23 +02:00
2025-10-10 00:19:50 +02:00
2025-10-12 03:29:23 +02:00

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

  1. Install dependencies (Node.js 20+ recommended):

    npm install
    
  2. Start the Vite dev server:

    npm run dev
    

    The app assumes the API is available at http://localhost:8000/api.php. You can override this by setting VITE_API_BASE in an .env file.

  3. Start the lightweight PHP backend (from the repository root):

    php -S 0.0.0.0:8000 -t server/public
    

    The 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.