CivicAlert
🎓 Academic / Open-Source Project

Crowdsourced Civic Hazard Reporting& Real-Time Disaster Alert System

with AI Verification

A live platform where citizens report both daily road problems (potholes, garbage) and emergency hazards (floods, landslides) with automated GPS location, photo uploads, AI-powered deduplication, and instant multi-channel alerts.

How It Works

Three steps from citizen report to authority action.

1

Citizen Reports Incident

Open the app, let GPS auto-detect your location, choose severity, add a photo, and submit. Takes under 30 seconds.

2

AI Verifies & Deduplicates

Gemini API checks the photo for authenticity. If another report exists within 200–300m in the last 6 hours, reports are merged into one high-priority ticket.

3

Alerts Reach Authorities

Verified tickets trigger SMS alerts via Fast2SMS/Twilio, Telegram bot notifications to relevant municipal officers, and browser push notifications to nearby citizens.

Severity Sign Convention

Color-coded severity levels used across the map, cards, and alerts.

🔴 Red — Extreme Emergency

Natural Disaster (Landslide, Flood)

🟠 Orange — Severe Hazard

Major road cave-in, open high-voltage wire

🟡 Yellow — Civic Complaint

Pothole, garbage pile, broken streetlight

🟢 Green — Resolved

Issue fixed and verified by authority or AI — ticket closed.

Platform Features

What makes CivicAlert different from a basic complaint form.

AI Incident Verification

Gemini API evaluates each uploaded photo to confirm it's a genuine hazard and generates a crisp one-line summary — no manual review needed.

Smart Deduplication

ImageHash perceptual hashing merges duplicate reports of the same incident within 200–300m radius and 6-hour window into a single high-priority ticket.

Real-Time Color-Coded Map

Live Leaflet.js map with three severity levels: Red for disasters, Orange for severe hazards, Yellow for civic complaints, and Green for resolved incidents.

Instant Multi-Channel Alerts

Verified critical incidents automatically trigger SMS alerts (Fast2SMS/Twilio), Telegram bot notifications, and Web Push notifications to nearby citizens.

GPS-Accurate Reporting

Auto-detected GPS coordinates with optional manual adjustment. PostGIS spatial queries power radius-based filtering and proximity deduplication.

Authority Admin Dashboard

Role-based login for municipal officers and disaster response teams. Update ticket status to In Progress or Resolved; trigger SOS broadcasts.

Technology Stack

Fully open-source stack with minimal cost.

Layer / FeatureTechnology UsedCost
Frontend FrameworkNext.js / ReactFree
Styling & IconsTailwind CSS + Lucide IconsFree
Interactive MapLeaflet.js + OpenStreetMapOpen-source & free
Backend APIPython (FastAPI)Free
DatabaseSupabase (PostgreSQL + PostGIS)Free up to 500 MB
Image StorageSupabase StorageFree 1 GB file storage
Image DeduplicationImageHash (Python library)Free & open-source
AI Verification & SummaryGemini APIFree tier
Emergency Alerts (SMS & SOS)Fast2SMS / Twilio + Telegram Bot APITelegram Bot is free
Web Push NotificationsWeb Push API (Service Workers)100% free
DeploymentVercel + RenderFree 750 hrs/month

Website Architecture

Key design and interaction principles.

Layout Structure

A split-screen responsive dashboard. The left side holds a real-time, scrollable card feed of verified reports; the right side features a full-screen Leaflet.js map.

Live Map Interaction

Incidents render as color-coded pins: Red for high-risk disasters, Orange for severe road hazards, Yellow for civic complaints, and Green for resolved tickets. Clicking any pin opens a detail card.

Filter Bar

Top toolbar allows instant filtering by radius (1 km, 5 km, city-wide) and category tabs (All, Disasters, Roads, Utilities).

SOS / Report Modal

A quick 3-step form with auto-detected GPS coordinates, severity selector, category picker, camera/file upload with image preview, and AI-powered submission.

Future Roadmap

Planned features for next phases of development.

1

Authority Admin Dashboard

Dedicated role-based login for municipal officers or disaster response teams to update ticket statuses (Mark as In Progress or Resolved).

2

Automated Evacuation Route Suggester

Using Dijkstra's or A* routing algorithms on OpenStreetMap to highlight alternative safe routes around reported road blockages or flooded zones.

3

Offline SMS Fallback Reporting

Allowing citizens with zero internet to report emergencies by texting a formatted keyword with GPS coordinates or landmarks to an inbound webhook.

4

Community Trust Scoring

Rewarding active citizens with reputation points for accurate reports, while silently penalizing or rate-limiting users who submit repeated false alerts.