Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RESQNET AI ๐ŸŒŠ๐Ÿšจ

AI-Powered Multi-Source Ocean & Coastal Disaster Intelligence, Verification, Risk Assessment, and Last-Mile Action Platform

Python FastAPI React TypeScript Vite Tailwind CSS Pytest License: MIT

๐ŸŒ Interactive Live Architecture Diagram โ€ข ๐Ÿ™ GitHub Repository โ€ข ๐Ÿš€ Render Ready

"From scattered signals to trusted decisions."


๐Ÿ‡ฎ๐Ÿ‡ณ Smart India Hackathon (SIH) Problem Specification

  • Problem Statement ID: SIH25039
  • Title: Integrated Platform for Crowdsourced Ocean Hazard Reporting and Social Media Analytics
  • Nodal Ministry / Organization: Ministry of Earth Sciences (MoES)
  • Category: Software | Theme: Disaster Management

1. Executive Summary & Problem Context

India features a 7,516 km coastline inhabited by over 250 million citizens, major commercial ports, and vulnerable coastal fishing villages. During tropical cyclones, extreme swell surges (Kallakkadal), and tsunami threats across the Bay of Bengal and Arabian Sea, emergency managers face three severe systemic challenges:

  1. Fragmented Data Silos: MoES/IMD weather bulletins, INCOIS ocean wave buoys, ISRO MOSDAC INSAT-3DR satellite imagery, and citizen eyewitnesses operate in isolated silos.
  2. Noise and Rumor Bottlenecks: Social media chatter contains massive misinformation, lack actionable GPS coordinates, and flood authorities with unverified reports.
  3. Black-Box AI Decision Traps: Opaque machine learning algorithms deliver raw numbers without explaining why an evacuation is mandatory, which roads are impassable, or which shelters are safe.

RESQNET AI solves this through an end-to-end, explainable, and multi-source intelligence engine built on an 8-Stage Operational Disaster Lifecycle:

$$\text{SENSE} \longrightarrow \text{EXTRACT} \longrightarrow \text{VERIFY} \longrightarrow \text{PREDICT} \longrightarrow \text{SIMULATE} \longrightarrow \text{DECIDE} \longrightarrow \text{ACT} \longrightarrow \text{LEARN}$$

Every decision is corroborated by independent physical evidence, bounded by epistemic humility (max 98% confidence), decomposed through TreeSHAP explainability, and translated into A* hazard-avoiding evacuation routes and zero-cost Cell Broadcast (CBS) alerts.


2. System Architecture

๐ŸŒ Interactive Architecture Visualizer

Explore the live, interactive vector nodes, zoomable tiers, and operational data flows at:
๐Ÿ‘‰ https://resqnetai-arch.netlify.app/

