Backend-Heavy MERN Stack Project
A real-time coordination system built to manage disaster response using AI-driven insights, geospatial queries, and live updates.
It consolidates citizen reports, relief resources, and official data into a single, intelligent platform.
During disasters, information is scattered across multiple platforms — social media, news, and official sites.
My motivation was to build a unified system that merges these streams, enhances them with AI, and helps responders act faster with reliable, location-based intelligence.
- Centralizes real-time data from citizens, authorities, and social media.
- Extracts and verifies locations or images using Google Gemini AI.
- Maps nearby resources with Supabase/Postgres geospatial queries.
- Broadcasts live updates via Socket.IO.
- Caches data intelligently to reduce redundant API calls.
| Category | Technology |
|---|---|
| Frontend | React.js |
| Backend | Node.js, Express.js |
| Database | Supabase (PostgreSQL + Geospatial) |
| AI Integration | Google Gemini API |
| Real-time | Socket.IO |
| Caching & Storage | Supabase JSONB |
| Maps/Geocoding | Google Maps API / OpenStreetMap |
| Deployment | Render / Fly.io / Railway (Backend), Vercel / Netlify (Frontend) |
- 🧠 AI-Powered Location Extraction: Extracts coordinates from text using Gemini.
- 🖼️ Image Verification: Validates authenticity through AI models.
- 🗺️ Geospatial Resource Mapping: Finds resources near disaster areas.
- ⚡ Realtime Updates: Broadcasts events using Socket.IO.
- 📰 Official Updates Scraper: Fetches verified government/NGO reports.
- 💾 Smart Caching: Optimizes response time with Supabase caching.
- 💬 Mock Social Feed: Simulates citizen updates for testing.
- Designing AI-integrated backend systems with multiple APIs.
- Writing geospatial SQL queries and Supabase RPC functions.
- Handling real-time communication efficiently with Socket.IO.
- Deploying backend-heavy apps using cloud-native tools.
- AI + Geospatial + Real-time — all integrated in one system.
- Backend-first architecture optimized for reliability and scalability.
- Intelligent caching and indexing for speed and efficiency.
- Minimal frontend, but powerful backend workflows designed for real-world disaster coordination.
cd backend
cp .env.example .env # Fill in environment variables
npm install
npm run dev
# Runs on http://localhost:5000cd frontend
npm install
npm startRuns on http://localhost:3000
PORT=5000
SUPABASE_URL=
SUPABASE_ANON_KEY=
GEMINI_API_KEY=
GOOGLE_MAPS_API_KEY=FRONTEND_URL=http://localhost:3000
ables: disasters, resources, reports, cache
Spatial columns: disasters.location, resources.location
Indexes: GIST (spatial), GIN (tags)
RPC: nearby_resources(lon, lat, radius_m, p_disaster_id)
SQL file: backend/database-setup.sql