Inspiration

Smallholder farmers across Kenya and Africa in general lose crops and livestock to weather they never saw coming, and most tools built to warn them assume a smartphone and reliable internet, things a lot of farmers don't have. I wanted something that works over USSD on a basic phone just as well as it works on the web.

What it does

ANGA delivers real-time weather forecasts, early-warning alerts (heat, frost, drought, heavy rain), an AI farming assistant, and livestock tracking with heat-stress alerts tailored to the animals a farmer actually keeps. All of it works over USSD, web, and a mobile app.

How I built it

  • Backend: FastAPI + SQLAlchemy, deployed on Render
  • Forecasting: Prophet models trained on real historical weather data, backed by live Open-Meteo data
  • AI assistant: Groq's LLaMA-3, personalized with each farmer's registered livestock and location
  • USSD: Africa's Talking gateway, so it works on any phone
  • Web and mobile: Flutter, sharing the same backend

Challenges I ran into

This was less "build the feature" and more "keep the thing alive":

  • The AI assistant was returning 503s in production, a broken import path, not the API key I first suspected
  • The ML model files got corrupted; I retrained real Prophet models on real historical data instead of patching the old ones
  • Midway through, my Azure subscription got disabled and the backend went dark with no warning
  • Moved to Fly.io, then my card got declined there too ended up on Render
  • Found out the production Docker image had quietly been running a stripped-down debug stub for months instead of the real app
  • Discovered the Netlify site was never connected to GitHub, every commit I'd pushed had done nothing to production
  • Netlify's proxy to Render silently hung instead of failing loudly, an SNI/host-routing mismatch fixed by calling the backend directly

What I learned

Free and student-tier infrastructure disappears without warning, and a product for farmers can't afford silent downtime. I also learned to verify every claim against the actual running code instead of trusting old configs several "working" features turned out to be dead stubs nobody had checked in months.

What's next for Anga

NVIDIA Earth-2 km-scale forecasting, Google Earth Engine satellite data, deeper agronomy and soil advisory, and SMS/WhatsApp alerts.

Built With

Share this project:

Updates

Submission history