Skip to content

Latest commit

Β 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚨 ResQAI

AI-Powered Disaster Intelligence & Emergency Response Platform

Predict. Coordinate. Respond. Save Lives.

Live Application Backend API Swagger Docs

React 19 FastAPI TypeScript Tailwind CSS PostgreSQL SQLAlchemy TEE-Ready

ResQAI is a production-grade, full-stack disaster response and crisis intelligence platform. It unifies emergency distress reporting, real-time spatial GIS mapping, tactical rescue squad dispatching, relief shelter inventory management, volunteer mission tasking, executive analytics, and grounded AI decision support into a single high-reliability command center.

🌐 Try Live Application Β· βš™οΈ Backend API Β· πŸ“š API Documentation Β· πŸ’» GitHub Repo


πŸ“Œ Project Snapshot

Attribute Specification
Core Concept Integrated AI-assisted disaster management command center for India & high-risk regions
Primary Audience Incident Commanders, NDRF/SDRF Rescue Squads, District Collectors, Relief NGOs, Affected Citizens
Core Value Replaces fragmented phone calls and paper logs with real-time GIS telemetry and grounded AI triage
Key Differentiator Full-stack production readiness, 6-role RBAC, real PostgreSQL database, and TEE-ready confidential computing architecture

🌐 Live Deployments

Resource Link Description
🌐 Live Web Application https://resqai-kappa.vercel.app Production Single-Page React SPA Client
βš™οΈ Backend API Server https://resqai-backend.vercel.app Standalone FastAPI Serverless API on Vercel
πŸ“š Swagger API Documentation https://resqai-backend.vercel.app/docs Interactive OpenAPI 3.1.0 Endpoint Explorer
πŸ’» Source Repository https://github.com/mrashish18/ResQAI GitHub Source Code & Issue Tracker

⚠️ The Problem vs πŸ’‘ The ResQAI Solution

Structural Crisis Bottleneck ResQAI Solution Engine
1. Fragmented Communication & Silos
Affected citizens struggle to locate open shelters, while first responders and NGOs lack visibility into local crisis severity.
Unified Operations Platform
Single dashboard aggregating citizens, rescue teams, NGOs, and government command into one shared operational view.
2. Delayed Emergency Extraction
Rescue squads operate with incomplete or outdated coordinates, prolonging response times for critical SOS distress signals.
Real-Time GIS Operations Map
Interactive Leaflet dark basemap displaying live GPS distress coordinates, squad positions, and priority markers.
3. Imbalanced Relief Distribution
Food, medical supplies, and clean water are allocated using guesswork, leading to inventory hoarding or shortages.
Shelter & Resource Inventory Manager
Real-time occupancy tracking, itemized warehouse inventory, and automated distribution logging against specific incidents.
4. Uncoordinated Volunteer Mobilization
Willing community volunteers lack a transparent platform to view, accept, and update critical field tasks.
Volunteer Mission Task Board
Public task board allowing volunteers to browse priority assignments, accept tasks, and update completion status.
5. Cognitive Overload for Officials
Command officials face massive streams of unorganized field telemetry, making it difficult to identify priorities.
AI Command Assistant & Analytics
Telemetry-grounded AI assistant (OpenRouter) providing instant database queries and Chart.js crisis analytics.

πŸ—οΈ Project Architecture

ResQAI Project Architecture


🌟 Key Capabilities

