Africa Shield AI - Last-Mile Alert AI flood early-warning prototype
# Africa Shield AI
**Big vision:** Africa Shield AI predicts natural disasters (floods,
droughts, heatwaves, wildfires, cyclones, earthquakes) across Africa and
sends early warnings to at-risk communities before disasters happen,
prioritizing accessibility for people without smartphones or reliable
internet. **Scoped hackathon demo:** "Last-Mile Alert AI" — flooding
only, working end-to-end: a rules-based flood risk score shown alongside
a genuine trained ML model as a second opinion, an API that turns the
result into a human-readable alert, translation into a local African
language, real SMS/voice-call alerts (with USSD self-service to check
risk or subscribe) via Africa's Talking — voice covering people a
text-only channel doesn't reach — and a live IoT sensor ingestion
endpoint, demoed via a Wokwi ESP32 simulation, all shown on a simple web
dashboard. **Future:** expand to the other hazards, train the ML model on
real historical data instead of synthetic data, real ESP32 hardware
instead of the Wokwi simulation, and an offline-first mobile app (see
Future Improvements below).
Built for the **"AI for All Hackathon: Building Inclusive Solutions for
Early Warning and Disaster Resilience,"** organized by the African Youth
Advisory Board on Disaster Risk Reduction (AYAB-DRR) under the African Union.
## Status: backend + frontend both real, alerts send for real, IoT ingestion live (updated 2026-08-17)
- **Backend risk scoring and translation are real**, not stubbed.
`POST /api/risk-check` and `GET /api/regions` compute live from the
rules-based model in `backend/app/models/risk_model.py` and the
hardcoded translation dictionary in `backend/app/models/translations.py`.
See `docs/progress-log.md` for thresholds,
assumptions, and what's still unverified.
- **A second, genuinely trained ML model now runs alongside the
rules-based one** (`ml_risk_level`/`ml_risk_score`, additive fields on
both endpoints) — a `scikit-learn` logistic regression, trained on
synthetic data …