flowchart TB
    %% Styling Classes
    classDef clientTier fill:#0b192e,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
    classDef gatewayTier fill:#0f172a,stroke:#818cf8,stroke-width:2px,color:#f8fafc;
    classDef coreTier fill:#022c22,stroke:#34d399,stroke-width:2px,color:#f8fafc;
    classDef mlTier fill:#1e1b4b,stroke:#a855f7,stroke-width:2px,color:#f8fafc;
    classDef dataTier fill:#1e293b,stroke:#06b6d4,stroke-width:2px,color:#f8fafc;
    classDef dispatchTier fill:#2e1065,stroke:#f43f5e,stroke-width:2px,color:#f8fafc;

    %% Subgraphs
    subgraph S1 ["1. Client Edge & Operational Consoles"]
        HUD["๐Ÿ–ฅ๏ธ Tactical Command HUD<br/><i>React 18 / Liquid Glass UI / 6-KPI Bar</i>"]:::clientTier
        GIS["๐Ÿ—บ๏ธ Fullscreen GIS Live Map<br/><i>Leaflet / Isolated Stacking / GPS Panning</i>"]:::clientTier
        PWA["๐Ÿ“ฑ Citizen SOS & Field PWA<br/><i>Offline-First / Service Worker / GPS Triage</i>"]:::clientTier
        SATMODAL["๐Ÿ›ฐ๏ธ INSAT-3D Live Viewer<br/><i>Real-time Satellite Feed (No API Key)</i>"]:::clientTier
    end

    subgraph S2 ["2. Security & API Gateway Layer"]
        AUTH["๐Ÿ”’ Role-Based Access Control (RBAC)<br/><i>JWT Scopes: Authority, Citizen, Responder, Analyst</i>"]:::gatewayTier
        API["โšก FastAPI Async Core Gateway<br/><i>REST API / Static Distribution :8000</i>"]:::gatewayTier
        WS["๐Ÿ“ก WebSocket Real-time Feed<br/><i>WSS /ws/live-feed Telemetry Gateway</i>"]:::gatewayTier
    end

    subgraph S3 ["3. ResQNet AI Analytical Subsystems"]
        NLP["๐Ÿง  Multilingual NLP Distress Parser<br/><i>English, Hindi, Hinglish Extraction & Urgency</i>"]:::mlTier
        VISION["๐Ÿ‘๏ธ Vision Damage Inspector<br/><i>Water Intrusion, Breaches & Infrastructure Triage</i>"]:::mlTier
        FUSION["๐ŸŽฏ Bayesian Multi-Source Evidence Fusion<br/><i>Cross-Corroboration Matrix & Contradiction Penalty</i>"]:::mlTier
        XAI["๐Ÿ“Š Explainable AI Engine (TreeSHAP)<br/><i>Physical Factor Attribution & Plain Summaries</i>"]:::mlTier
        ROUTER["๐Ÿงญ A* Safer Evacuation Pathfinder<br/><i>Hazard Perimeter Avoidance & Shelter Routing</i>"]:::mlTier
    end

    subgraph S4 ["4. Multi-Source Ingestion & Physical Telemetry"]
        IMD["๐Ÿ“ก IMD Coastal Observatories<br/><i>Coastal Bulletins, 7-Day Forecasts, Port Signals</i>"]:::dataTier
        INCOIS["๐ŸŒŠ INCOIS Ocean Buoys & QuikSCAT<br/><i>Wave Buoy BOB-04 & Wind Stress Curl Grid</i>"]:::dataTier
        MOSDAC["๐Ÿ›ฐ๏ธ ISRO MOSDAC & INSAT-3DR<br/><i>Quantitative Precipitation (QPE)</i>"]:::dataTier
        SAR["๐Ÿ›ฐ๏ธ Copernicus Sentinel-1 SAR<br/><i>Radar Inundation Water Surface Masks</i>"]:::dataTier
        OSM["๐Ÿ—บ๏ธ OpenStreetMap & GEBCO<br/><i>Road Network Topology & Coastal Elevation</i>"]:::dataTier
        CITIZEN["๐Ÿ‘ฅ Crowdsourced Citizen Reports<br/><i>Geotagged Photos & Field Incident Feed</i>"]:::dataTier
        SOCIAL["๐ŸŒ Social Streams & GDELT<br/><i>Early Warning Hazard Keywords & News</i>"]:::dataTier
    end

    subgraph S5 ["5. State Persistence & Last-Mile Dispatch"]
        STORE[("๐Ÿ—„๏ธ In-Memory / SQLite Geo-Store<br/><i>Spatial Indexing / PostGIS-Ready Schemas</i>")]:::coreTier
        CBS["๐Ÿ“ข Cell Broadcast (CBS) Relay<br/><i>Zero-Cost Public Disaster SMS & Relays</i>"]:::dispatchTier
    end

    %% Ingestion to Gateway & Core
    IMD --> API
    INCOIS --> API
    MOSDAC --> API
    SAR --> API
    OSM --> API
    CITIZEN --> API
    SOCIAL --> API

    %% Client Interactions
    HUD <-->|"WSS /ws/live-feed"| WS
    GIS <-->|"GeoJSON Hazards & Layers"| API
    PWA <-->|"HTTPS SOS & Reports"| API
    SATMODAL <-->|"INSAT-3D Frame Cache"| API

    %% Internal Processing Flow
    API -. "Validate Scope" .-> AUTH
    API --> STORE
    API --> NLP
    API --> VISION
    API --> FUSION
    
    NLP -->|"Distress Evidence"| FUSION
    VISION -->|"Visual Evidence"| FUSION
    STORE -->|"Sensor Readings"| FUSION
    
    FUSION -->|"Consensus Risk Score"| XAI
    XAI -->|"Risk Surface & Penalties"| ROUTER
    STORE -->|"Road Graphs & Shelters"| ROUTER

    ROUTER -->|"Evacuation Path"| PWA
    ROUTER -->|"Evacuation Corridor"| CBS
    ROUTER -->|"Tactical Route Overlay"| GIS
    CBS -. "Public Alert Warning" .-> PWA