Domain Core Capability Implementation Details
🧠 AI Command Center Telemetry-Grounded AI Assistant Answers complex crisis queries using live database context (incidents, shelters, squads) with verifiable source citations via OpenRouter API.
πŸ—ΊοΈ Live Emergency Map Spatial Operations GIS Map Custom Leaflet dark basemap featuring real-time incident markers, shelter capacity badges, rescue squad tracking, and risk heatmaps.
🚨 SOS Broadcasts Priority Emergency Distress Enables citizens to broadcast emergency distress signals with exact GPS coordinates, medical flags, victim counts, and image uploads.
πŸš‘ Rescue Squad Dispatch Tactical Unit Coordination Coordinates specialized units (NDRF, SDRF, Coast Guard, Army Engineers), assignment tracking, and status lifecycle transitions.
🏠 Shelters & Relief Inventory & Capacity Tracking Tracks real-time shelter occupancy, warehouse stock levels (food, water, medicine), and logs itemized supply distributions.
πŸ‘₯ Volunteer Task Board Field Mission Coordination Transparent task board for community volunteers to browse priority assignments, accept tasks, and submit completion status.
πŸ“Š Crisis Analytics Executive Decision Dashboard Visualizes incident severity distributions, resource allocation ratios, and temporal crisis trends using Chart.js.
βš™οΈ System Settings Operations Control Center Multi-domain settings for theme density, 8 dispatch alert channels, quiet hours, GIS basemaps, offline storage sync, and health checks.
πŸ” Security & RBAC Enterprise Security & TEE-Ready JWT authentication, 6 role-based access rules (Citizen, Volunteer, Rescue, NGO, Government, Admin), and TEE-ready confidential compute pipeline.

πŸ“Έ Product Walkthrough (30 Screenshots)

🌐 1. Platform & Authentication (Screenshots 01–09)
Interface Preview
Landing Hero Page ResQAI Landing Page
Platform Feature Overview ResQAI Platform Overview
AI Hazard Prediction Engine ResQAI AI Hazard Prediction
Complete Disaster Operations ResQAI Complete Disaster Operations
First Responder Platform ResQAI Responder Platform
Active Disaster Response Telemetry ResQAI Active Disaster Response
Community Protection Architecture ResQAI Community Protection
User Account Registration Console ResQAI User Registration
Secure Authentication Portal ResQAI Login

πŸ—ΊοΈ 2. Emergency Operations & GIS (Screenshots 10–14)
Interface Preview
Operational Command Dashboard ResQAI Dashboard
Live Emergency Operations Map ResQAI Live Emergency Operations Map
Live Map Spatial Telemetry ResQAI Live Map Operations
GIS Satellite & Basemap Layers ResQAI Satellite Disaster Map
Citizen SOS Emergency Broadcast ResQAI Emergency SOS Broadcast

🚁 3. Rescue, Shelters & Resources (Screenshots 15–21)
Interface Preview
Rescue Team Squad Operations ResQAI Rescue Team Operations
Register Rescue Squad Modal ResQAI Register Rescue Squad
Shelters & Resource Inventory ResQAI Shelters Resource Inventory
Relief Shelter Management ResQAI Shelter Relief Management
Register Relief Shelter Modal ResQAI Register Relief Shelter
Register Inventory Item Modal ResQAI Register Inventory Item
Volunteer Mission Task Board ResQAI Volunteer Mission Board

πŸ€– 4. AI & Analytics (Screenshots 22–25)
Interface Preview
ResQAI Intelligence Assistant ResQAI AI Intelligence Assistant
AI Command Center Chat Console ResQAI AI Command Center Chat
Automated AI Risk Assessment ResQAI AI Risk Assessment
Crisis Analytics & Telemetry Insights ResQAI Crisis Analytics Insights

βš™οΈ 5. System, Security & Administration (Screenshots 26–30)
Interface Preview
Emergency Broadcasts & Alerts Center ResQAI Emergency Broadcasts Alerts
System Settings Control Center ResQAI System Settings Preferences
Dispatch Alert Channels & Settings ResQAI Emergency Alert Settings
Admin Security Console ResQAI Admin Security Console
Provision User Account Modal ResQAI Provision User Account

πŸ› οΈ Technology Stack

