DistraAI
Geospatial risk monitoring for flood and landslide preparedness.

A disaster-intelligence dashboard that combines interactive geospatial visualisation, environmental risk monitoring, severity-based alerts, community ground reports, real-time responder communication, and a documented multi-agent ML architecture. It generates a 0–100 risk score per zone from rainfall intensity, soil saturation and slope stability, and shows the result on an interactive Leaflet map with GeoJSON risk-zone overlays coloured by severity.
Problem
Flood and landslide risk information is scattered across several sources and hard to interpret quickly. Responders and communities need one region-aware dashboard that gathers environmental indicators, raises severity-tiered alerts and supports real-time coordination, without needing deep technical expertise.
Approach
Built a Next.js 16 (App Router) dashboard with React 19 and TypeScript. Interactive mapping uses Leaflet and React Leaflet with GeoJSON overlays for flood, landslide and combined risk layers. Firebase Authentication and Cloud Firestore power a real-time responder chat with Google sign-in, persistent messages and security rules. A modular data-access layer toggles between mock and API providers to keep UI separate from data sources. The project also documents a multi-agent ML orchestrator that coordinates a GIS hazard sub-agent, a geotechnical point-risk model and an LLM-based synthesiser for scenario analysis.
What I built
- A 0 to 100 risk score per zone from rainfall intensity, soil saturation and slope stability.
- An interactive Leaflet map with GeoJSON overlays for flood, landslide and combined risk, coloured by severity.
- Severity-based alerts and community ground reports.
- Real-time responder chat on Firebase Authentication (Google sign-in) and Cloud Firestore, with persistent messages and security rules.
- A data-access layer that switches between mock and API providers.
- A documented multi-agent ML design: a GIS hazard sub-agent, a geotechnical point-risk model and an LLM-based synthesiser.
Architecture
Read the diagram as text
- Next.js dashboard to Data-access layer
- Data-access layer to Bundled fixtures (mock provider)
- Data-access layer to API routes (API provider)
- Data-access layer to Rainfall, soil saturation, slope
- Rainfall, soil saturation, slope to Risk score per zone, 0 to 100
- Risk score per zone, 0 to 100 to Leaflet map, GeoJSON overlays
- Next.js dashboard to Responder chat
- Firebase Authentication to Responder chat
- Responder chat to Cloud Firestore
How a request flows
Read the diagram as text
- Responder to Dashboard: sign in with Google
- Dashboard to Firebase Authentication: authenticate
- Firebase Authentication to Dashboard: signed-in user
- Responder to Dashboard: send a message
- Dashboard to Cloud Firestore: write the message (security rules apply)
- Cloud Firestore to Dashboard: live listener update
- Dashboard to Responder: the message appears
Decisions and trade-offs
Leaflet with GeoJSON risk overlays
Flood, landslide and combined risk show on one interactive map, coloured by severity.
State had to be managed carefully across map interactions, region switching and live Firestore listeners.
A provider seam between bundled fixtures and API routes
It keeps data concerns out of UI rendering.
An extra layer sits between the interface and its data.
Firebase Authentication and Cloud Firestore for responder chat
Real-time communication with Google sign-in, persistent messages and security rules.
Live listeners run alongside the map's own state.
What was hard
Combining map visualisation with real-time communication meant careful state management across map interactions, region switching and live Firestore listeners. A clean provider seam between bundled fixtures and API routes showed the value of keeping data concerns out of UI rendering. Documenting the multi-agent architecture clarified the difference between rule-based risk scoring and model-driven inference.
NexusAid (Web3)Next project