Loading

3. The 8-Stage Disaster Response Pipeline

  [1. SENSE]       Continuous telemetry ingestion across 7 physical & social channels.
      โ”‚
  [2. EXTRACT]     Multilingual NLP parses Hindi, Hinglish, & English reports for victim counts & urgency.
      โ”‚
  [3. VERIFY]      Vision model verifies floodwaters; Bayesian cross-corroboration validates ground truth.
      โ”‚
  [4. PREDICT]     Ensemble risk model forecasts inundation depth, storm surge anomaly, and wind stress curl.
      โ”‚
  [5. SIMULATE]    Parametric stress-testing evaluates surge escalation (+0.5m to +3.5m) in real-time.
      โ”‚
  [6. DECIDE]      TreeSHAP identifies primary hazard drivers (wave surge vs rain vs tide) with 0-98% confidence.
      โ”‚
  [7. ACT]         A* pathfinder charts safer inland corridors to cyclone shelters; triggers zero-cost CBS SMS.
      โ”‚
  [8. LEARN]       Post-incident metrics record verification accuracy, response latency, and model feedback.

4. Key Subsystems & Technical Innovations

1. Bayesian Multi-Source Evidence Fusion

  • Methodology: Weights independent evidence streams by sensor reliability coefficients: $$\text{Official IMD/INCOIS (0.95)} &gt; \text{Ocean Buoy (0.90)} &gt; \text{Satellite SAR (0.85)} &gt; \text{Citizen Report (0.65)} &gt; \text{News/GDELT (0.60)} &gt; \text{Social Media (0.45)}$$
  • Contradiction Penalty: Automatically dampens overall risk confidence if coastal buoys and inland sensors register opposing trends.
  • Epistemic Humility: Confidence is rigorously capped at 98% to acknowledge physical sensor uncertainty during extreme meteorological events.

2. Transparent Explainable AI (TreeSHAP)

  • Decomposes every composite risk score into exact physical contributing factors:
    • Wave Surge Height: $+32%$
    • Sustained Wind Velocity: $+24%$
    • Low Coastal Elevation: $+20%$
    • Precipitation Influx: $+16%$
    • Ground Citizen Eyewitnesses: $+8%$
  • Generates plain-language operational summaries customized for Incident Commanders, Field Responders, and Civilians.

3. Hazard-Avoiding $A^*$ Safer Route Pathfinder

  • Dynamic graph pathfinding engine ingesting active flood polygons, submerged coastal highways, and real-time shelter bed counts.
  • Dynamically routes civilians around blocked coastal arteries (e.g. Puri Marine Drive) toward the nearest designated cyclone shelter with verified capacity.
  • Generates one-click copyable SMS / WhatsApp text directions for zero-connectivity field dispatch.

4. Multilingual NLP Distress Parser

  • Extracts disaster types, casualty counts, urgency ratings (1-5), and local landmarks.
  • Supports native English, Hindi (Devanagari: เคชเคพเคจเฅ€ เคญเคฐ เค—เคฏเคพ, เคฎเคฆเคฆ เคšเคพเคนเคฟเค), and Hinglish (pani road pe aa gaya hai).

5. Computer Vision Damage Inspector

  • Classifies user-uploaded photos and satellite backscatter into structural damage levels (MINOR, MODERATE, SEVERE, CRITICAL).
  • Instant client-side preview on report submission with automatic object and water intrusion detection.