Layer Component Technologies
Frontend SPA React 19.2, TypeScript 5.0, Vite 8.1, Tailwind CSS v4.0, Framer Motion
GIS & Spatial Mapping Leaflet 1.9, React Leaflet 5.0, CartoDB Voyager / Dark Basemaps, Esri Topo / Satellite
Data Visualization Chart.js 4.4, react-chartjs-2, Lucide React Icons
Backend Framework FastAPI 0.111, Uvicorn 0.30 (ASGI), Pydantic v2, Python 3.11 / 3.12
Database & ORM PostgreSQL 15 (Production / Neon), SQLite (Local Dev), SQLAlchemy 2.0, Alembic 1.13
Security & Auth Python-Jose (JWT), Passlib (Bcrypt), OAuth2 Password Bearer, 6-Tier RBAC
AI Intelligence OpenRouter API (nvidia/llama-nemotron-rerank-vl-1b-v2:free), HTTPX Async Client
Deployment Vercel Serverless Functions (@vercel/python), Vercel Static Build (Frontend SPA), Docker Compose

πŸ” Confidential Computing & TEE Architecture (TEE-Ready)

ResQAI features a TEE-ready Confidential Computing architecture designed to protect sensitive emergency workloads (such as citizen SOS distress calls, victim locations, and tactical triage recommendations) when deployed on supported hardware enclaves.

User Payload (SOS / Victim Data)
  β”‚
  β–Ό
FastAPI Security Gateway
  β”‚
  β–Ό
sanitize_and_minimize_input()  <-- Scrubs PII, emails, phone numbers & credentials
  β”‚
  β–Ό
ConfidentialComputeService (Provider Abstraction)
  β”‚
  β”œβ”€β”€ [CONFIDENTIAL_COMPUTING_ENABLED=true]  ──> AWS Nitro / GCP Confidential / Azure TEE Enclave
  β”‚
  └── [CONFIDENTIAL_COMPUTING_ENABLED=false] ──> Development Fallback Provider
                                                  (Truthfully reports: "Development Mode β€” TEE Off")

Security Architecture Rules & Status

  • Data Minimization Pipeline: sanitize_and_minimize_input() automatically scrubs PII, credentials, and non-essential fields prior to enclave processing.
  • Provider-Agnostic Abstraction: Designed for deployment pathways on AWS Nitro Enclaves, GCP Confidential Space, and Azure Confidential VMs.
  • Truthful Status Reporting: In development / serverless mode (CONFIDENTIAL_COMPUTING_ENABLED=false), the system explicitly labels processing as ⚠️ Development Mode β€” Hardware TEE Unavailable without making false security claims.
  • Status Verification Endpoint: GET /api/security/confidential-computing.

For complete technical specifications, see docs/confidential-computing.md.


πŸ”‘ Operational Access Roles

Role Email Identifier Demo Password Access Level & Scope
Admin admin@resqai.in Not published Full system control, user provisioning, task assignment & resource allocation
Government Official govt@resqai.in Not published High-level crisis analytics, incident oversight & resource distribution approval
NGO Coordinator ngo@resqai.in Not published Shelter management, warehouse inventory tracking & relief distribution
Rescue Squad Lead rescue@resqai.in Not published Rescue squad status updates, incident response & victim extraction
Volunteer volunteer@resqai.in Not published Volunteer task board, mission acceptance & field completion reporting
Citizen citizen@resqai.in Not published Emergency SOS broadcast, shelter lookup & incident distress reporting

Note: Demo account credentials for hackathon evaluation are configured in the evaluation environment.


⚑ Quick Start & Installation

Prerequisites

  • Node.js v20.0+
  • Python 3.11+
  • Git

1. Clone Repository

git clone https://github.com/mrashish18/ResQAI.git
cd resqai

2. Backend Setup

cd backend

# Create & activate virtual environment
python -m venv .venv

# Windows:
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activate

# Install backend dependencies
pip install -r requirements.txt

3. Frontend Setup

cd ../frontend
npm install

4. Run Development Servers

Start FastAPI Backend:

# In backend directory (venv active):
python -m uvicorn main:app --port 8000 --reload
  • API Base: http://localhost:8000
  • Interactive OpenAPI Docs: http://localhost:8000/docs
  • Health Check: http://localhost:8000/health

Start React Frontend:

