PROJECT REPORT: KARUNA AI-Powered Disaster Relief Coordination Platform Date: February 2026 Repository: https://github.com/SuyashSrivastava1/Karuna Tags: gemini-ai react typescript node.js express supabase postgresql vite google-ai disaster-relief ai-chatbot geolocation 1.0 Executive Summary Karuna is a comprehensive, full-stack disaster relief platform designed to orchestrate the actions of every stakeholder in real-time. Moving disaster management from reactive, static spreadsheets to a proactive, AI-driven command center, Karuna leverages Google Gemini 2.0 Flash to bridge critical gaps in the disaster response lifecycle. By unifying volunteers, medical teams, and logistics into a single "Disaster Operating System," Karuna ensures that aid reaches those who need it most, when they need it. 2.0 Problem Statement The Chaos of Uncoordinated Relief In the immediate aftermath of a disaster, the primary obstacle is rarely a lack of resources, but rather the catastrophic breakdown of coordination. Traditional recovery efforts encounter five critical failure points: Disconnected Stakeholders: Volunteers, doctors, pharmacies, and donors operate in silos, resulting in duplicated efforts and resource gaps. Resource Misalignment: Skilled volunteers (e.g., nurses, specialized drivers) are frequently assigned menial tasks, leaving critical positions unfilled. Broken Supply Chains: There is no "last-mile" bridge connecting a doctor's prescription at a relief camp to the actual delivery of medicine. Information Blind Spots: Victims cannot locate the nearest "Safe Zone," and emergency contacts are scattered across disparate platforms. Bureaucratic Lag: Existing tools are often slow, offline-only, or require extensive manual sorting that is impossible during a crisis. Karuna solves this "coordination chaos" by using AI to bridge every gap in the disaster response lifecycle. 3.0 Proposed Solution Karuna functions as a unified "Disaster Operating System" that orchestrates real-time actions for all stakeholders. 3.1 The Gemini 2.0 Flash Core At the core of the platform is the Google Gemini 2.0 Flash engine, which powers intelligent decision-making: AI Volunteer Router: Replaces static forms with intelligent sorting. Gemini analyzes a volunteer’s profile (profession, medical fitness, vehicle type, skills) to automatically assign them to a Nurse, Driver, or Helper track with a personalized task list. Emergency Conversational AI: A location-aware chatbot utilizing GPS metadata and the Haversine formula to calculate the nearest relief site. It provides calm, step-by-step survival instructions and integrated emergency dialing (112, 108). 3.2 Comprehensive Stakeholder Ecosystem Medical Pipeline: A mandatory state machine ensures no order is lost: Doctors prescribe → Pharmacies fulfill → Drivers deliver. Field Operations: Nurses manage patient intake via auto-generated TAG IDs, while field volunteers execute AI-suggested task lists. Smart Logistics: Drivers manage pickups for medical supplies and donor goods, prioritizing sites with the highest urgency scores. Command & Control: A site management system tracking GPS coordinates, urgency levels (1-10), and live personnel statistics across relief camps. 4.0 Technical Architecture 4.1 Technology Stack Layer Technology Frontend React 18, TypeScript, Vite, React Router v6 Backend Node.js, Express.js Database PostgreSQL via Supabase (Row-Level Security enabled) Authentication Supabase Auth (JWT + role-based middleware) AI Engine Google Gemini 2.0 Flash (Volunteer Routing + Emergency Chatbot) API Security CORS Whitelist, Rate Limiting (100 req/15min), Input Truncation Geolocation Browser Geolocation API + Haversine Formula

4.2 Architecture Overview Karuna utilizes a modular, role-based architecture designed for high availability. Data Flow: User Browser: React SPA handles user interaction. API Layer: REST API (Express.js) manages requests with JWT Auth/RLS. AI Integration: Structured JSON prompts are sent to Google Gemini 2.0 Flash. Volunteer Routing: Returns track assignments. Emergency Chatbot: Returns safety guidance. Database: Supabase (PostgreSQL) stores Site, Order, Donation, and Driver data. 4.3 System Integrity & Fail-safes Fail-safe Design: If the AI service is unavailable, Karuna automatically falls back to keyword-based volunteer assignment and static emergency contacts, ensuring functionality during network instability. Security: Prompt injection is mitigated by truncating user inputs and strictly validating AI-generated JSON against pre-defined schemas. 5.0 Key Features & Innovations AI-Powered Volunteer Routing: Moves beyond manual sorting by analyzing 7 profile dimensions to output structured track assignments. Location-Aware Emergency Chatbot: Uses real-time distance calculation (Haversine formula) to connect victims to the nearest physical help. End-to-End Medical Supply Chain: A deterministic pipeline (Prescription → Prep → Pickup → Delivery) prevents "lost orders." Smart Donation Tracking: Donors submit goods which are auto-categorized and scheduled for driver pickup based on camp needs. Nurse Patient Intake: Rapid tagging system linking patient vitals directly to doctor dashboards. Real-time Site Command Center: Master view of all relief camps with urgency scoring.

Conclusion "Karuna is built to be resilient, scalable, and AI-first. Empowering humanity when it matters most."

Built With

Share this project:

Updates