A real-time disaster preparedness and evacuation app built with Next.js, Leaflet maps, and live government/satellite APIs.
| Screen | What it does |
|---|---|
| Escape Assistant | Find nearby shelters on the map, get walking/driving routes drawn in-app, track your live location |
| Flood Monitoring | USGS river gauge readings, flood risk indicators |
| Earthquake Info | Live USGS seismic events, safety guides, emergency contacts |
| Wildfire Risk | Active fire hotspots from NASA FIRMS satellite imagery |
| Weather Alerts | NWS forecast, storm alerts, 12-hour rain prediction |
| Shelter Finder | Search and filter open shelters by capacity and facilities |
| Safe Route Planner | Plan routes avoiding closures and hazards |
| API | Source | Status | Key needed? |
|---|---|---|---|
| Weather | NWS API | Live | No |
| Earthquakes | USGS Earthquake Catalog | Live | No |
| River gauges | USGS NWIS | Live | No |
| Routing | OSRM (OpenStreetMap) | Live | No |
| Wildfire | NASA FIRMS | Live | Yes (free) |
| Satellite flood | OpenGeoAI / NDWI (geoai-service/main.py) |
Live (mock) | Python backend on :8001 |
| Burn scar | OpenGeoAI / SAM segmentation | Live (mock) | Python backend on :8001 |
| Damage assessment | OpenGeoAI / change detection | Live (mock) | Python backend on :8001 |
| Shelters | Hardcoded demo (Eureka, CA) | Mock | No |
| GeoAI proxy | pages/api/geoai/[[...path]].js |
Live | Python backend on :8001 |
| detect/change/segment/classify | Hardcoded demo | Mock | No |
npm install
cp .env.example .env.local # add your FIRMS_API_KEY for wildfire
npm run devOpen http://localhost:3000.
See SETUP.md for detailed setup instructions.
pages/
├── index.jsx — Main app (SSG)
└── api/
├── weather.js — NWS forecast + alerts
├── earthquake.js — USGS quake feed
├── water.js — USGS river gauges
├── wildfire.js — NASA FIRMS hotspots
├── route.js — OSRM routing proxy
├── shelters.js — Mock shelter data
├── geoai/[[...path]].js — GeoAI proxy → :8001
├── health.js — Health check
├── modules.js — Module listing
├── detect.js — Mock detection
├── change.js — Mock change detection
├── segment.js — Mock segmentation
└── classify.js — Mock classification
screens/
├── EscapeAssistant.jsx — Shelter finder + in-app routing
├── EscapeMapContent.jsx — Leaflet markers/popups (client-only)
├── FloodMonitoring.jsx — USGS gauges
├── EarthquakeInfo.jsx — USGS events
├── WildfireRisk.jsx — FIRMS hotspots
├── WeatherAlerts.jsx — NWS forecasts
├── ShelterFinder.jsx — Shelter search
└── SafeRoutePlanner.jsx — Route planning
components/
├── MapFrame.jsx — Leaflet map container
├── MapFrameWrapper.jsx — Dynamic import (SSR fix)
├── Navigation.jsx — Side nav + top bar + status
├── Button.jsx — Styled button
├── ShelterCard.jsx — Shelter card UI
├── ui2.jsx — PageHeader, Panel, Badge
├── Tutorial.jsx — Walkthrough overlay
├── GlobalStyle.jsx — Global CSS
└── index.js — Barrel export
data/mockDangerZones.jsondeleteddata/mockData.jsstripped (removed hardcoded shelters, quakes, rainfall)- Fake SVG overlays (danger zones, safe routes) removed from all screens
- StatusRibbon hardcoded messages replaced
- Weather: fixed
User-Agentformat - Earthquake: switched
all_hour→all_dayfeed - Wildfire: reads
FIRMS_API_KEYfromprocess.envwith clear error - Water: removed mock fallback, proper error propagation
- Added
fetchWithTimeout(6s timeout) to prevent hangs
- Real Leaflet
Marker+Popupat actual[lat, lon](not fake SVG) - Shelter cards → pan map + open popup
- "Show route on map" → OSRM routing via
/api/route, draws GeoJSON Polyline, shows turn-by-turn directions - Locate / Watch buttons for live GPS tracking
- Real NWS weather panel
- Children render directly inside
MapContainer(supports Marker, Popup, Circle, GeoJSON) - GeoJSON routes styled via
geoStyleprop - SSR-safe via dynamic import wrapper
- Flood Monitoring — toggle "Satellite" button to overlay satellite-derived flood extent polygon from OpenGeoAI NDWI analysis
- Wildfire Risk — toggle "Burn scar" to overlay burned area polygon from SAM segmentation
- Earthquake Info — toggle "Damage" to show before/after change detection polygons with change percentage, per-change-type breakdown (construction, deforestation, flooding)