# In frontend directory:
npm run dev
  • Local Client App: http://localhost:5173

πŸ“‘ API Overview

The ResQAI backend exposes modular REST API controllers. Interactive documentation is available live at https://resqai-backend.vercel.app/docs.

Controller Base Path Description
Auth & Users /api/auth, /api/users JWT authentication, registration, profile updates, and RBAC user provisioning
Incidents /api/incidents Incident lifecycle, geographic coordinates, severity, and status transitions
Emergency SOS /api/sos Citizen distress broadcasts, medical emergency flags, victim counts, and image uploads
Shelters /api/shelters Shelter registration, capacity tracking, current occupancy, and status management
Rescue Teams /api/rescue Tactical rescue squad roster, dispatch tracking, and incident assignments
Resources & Relief /api/resources Supply inventory tracking and itemized disaster distribution logging
Volunteers /api/volunteers Field mission task board, task creation, volunteer acceptance, and completion
AI Command Center /api/chatbot Grounded AI decision support querying active database telemetry
Hazard Predictions /api/predictions Automated disaster risk prediction models and regional risk assessments
Crisis Analytics /api/analytics Executive summary stats, incident trends, resource ratios, and telemetry insights
Security & TEE /api/security Confidential computing status verification and sanitized enclave processing

πŸ§ͺ Testing & Verification

Backend Integration Tests (38/38 Passing)

Run the automated end-to-end integration test suite:

python backend/test_api.py
RESQAI BACKEND β€” API TEST RESULTS
============================================================
[PASS] GET / -> 200 (expected 200)
[PASS] GET /health -> 200 (expected 200)
...
[PASS] GET /api/security/confidential-computing -> 200 (expected 200)
[PASS] POST /api/security/process-confidential-ai -> 200 (expected 200)
============================================================
38/38 tests passed β€” All tests passed!

Frontend Production Build

Validate TypeScript compilation and Vite bundling:

cd frontend
npm run build

πŸ“ Repository Structure

resqai/
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ README.md
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ alembic/
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ analytics.py
β”‚   β”‚   β”œβ”€β”€ auth.py
β”‚   β”‚   β”œβ”€β”€ chatbot.py
β”‚   β”‚   β”œβ”€β”€ incidents.py
β”‚   β”‚   β”œβ”€β”€ notifications.py
β”‚   β”‚   β”œβ”€β”€ predictions.py
β”‚   β”‚   β”œβ”€β”€ rescue.py
β”‚   β”‚   β”œβ”€β”€ resources.py
β”‚   β”‚   β”œβ”€β”€ security.py
β”‚   β”‚   β”œβ”€β”€ shelters.py
β”‚   β”‚   β”œβ”€β”€ sos.py
β”‚   β”‚   β”œβ”€β”€ uploads.py
β”‚   β”‚   β”œβ”€β”€ users.py
β”‚   β”‚   β”œβ”€β”€ volunteers.py
β”‚   β”‚   └── weather.py
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ ai.py
β”‚   β”‚   └── confidential_compute.py
β”‚   β”‚
β”‚   β”œβ”€β”€ alembic.ini
β”‚   β”œβ”€β”€ auth.py
β”‚   β”œβ”€β”€ config.py
β”‚   β”œβ”€β”€ database.py
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ schemas.py
β”‚   β”œβ”€β”€ seed.py
β”‚   β”œβ”€β”€ test_api.py
β”‚   └── utils.py
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”œβ”€β”€ App.tsx
β”‚   β”‚   └── index.css
β”‚   β”‚
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ nginx.conf
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ package-lock.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ docs/
β”‚   └── confidential-computing.md
β”‚
└── screenshots/                    # 30 project screenshots

πŸ† Impact & Project Differentiators

High-Impact Outcomes

  • Accelerated Emergency Response: Eliminates communication bottlenecks by directly connecting citizen SOS broadcasts to nearest rescue teams and GIS maps.
  • Resource Equity: Prevents relief inventory hoarding by providing real-time stock and occupancy visibility to relief coordinators.
  • Enhanced Command Intelligence: Reduces cognitive overload for incident commanders via grounded AI decision support and real-time Chart.js analytics.

