Alert Aid is a real-time disaster management system with live APIs and ML predictions. It features a React-based frontend and a FastAPI-based backend.
- Frontend: React (CRA), TypeScript, Three.js, Styled Components.
- Backend: Python, FastAPI, Scikit-learn, Uvicorn.
- Deployment: Vercel (Frontend), Render (Backend).
- APIs: OpenWeatherMap (Weather), USGS (Earthquakes), ipapi.co (Geolocation).
/backend: FastAPI application.main.py: Entry point.routes/: API- Goal: Resolving build errors for Vercel deployment (TypeScript & ESLint).
- Status: 🟢 Build errors fixed. Waiting for deployment verification.
- Recent Fixes:
- Added global
process&NodeJStypes. - Resolved ESLint
exhaustive-depsin hooks (Dashboard,LocationContext, etc.). - Removed unused variables/imports across components.
- Cleaned up project root.
- Added global
- Dashboard UI
- Live Weather Integration (OpenWeatherMap)
- ML Disaster Prediction (Backend)
- Earthquake Data (USGS)
- IP Geolocation - FIXED: Proxying through backend + multiple providers
- GPS Geolocation - IMPROVED: Better fallbacks
{
"overall_risk": "low" | "moderate" | "high" | "critical",
"risk_score": float,
"confidence": float,
"location_analyzed": {"latitude": float, "longitude": float}
}GET /api/health: System health status.GET /api/weather/{lat}/{lon}: Weather data for coordinates.POST /api/predict/disaster: Predict disaster risk.GET /api/alerts: Active disaster alerts.
- Backend Endpoint: Added
/api/external/geolocationto backend to provide reliable, CORS-free location data. - Improved Geolocation Logic: Frontend now uses backend -> ipwhois -> ipapi cascade with robust error handling.
- Environment Config: Updated
.env.productionwith correct Render URL. - Cleanup: Consolidated deployment docs into
/docs/archiveand removed root redundancy.