6. Liquid Glass Tactical Command Console

  • Built with React 18, Vite, and Tailwind CSS using an Aqua/Oceanic Liquid Glass design system.
  • High-contrast night-vision UI tailored for Emergency Operations Centers (EOC).
  • Real-time 6-KPI operations bar tracking Active Hazards, Critical Warnings, Available Shelter Beds, Exposed Population, Verification Latency (1.4s), and Consensus Confidence.

5. Comprehensive Directory Structure

ResQnet AI/
โ”œโ”€โ”€ backend/                        # FastAPI REST API & WebSocket Engine
โ”‚   โ”œโ”€โ”€ __init__.py                 # Backend core package
โ”‚   โ”œโ”€โ”€ app.py                      # Application factory, CORS, SPA fallback & WSS gateway
โ”‚   โ”œโ”€โ”€ config.py                   # Pydantic v2 Settings, environment configuration
โ”‚   โ”œโ”€โ”€ database/                   # Data layer & schema models
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py             # Database package init
โ”‚   โ”‚   โ”œโ”€โ”€ schemas.py              # Pydantic request/response schemas & Enums
โ”‚   โ”‚   โ””โ”€โ”€ store.py                # In-memory Geo-Spatial DataStore & seed loader
โ”‚   โ””โ”€โ”€ routers/                    # Modular API route controllers
โ”‚       โ”œโ”€โ”€ __init__.py             # Router package exports
โ”‚       โ”œโ”€โ”€ alerts.py               # Official IMD vs AI vs Crowdsourced alert feeds
โ”‚       โ”œโ”€โ”€ auth.py                 # JWT Authentication & role demo credentials
โ”‚       โ”œโ”€โ”€ evidence.py             # Bayesian multi-source evidence fusion API
โ”‚       โ”œโ”€โ”€ hazards.py              # Active hazard polygons & INCOIS wind stress
โ”‚       โ”œโ”€โ”€ reports.py              # Crowdsourced report ingest & verification
โ”‚       โ”œโ”€โ”€ risk.py                 # SHAP XAI risk assessment & role action engine
โ”‚       โ”œโ”€โ”€ routes.py               # A* hazard-avoidance safer route generation
โ”‚       โ”œโ”€โ”€ shelters.py             # Shelter inventory, capacity, and coordinates
โ”‚       โ”œโ”€โ”€ simulation.py           # Parametric scenario simulator & pipeline
โ”‚       โ””โ”€โ”€ system.py               # Health probes, KPI analytics & CBS alerts
โ”œโ”€โ”€ data/                           # Validated oceanographic datasets
โ”‚   โ”œโ”€โ”€ pilot_puri.json             # Comprehensive pilot baseline for Puri Coastal Zone
โ”‚   โ”œโ”€โ”€ incois_coastal_stations_clean.json # Cleaned INCOIS coastal station index
โ”‚   โ”œโ”€โ”€ incois_coastal_winds_clean.csv     # INCOIS surface wind time-series
โ”‚   โ”œโ”€โ”€ incois_ocean_wind_grid.json        # 200+ spatial wind vectors across Indian waters
โ”‚   โ””โ”€โ”€ incois_quickscat_daily_*.nc        # Raw NetCDF QuikSCAT scatterometer dataset
โ”œโ”€โ”€ docker/
โ”‚   โ””โ”€โ”€ Dockerfile.backend          # Production container build specification
โ”œโ”€โ”€ docs/                           # Technical documentation & guides
โ”‚   โ”œโ”€โ”€ CODEBASE_DOCUMENTATION.md   # Complete codebase reference guide
โ”‚   โ”œโ”€โ”€ WINDOWS_SETUP_GUIDE.md      # Windows setup, execution & troubleshooting
โ”‚   โ””โ”€โ”€ diagrams/
โ”‚       โ”œโ”€โ”€ index.html              # Standalone interactive vector diagram (Netlify)
โ”‚       โ””โ”€โ”€ candidate.json          # Node/edge vector graph coordinates
โ”œโ”€โ”€ frontend/                       # React 18 + TypeScript + Vite Web Application
โ”‚   โ”œโ”€โ”€ public/                     # PWA manifest, service worker (sw.js), icons
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ App.tsx                 # Root application layout, offline watcher & routes
โ”‚   โ”‚   โ”œโ”€โ”€ main.tsx                # React DOM entrypoint
โ”‚   โ”‚   โ”œโ”€โ”€ index.css               # Aqua Liquid-Glass design system & Tailwind
โ”‚   โ”‚   โ”œโ”€โ”€ components/             # Reusable UI component modules
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ common/             # Badges, Skeletons, Role guidance banner
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ evidence/           # EvidencePanel (Bayesian matrix table)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hero/               # HeroGlobeVisual (interactive 3D globe)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ layout/             # Navbar, Footer, AuroraBackground
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ map/                # DisasterMap (Leaflet), MapLayers, MapLegend
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ocean/              # OceanCard, WindStressCard (INCOIS QuikSCAT)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ reports/            # CitizenReportForm (AI pre-check), ReportCard
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ risk/               # RiskCard, XAIPanel, RiskBreakdown, AnalyticsChart
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ routes/             # SaferRouteCard (A* pathfinding UI)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ search/             # LocationSearch, SearchModal (20+ Indian ports)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ simulation/         # ScenarioSimulator (sliders), PipelineModal
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ weather/            # WeatherCard, CityForecastCard, SatelliteModal
โ”‚   โ”‚   โ”œโ”€โ”€ pages/                  # Top-level view controllers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LandingPage.tsx     # Hero showcase & executive overview
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LocationIntelligencePage.tsx # Deep-dive for 20+ coastal ports
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ LiveMapPage.tsx     # Fullscreen tactical GIS command map
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CommandCenterPage.tsx # Authority/NDRF 6-KPI operations console
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CitizenReportingPage.tsx # Crowdsourced report feed & submission
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ SimulationPage.tsx  # Parametric crisis stress-testing studio
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AlertsPage.tsx      # Unified Official vs AI vs Citizen alerts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ NotFoundPage.tsx    # 404 handler
โ”‚   โ”‚   โ”œโ”€โ”€ services/               # Typed API client services
โ”‚   โ”‚   โ””โ”€โ”€ types/                  # TypeScript interfaces (disaster, imd, risk, route)
โ”‚   โ”œโ”€โ”€ package.json                # Frontend dependencies & build scripts
โ”‚   โ”œโ”€โ”€ tailwind.config.js          # Custom Liquid Glass theme, glow shadows & hues
โ”‚   โ””โ”€โ”€ vite.config.ts              # Proxy rules, vendor chunking & build settings
โ”œโ”€โ”€ ingestion/                      # Multi-source data providers & connectors
โ”‚   โ”œโ”€โ”€ base.py                     # Abstract BaseProvider with fetch/normalize/health
โ”‚   โ””โ”€โ”€ providers/                  # Specialized agency adapters
โ”‚       โ”œโ”€โ”€ copernicus.py           # Sentinel-1 SAR water inundation provider
โ”‚       โ”œโ”€โ”€ gdelt.py                # Global news intelligence provider
โ”‚       โ”œโ”€โ”€ imd.py                  # IMD Coastal Bulletin & 7-Day City Forecast
โ”‚       โ”œโ”€โ”€ incois.py               # INCOIS Buoy (BOB-04) & ocean state provider
โ”‚       โ”œโ”€โ”€ incois_wind.py          # INCOIS QuikSCAT Scatterometer surface wind provider
โ”‚       โ”œโ”€โ”€ mosdac.py               # ISRO MOSDAC INSAT-3DR QPE satellite provider
โ”‚       โ”œโ”€โ”€ osm.py                  # OpenStreetMap road topology & GEBCO elevation
โ”‚       โ””โ”€โ”€ social.py               # Public social media hazard signal provider
โ”œโ”€โ”€ ml/                             # Machine Learning & Analytical Subsystems
โ”‚   โ”œโ”€โ”€ evaluation/metrics.py       # Precision, Recall, F1, and MAE benchmarks
โ”‚   โ”œโ”€โ”€ explainability/xai_engine.py# TreeSHAP feature attribution & local rationale
โ”‚   โ”œโ”€โ”€ fusion/evidence_fusion.py   # Multi-source Bayesian consensus matrix
โ”‚   โ”œโ”€โ”€ nlp/multilingual_parser.py  # Regex & transformer zero-shot distress parser
โ”‚   โ”œโ”€โ”€ risk/risk_model.py          # Interpretable physical-bounds risk ensemble
โ”‚   โ”œโ”€โ”€ routing/safe_route_engine.py# Dynamic A* hazard-avoidance pathfinder
โ”‚   โ””โ”€โ”€ vision/damage_inspector.py  # Computer vision photo damage triage
โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ clean_incois_dataset.py     # Parser for raw INCOIS NetCDF ocean wind data
โ”œโ”€โ”€ tests/                          # Automated test suite (pytest)
โ”‚   โ”œโ”€โ”€ test_api.py                 # FastAPI route & schema validation tests
โ”‚   โ”œโ”€โ”€ test_fusion.py              # Evidence fusion math & contradiction tests
โ”‚   โ”œโ”€โ”€ test_nlp.py                 # Multilingual NLP accuracy & entity tests
โ”‚   โ””โ”€โ”€ test_routing.py             # A* hazard perimeter avoidance tests
โ”œโ”€โ”€ .env.example                    # Template environment variables
โ”œโ”€โ”€ .gitignore                      # Git exclusion rules
โ”œโ”€โ”€ docker-compose.yml              # Multi-container orchestration definition
โ”œโ”€โ”€ render.yaml                     # 1-Click Render Cloud deployment blueprint
โ”œโ”€โ”€ requirements.txt                # Python backend dependencies
โ””โ”€โ”€ run.py                          # Unified single-command launcher script

