Skip to content

Repository files navigation

🚨 CivGuard AI

AI-Powered Emergency Response & Disaster Management Platform

React TypeScript Supabase TanStack


Real-time crisis coordination platform that automates emergency triage, resource allocation, and multi-agency response.

Features Β· Architecture Β· Setup


🎯 Problem Statement

During natural disasters and emergencies, coordination between agencies is chaotic, resource allocation is manual, and response times suffer. CivGuard AI uses artificial intelligence to:

  • Automate triage β€” prioritize incoming emergency reports by severity
  • Optimize resources β€” recommend allocation based on availability and proximity
  • Coordinate response β€” real-time dashboard for multi-agency visibility
  • Reduce response time β€” AI-driven decision support eliminates human bottlenecks

✨ Features

Feature Description
πŸ“Š Live Dashboard Real-time emergency status, resource tracking, and incident map
🚨 Incident Reporting Citizens report emergencies with location, type, and severity
πŸ€– AI Triage Automated severity classification and priority assignment
πŸ₯ Resource Allocation AI recommendations for deploying ambulances, fire units, police
πŸ‘₯ Multi-Agency View Shared situational awareness across fire, medical, police teams
πŸ” Role-Based Access Login/Register with role-specific dashboards
πŸ“ˆ Analytics Historical incident data, response time trends, and heatmaps
πŸ”” Real-time Updates Supabase Realtime for live incident status changes

πŸ›  Tech Stack

Frontend:       React 18 + TypeScript + Vite
State:          TanStack Query v5 (server state) + React Context (auth)
Styling:        Tailwind CSS + Radix UI + shadcn/ui components
Backend:        Supabase (Auth, PostgreSQL, Realtime, Edge Functions)
Charts:         Recharts for analytics
Forms:          React Hook Form + Zod validation
Routing:        React Router DOM v6
Deployment:     Vercel / Netlify

πŸ—οΈ Architecture

src/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ Index.tsx            # Landing page
β”‚   β”œβ”€β”€ Dashboard.tsx        # Main emergency dashboard
β”‚   β”œβ”€β”€ Login.tsx            # Authentication
β”‚   β”œβ”€β”€ Register.tsx         # New user registration
β”‚   β”œβ”€β”€ ReportIssue.tsx      # Citizen incident report form
β”‚   └── NotFound.tsx         # 404 handler
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                  # shadcn/ui design system
β”‚   β”œβ”€β”€ layout/              # Page layouts, navigation
β”‚   └── ProtectedRoute.tsx   # Auth guard
β”œβ”€β”€ contexts/                # Auth state management
β”œβ”€β”€ hooks/                   # Custom React hooks
β”œβ”€β”€ integrations/            # Supabase client & API layer
└── lib/                     # Utility functions

πŸš€ Quick Start

git clone https://github.com/mudassiralladatkhan/civguard-ai-response.git
cd civguard-ai-response

# Install dependencies
npm install

# Configure environment
# Add VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY to .env

# Run development server
npm run dev

🧠 AI Decision Flow

Incident Reported β†’ Severity Classification (AI)
                        β”œβ”€β”€ Critical β†’ Immediate dispatch + multi-agency alert
                        β”œβ”€β”€ High β†’ Priority queue + resource check
                        β”œβ”€β”€ Medium β†’ Standard queue + nearest unit
                        └── Low β†’ Logged + advisory response

Resource Allocation:
  Available Units Γ— Proximity Γ— Severity Γ— Specialization = Optimal Assignment

🎯 Use Cases

  • Natural disasters β€” flood, earthquake, cyclone response coordination
  • Urban emergencies β€” fire, medical, law enforcement dispatch
  • Event safety β€” large gathering monitoring and incident response
  • Training simulations β€” tabletop exercises for emergency responders

Built with 🚨 by Mudassir Alladatkhan

Faster response. Smarter allocation. Lives saved.

About

🚨 AI-powered emergency response platform for real-time disaster management & crisis coordination

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages