Case studies — OPEN SOURCE · PUBLIC SAFETY

Nearest bomb shelter in under 3 seconds.

GPS-powered PWA for Israel. PostGIS K-NN spatial queries. Walking and biking ETAs in real time.

ShelterNow is a Progressive Web App built for one purpose: locate the user and route them to the nearest bomb shelter before the siren ends. PostGIS K-nearest-neighbor queries across a 10,000+ shelter database return results in milliseconds, then real routing data computes walking, biking, and running ETAs to the shelter door.

Speed is the feature.

GPS + Instant Routing Open. Route. Go.

Browser GPS fires on load. No search, no form, the app immediately queries for the five nearest shelters and draws the fastest route to your screen.

Spatial Database PostGIS K-NN on Supabase

10,000+ shelter locations indexed with PostGIS. K-nearest-neighbor queries using the <-> distance operator return the closest 5 shelters in milliseconds, not seconds.

Real-Time Routing Walking · Biking · Running ETAs

Actual road routing via Mapbox Directions, not straight-line guesses. ETAs recalculate as the user moves. The animated route overlay updates in real time.

Offline-Ready PWA Installable. Works without signal.

PWA manifest + service worker caches map tiles and shelter data on first load. Install to the home screen and it works even when the network is degraded.

From tap to shelter in three steps.

STEP 01 LOCATE

Browser Geolocation API fires on page load. Coordinates are sent immediately, no typing, no waiting.

STEP 02 QUERY

PostGIS K-NN query finds the 5 nearest shelters from 10,000+ indexed locations. Sub-50ms. Results include address, capacity, and shelter type.

STEP 03 ROUTE

Mapbox Directions returns the exact walking path. React-Leaflet renders the animated route. ETAs update as the user moves.

What it runs on.

App framework Next.js (PWA)

Map + route overlay React-Leaflet

Shelter database Supabase PostGIS

Routing + ETAs Mapbox Directions

Offline caching Service Worker

On the bench.

  • Next.js (PWA)
  • React-Leaflet
  • Supabase PostGIS
  • Mapbox Directions
  • Service Worker