6. Getting Started (Installation & Execution)

Prerequisites

  • Python: Version 3.10, 3.11, or 3.12 installed.
  • Node.js: Version 18+ and npm installed.
  • Git: Installed.

Step 1: Clone the Repository

git clone https://github.com/codeCraft-Ritik/ResQnet-AI.git
cd ResQnet-AI

Step 2: Set Up Backend (Python)

# Windows (PowerShell)
python -m venv venv
.\venv\Scripts\Activate.ps1

# Linux / macOS
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Copy environment configuration
cp .env.example .env

Step 3: Set Up Frontend (React + Vite)

cd frontend
npm install
npm run build
cd ..

(Building compiles the frontend into frontend/dist. The FastAPI server serves the web application and API on a single unified port).


Step 4: Run the Platform (Single Command)

python run.py

The system will start and provide instant access:


7. Frontend Development Mode (Hot-Reloading)

To develop with instant Vite hot-module replacement (HMR):

  1. Terminal 1 (Backend):
    python run.py
  2. Terminal 2 (Frontend Dev Server):
    cd frontend
    npm run dev
  3. Open http://localhost:5173/. Vite is pre-configured to proxy all /api/* and /ws/* calls to FastAPI on 127.0.0.1:8000.

8. 1-Click Cloud Deployment to Render