Why ResQAI?

  1. Production-Grade Full-Stack Architecture: Clean separation between React 19 SPA frontend and FastAPI ASGI backend.
  2. Real Database Integration: Built on SQLAlchemy 2.0 with PostgreSQL 15 / Neon compatibility and zero hardcoded mock data.
  3. Interactive Spatial GIS: Multi-basemap Leaflet engine with custom cluster markers, risk zones, and live telemetry fly-to controls.
  4. Grounded AI Intelligence: LLM integration grounded strictly against live database tables with source citations.
  5. Confidential Computing Readiness: Architected with a PII minimization pipeline and TEE abstraction layer for hardware enclave execution.

πŸš€ Phased Roadmap & Future Improvements

🟒 Phase 1 β€” Current Production Release (Implemented)

  • Full-Stack Crisis Operations: Incident lifecycle management, priority SOS distress broadcasting, and volunteer mission task board.
  • Interactive GIS Mapping: Multi-basemap Leaflet engine with custom cluster markers, risk zone overlays, and location fly-to controls.
  • Shelter & Resource Inventory: Real-time shelter capacity tracking, warehouse stock management, and itemized relief distribution logging.
  • Grounded AI Command Center: AI assistant (OpenRouter) grounded directly against live database telemetry with source citations.
  • Enterprise Security & TEE-Ready: 6-role RBAC, JWT authentication, PII minimization pipeline, and TEE confidential compute abstraction.

🟑 Phase 2 β€” Near-Term Platform Enhancements (Planned)

  • πŸ“‘ WebSockets Real-Time Telemetry: Upgrade live map telemetry from HTTP polling to WebSocket streams for sub-second rescue squad GPS updates.
  • πŸ“Ÿ IoT Sensor & Telemetry Integration: Ingest real-time field telemetry from water level sensors, weather stations, and seismic monitors.
  • 🌦️ Official Weather & Hazard Feeds: Direct API integrations with official meteorological and disaster alert feeds for automated hazard triggers.
  • πŸ“‘ Offline Mesh Networking: WebRTC peer-to-peer mesh fallback for emergency distress reporting in low-connectivity disaster zones.

πŸ”΅ Phase 3 β€” Long-Term Vision (Planned)

  • πŸ›°οΈ Satellite & Drone Imagery Analysis: Aerial drone reconnaissance and satellite computer-vision pipelines for automated flood zone detection and structural damage assessment.
  • πŸš‘ AI Rescue-Route & Evacuation Optimization: Dynamic predictive evacuation planning and real-time optimal routing for emergency extraction squads.
  • πŸ—£οΈ Multilingual Voice Emergency Assistant: Multi-dialect voice assistant for hands-free SOS reporting in regional languages.
  • πŸ“± Dedicated Native Mobile Apps: Cross-platform iOS/Android applications for citizens and first responders with offline-first sync.

πŸ“œ License & Intellectual Property

Β© 2026 Team ResQAI. All Rights Reserved.

ResQAI is developed and published for portfolio, educational, demonstration, and hackathon evaluation purposes.

Unless otherwise stated, the project's original source code, design, documentation, visual assets, branding, and other original project materials are the property of the project authors.

Third-party libraries, frameworks, APIs, map data, icons, fonts, and other external resources remain subject to their respective licenses and terms of use.

Please do not reproduce, redistribute, or commercially reuse the project's original materials without permission from the project authors.


ResQAI β€” AI-Powered Disaster Intelligence & Emergency Response

🌐 Live Application Β· βš™οΈ Backend API Β· πŸ“š API Documentation

Built with ❀️ for saving lives · ResQAI 2026

About

🚨 ResQAI is an AI-powered disaster response platform that combines real-time SOS reporting, disaster prediction, live mapping, rescue coordination, and relief management to enable faster, smarter emergency response.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages