AI-Powered Disaster Detection, Emergency Coordination & Smart Relief Management
A production-ready AI-powered emergency management platform that helps governments, NGOs, rescue teams, and citizens detect disasters, assess severity, coordinate rescue operations, and provide real-time assistance.
- Animated hero section with earth/globe animation and floating blobs
- Animated statistics counters
- Feature cards with hover effects
- How-it-works process steps
- Testimonials from emergency professionals
- FAQ accordion
- Footer with navigation
- Email/password sign-up and sign-in
- Google OAuth login
- Forgot password flow
- Role selection: Citizen, Volunteer, Rescue Team, Government Admin
- Automatic profile creation on signup
- Premium sidebar navigation with smooth animations
- Dark/light mode toggle
- Real-time notification badge
- Responsive mobile drawer
- Upload disaster photos (flood, fire, earthquake, etc.)
- AI detects: disaster type, confidence score, severity, objects detected
- Estimates: buildings affected, roads blocked, people visible, rescue teams required
- Generates detailed AI report with recommendations
- Export analysis as professional PDF report
- 24/7 AI assistant with structured emergency knowledge base
- Covers: flood, fire, earthquake, cyclone, landslide, CPR, first aid, shelters, water purification, food safety, volunteer guidance
- Quick-prompt buttons for common questions
- Chat history persisted to database
- Form with title, description, category, priority, location
- GPS coordinate capture via browser geolocation
- Image upload
- People affected count
- Stores in Supabase database
- Interactive Leaflet map with OpenStreetMap tiles
- Color-coded incident markers by category
- Relief camp, shelter, hospital, and police markers
- Filter by type (incidents, camps, shelters)
- Click markers for popup details
- Integrated into image analysis
- Generates severity score (Low/Medium/High/Critical)
- Estimated damage assessment
- Rescue team recommendations
- 14-day incident trend (area chart)
- Disaster category distribution (pie chart)
- Priority distribution (pie chart)
- Status breakdown (bar chart)
- Disaster type radar chart
- Volunteer network statistics
- Volunteer registration with skills, experience, certifications
- Nearby rescue task browsing and acceptance
- Task completion tracking
- Live leaderboard with ratings
- Status management (pending/approved/busy/available)
- Camp details: capacity, occupancy, stock levels
- Food, water, medicine stock tracking
- Live occupancy updates
- Status management (open/full/closed)
- Manager and contact info
- Toast notifications (sonner)
- In-app notification center
- Emergency alerts
- Mark as read / delete
- Professional incident reports
- Includes: summary, disaster type, severity, detected objects, impact metrics, recommendations
- Downloadable PDF format
- User management and overview
- Approve/reject volunteer applications
- Manage incident reports (activate, resolve, delete fake reports)
- Admin-only access control
- Profile management (name, phone, location, bio)
- Theme toggle (dark/light)
- Password update
- Notification preferences
- Language selection
| Layer | Technology |
|---|---|
| Frontend | Next.js 13 (App Router), React 18, TypeScript |
| Styling | TailwindCSS, shadcn/ui |
| Animations | Framer Motion |
| Data Fetching | TanStack React Query |
| Forms | React Hook Form |
| Icons | Lucide React |
| Maps | Leaflet + OpenStreetMap |
| Charts | Recharts |
| jsPDF | |
| Backend | Supabase (PostgreSQL, Auth, RLS) |
| AI | Mock AI engine (structured for Gemini API integration) |
- Node.js 18+
- npm or yarn
# Install dependencies
npm install --legacy-peer-deps
# Set up environment variables
cp .env.example .env.local
# Add your Supabase URL and anon key
# Run development server
npm run dev
# Build for production
npm run buildCreate a .env.local file with:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyThe Supabase instance is pre-provisioned with the full database schema including:
profiles— user profiles with rolesincidents— disaster reportsai_analyses— AI-generated analysis recordsvolunteers— volunteer registrationsrelief_camps— camp managementchat_messages— chatbot historynotifications— user notifications
All tables have Row Level Security (RLS) enabled with appropriate policies.
The schema is multi-tenant with owner-scoped policies:
| Table | Purpose | RLS |
|---|---|---|
| profiles | User data, role, avatar | Owner-scoped, admin read-all |
| incidents | Disaster reports | All-authenticated read, owner/admin write |
| ai_analyses | AI analysis results | All-authenticated read, owner insert |
| volunteers | Volunteer profiles | All read, owner/admin update |
| relief_camps | Camp management | All read, admin/rescue_team manage |
| chat_messages | Chat history | Owner-only |
| notifications | User alerts | Owner-only |
The Next.js app deploys directly to Vercel. Connect your repo and set environment variables.
docker build -t disastereye-ai .
docker run -p 3000:3000 disastereye-aiThe AI analysis engine (lib/ai-engine.ts) and chatbot (lib/chat-engine.ts) are structured as mock implementations that mimic real AI behavior. To integrate with Gemini API:
- Deploy a Supabase Edge Function that proxies requests to Gemini
- Replace the mock
analyzeImage()call with a fetch to the edge function - Replace
getChatResponse()with a streaming chat completion call
The edge function pattern ensures API keys stay server-side.
profiles:
- id (uuid, PK, references auth.users)
- email, display_name, role, avatar_url, phone, skills[], location, bio
incidents:
- id, user_id, title, description, category, priority, status
- latitude, longitude, location_name, image_url, people_affected
ai_analyses:
- id, incident_id, user_id, disaster_type, confidence_score
- severity, severity_score, objects_detected[], buildings_affected
- roads_blocked, people_visible, estimated_damage, rescue_teams_required
- recommendations[], summary
volunteers:
- id, user_id, status, availability, skills[], experience_years
- completed_tasks, active_tasks, rating, certifications[]
relief_camps:
- id, name, location_name, latitude, longitude, capacity
- current_occupancy, food_stock, water_stock, medicine_stock, status
chat_messages:
- id, user_id, role, content, created_at
notifications:
- id, user_id, title, message, type, read, created_at
Built for hackathon demonstration. All rights reserved.
DisasterEye AI — AI That Saves Lives During Disasters