The repository includes a ready-to-deploy render.yaml specification:

  1. Push your repository to GitHub.
  2. In Render Dashboard, click New + โž” Blueprint (or Web Service).
  3. Select your repository.
  4. Render will configure everything automatically:
    • Environment: Python
    • Build Command: pip install -r requirements.txt && cd frontend && npm install && npm run build && cd ..
    • Start Command: python run.py
    • Health Check Path: /api/health

9. Major API Endpoints

Category Method Endpoint Description
System GET /api/health Root health check and operational mode status.
System GET /api/v1/system/health Live availability check for all 7 ingestion providers.
System GET /api/v1/system/analytics District-level operational KPI summary.
System POST /api/v1/system/dispatch-alert Zero-cost Cell Broadcast (CBS) emergency alert trigger.
Hazards GET /api/v1/hazards Active hazard polygons (supports ?location= filtering).
Hazards GET /api/v1/hazards/incois/wind-stress INCOIS QuikSCAT scatterometer wind stress & curl.
Hazards GET /api/v1/hazards/imd/coastal-bulletin Official IMD coastal bulletin text and warnings.
Hazards GET /api/v1/hazards/imd/city-forecast Official IMD 7-day city weather forecast.
Reports GET /api/v1/reports List crowdsourced citizen reports with status filters.
Reports POST /api/v1/reports Submit a citizen report with automatic AI verification.
Reports POST /api/v1/reports/analyze-preview Real-time multilingual NLP and photo damage pre-check.
Evidence GET /api/v1/evidence/{hazard_id} Complete Bayesian evidence matrix & confidence breakdown.
Risk GET /api/v1/risk/assess SHAP-style factor attribution decomposition.
Risk GET /api/v1/risk/role-action Safety-first action directives by user role.
Routes POST /api/v1/routes/safer Dynamic A* hazard-avoidance shelter pathfinding.
Shelters GET /api/v1/shelters Relief shelter capacities and operational status.
Simulation POST /api/v1/simulation/run Parametric surge crisis stress-testing.
Simulation POST /api/v1/simulation/execute-pipeline-demo Automated 8-stage disaster response lifecycle demo.

