Inspiration
East Africa faces worsening climate disasters — floods, droughts, locusts — yet the people most at risk are the least connected. Early warning data exists (satellites, meteorological models) but rarely reaches rural communities with basic phones. We built Community Voice EWS to close that last mile.
What it does
A two-way SMS early warning system: people text disaster reports in English or Swahili ("mafuriko", "njaa", "wadudu"), the app classifies the event type and severity using NLP keyword matching, stores it with location data, and broadcasts alerts to everyone in the affected region. A live web map visualizes all reports in real time.
How we built it
- Backend: Python + FastAPI with SQLAlchemy (SQLite/PostgreSQL)
- Classification: Rule-based NLP (keyword + regex) supporting English and Swahili, with confidence scoring
- SMS: Africa's Talking API for sending/receiving texts; Twilio as fallback
- Geospatial: Integrated ICPAC climate data for drought index (CDI) and flood monitoring
- Frontend: Static HTML/CSS/JS with Leaflet.js map (served by FastAPI)
- Deployment: Render (free tier), CI/CD via GitHub Actions, 44 passing tests
Challenges we ran into
- Render upgraded to Python 3.14 mid-hackathon, breaking pinned dependencies — had to unpin all versions for wheel compatibility
- Africa's Talking sandbox webhook requires a public callback URL, tricky during early development
- Swahili NLP without ML training data forced us into a keyword-based approach with careful confidence thresholds to avoid false positives
- SQLite concurrency on free hosting needed connection pooling adjustments
Accomplishments that we're proud of
- Fully deployed and live on a public URL within hours
- 44/44 tests passing with flake8 clean and black-formatted code
- Dual-language support (English + Swahili) for real disaster keywords
- Integrated real ICPAC climate data alongside crowd-sourced reports
- SMS provider abstraction (Africa's Talking with Twilio fallback) ready for production
What we learned
- How to structure a FastAPI project for production (lifespan events, middleware, CORS, health checks)
- SMS gateway integration patterns — sync vs async, webhook parsing, delivery status callbacks
- That the last mile of early warning is not technology but accessibility: SMS beats every app
- Render blueprint deployment and the nuances of Python version management on PaaS
What's next for Community Voice EWS
- Fine-tune Swahili NLP with real community feedback and expand to more East African languages (Amharic, Somali, Oromo)
- Add WhatsApp integration via Africa's Talking Business API
- Onboard disaster management agencies as official alert broadcasters
- Build an admin dashboard for monitoring report trends and broadcasting regional alerts
- Offline-first mobile app for feature phone users (USSD fallback)
Built With
- africa's-talking
- css
- fastapi
- github-actions
- html
- icpac
- javascript
- leaflet.js
- markercluster
- natural-language-processing
- openapi
- pydantic
- pytest
- python
- render
- rest-api
- settings
- sms
- sqlalchemy
- sqlite
- twilio
- uvicorn
Log in or sign up for Devpost to join the conversation.