Skip to content
All work

DistraAI

Web

Geospatial risk monitoring for flood and landslide preparedness.

Source

DistraAI landing page: a flooded mountain track with people crossing it, and the headline The data already exists, DistraAI finds the pattern

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.

Next.js, React, TypeScript, Tailwind CSS, Leaflet, Firebase, Machine Learning

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

A provider seam feeds the risk score and the map; responder chat runs on Firebase; the multi-agent ML design is documented.
Read the diagram as text
  1. Next.js dashboard to Data-access layer
  2. Data-access layer to Bundled fixtures (mock provider)
  3. Data-access layer to API routes (API provider)
  4. Data-access layer to Rainfall, soil saturation, slope
  5. Rainfall, soil saturation, slope to Risk score per zone, 0 to 100
  6. Risk score per zone, 0 to 100 to Leaflet map, GeoJSON overlays
  7. Next.js dashboard to Responder chat
  8. Firebase Authentication to Responder chat
  9. Responder chat to Cloud Firestore

How a request flows

One chat message: sign in with Google, write to Firestore, and a live listener brings it back.
Read the diagram as text
  1. Responder to Dashboard: sign in with Google
  2. Dashboard to Firebase Authentication: authenticate
  3. Firebase Authentication to Dashboard: signed-in user
  4. Responder to Dashboard: send a message
  5. Dashboard to Cloud Firestore: write the message (security rules apply)
  6. Cloud Firestore to Dashboard: live listener update
  7. Dashboard to Responder: the message appears

Decisions and trade-offs

  • Leaflet with GeoJSON risk overlays

    WhyFlood, landslide and combined risk show on one interactive map, coloured by severity.

    CostState had to be managed carefully across map interactions, region switching and live Firestore listeners.

  • A provider seam between bundled fixtures and API routes

    WhyIt keeps data concerns out of UI rendering.

    CostAn extra layer sits between the interface and its data.

  • Firebase Authentication and Cloud Firestore for responder chat

    WhyReal-time communication with Google sign-in, persistent messages and security rules.

    CostLive 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