10. Role-Based Access Control (RBAC)

The platform provides tailored interfaces and permission scopes for four operational profiles:

Role Target User Interface & Permissions
Authority (AUTHORITY) NDRF, ODRAF, District Magistrates Full Command Center HUD, 6-KPI metrics, CBS dispatch trigger, shelter activation.
Citizen (CITIZEN) Coastal Residents, Fisherfolk Offline-ready SOS, crowdsourced reporting form, nearest shelter route guidance.
Responder (RESPONDER) Field Rescue Battalions, Coast Guard Tactical hazard perimeters, vehicle impassability overlays, live report triage.
Analyst (ANALYST) Ocean Modelers, Meteorologists Raw INCOIS QuikSCAT scatterometer data, SHAP waterfall charts, simulation studio.

Quick test demo accounts (Password: password123):

  • authority@resqnet.gov.in
  • citizen@resqnet.gov.in
  • responder@resqnet.gov.in
  • analyst@resqnet.gov.in

11. Automated Testing & Quality Assurance

The codebase includes comprehensive unit and integration tests covering API schemas, Bayesian math, NLP parsing, and A* pathfinding:

# Run pytest test suite
python -m pytest
tests\test_api.py ..............                                         [ 70%]
tests\test_fusion.py ..                                                  [ 80%]
tests\test_nlp.py ...                                                    [ 95%]
tests\test_routing.py .                                                  [100%]
============================== 20 passed in 0.48s ==============================
# Verify frontend production build
cd frontend
npm run build
โœ“ 2772 modules transformed.
dist/index.html                   1.90 kB โ”‚ gzip:   0.82 kB
dist/assets/index-OS29SHxK.css   75.38 kB โ”‚ gzip:  17.12 kB
dist/assets/index-C0anW72h.js   231.64 kB โ”‚ gzip:  53.52 kB
โœ“ built in 5.37s

12. Responsible AI & Operational Ethics

  1. Strict Data Lineage: Official Government Warnings (IMD/INCOIS) are displayed with statutory precedence. Automated machine outputs are explicitly badged as "AI Risk Assessment โ€” Predictive Intelligence" to prevent public confusion.
  2. Epistemic Humility: AI confidence scores are capped at 98% to prevent over-reliance on automated models during extreme meteorological anomalies.
  3. No False Safety Guarantees: Evacuation paths avoid known flooded polygons but provide explicit disclaimers directing citizens to obey local law enforcement sirens.
  4. Privacy Protection: Public crowdsourced feeds omit personal citizen phone numbers and blur sensitive residential coordinates.

13. License

This project is licensed under the terms of the MIT License. See LICENSE for details.


Built with pride for coastal community resilience & disaster safety across India.
Developed for Smart India Hackathon (SIH 2025) โ€ข Ministry of Earth Sciences (MoES)

About

ResQNet AI is an autonomous, explainable coastal disaster intelligence platform that fuses satellite feeds, ocean buoys, and crowdsourced citizen SOS reports into real-time hazard verification, TreeSHAP risk analytics, and smart flood-avoiding evacuation routes. ๐ŸŒŠ๐Ÿšจ๐Ÿ‡ฎ๐Ÿ‡ณ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages