Community-powered infrastructure damage reporting for sudden-onset crises.
Built for the UNDP "Build the Future of Crisis Mapping" Challenge β enabling communities to submit geotagged damage reports with on-device AI classification within the critical 48-hour post-crisis window.
https://crisismap-cfa82.web.app
No installation required. Works in any modern browser on any device.
Coordinator login (demo):
Email: admin@crisismap.org
Password: password123
| Feature | Details |
|---|---|
| πΈ 4-step Report Wizard | Photo upload β AI classify β structured form β map pin |
| π€ Edge AI Classification | TensorFlow.js COCO-SSD runs on-device, no server required |
| πΊοΈ Building Footprint Geolocation | Microsoft ML + OSM footprints for building-level precision |
| πΆ Offline-First | IndexedDB queue + Service Worker background sync |
| π 6 UN Languages | AR (RTL), ZH, EN, FR, RU, ES β full layout switching |
| π Anonymous Reporting | No PII ever required or stored |
| π Coordinator Dashboard | Vetting queue, analytics charts, spatial heatmaps |
| π¦ GIS Export | CSV, GeoJSON, Shapefile, GeoPackage, REST API |
| π Gamification | Badge rewards on verified submissions (anti-spam design) |
| π Report Versioning | Same-building submissions tracked with full damage history |
Frontend
- React 19 + Vite 8
- Leaflet.js + React-Leaflet (interactive maps)
- TensorFlow.js + COCO-SSD (on-device AI)
- Progressive Web App (Service Worker + IndexedDB)
Backend
- Google Cloud Firestore (auto-scaling NoSQL)
- Firebase Storage (photo hosting)
- Firebase Auth (anonymous + email/password)
- Firebase Hosting (global CDN)
Export / GIS
- GeoJSON, Shapefile (shpjs), GeoPackage, CSV
- RAPIDA-compatible data schema
- Node.js 18+
- npm 9+
- A Firebase project (or use Mock Mode without one)
git clone https://github.com/YOUR_USERNAME/crisismap.git
cd crisismapnpm installcp .env.example .envEdit .env with your Firebase project credentials.
Leave it empty to run in Mock Mode (local storage, no Firebase needed).
npm run devnpm run buildnpx firebase deploy --only hostingcrisis-map/
βββ public/ # Static assets, PWA manifest, service worker
βββ src/
β βββ components/ # Reusable UI components (Navbar, Map, Toast...)
β βββ pages/ # Route-level pages (Home, Report, Map, Admin...)
β βββ services/ # Firebase, AI classifier, report service
β βββ utils/ # Constants, translations, mock footprints
β βββ App.jsx # Root component + routing
βββ .env.example # Environment variable template
βββ firestore.rules # Firestore security rules
βββ storage.rules # Firebase Storage security rules
βββ firebase.json # Firebase hosting config
βββ vite.config.js # Vite build config
Copy .env.example to .env and fill in your Firebase config:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idNote: If these are missing, the app runs in Mock Mode using localStorage β fully functional for demos without a Firebase account.
- Community reporters use anonymous authentication β no email, name, or personal data required
- Coordinates are anonymized to the building footprint centroid β individual GPS precision never stored
- Firestore security rules prevent reporters from reading other reports
- Only coordinators with verified email credentials can access the vetting dashboard
- All data transmitted over HTTPS / TLS 1.3
Every submitted report stores:
{
"damageSeverity": "completely_damaged",
"infrastructureTypes": ["community"],
"infrastructureName": "St. FranΓ§ois Clinic",
"crisisTypes": ["earthquake"],
"debrisRequired": "yes",
"description": "Free text in any language",
"lat": -18.7443,
"lng": -72.3384,
"footprintId": "way/123456789",
"createdAt": "2025-01-15T14:23:00Z",
"aiConfidence": 0.87,
"status": "verified",
"buildingVersionHistory": [...]
}- Fork this repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "feat: add your feature" - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
This project is licensed under the MIT License β see LICENSE for details.
Built for UNDP's humanitarian mission. Free to use, adapt, and deploy for crisis response.
- UNDP RAPIDA β Rapid Post-Crisis Integrated Digital Assessment
- HOT OpenStreetMap β Building footprint data
- Microsoft ML Building Footprints β Global footprint coverage
- TensorFlow.js β On-device AI inference
- Leaflet.js β Interactive maps