I'm building KamataShamba – an AI agricultural platform accessible via USSD on any basic phone.
The Problem
Kenyan smallholder farmers:
Lose 30-50% of potential income
Have no weather/pest alerts
Sell to middlemen at 50% below market
Can't access credit (no formal history)
60%+ use basic phones only
The Solution
Feature How Channel
Weather forecast AI + satellite USSD
Pest detection Image recognition WhatsApp
Marketplace Farmer → buyer direct USSD + Web
Credit scoring Platform activity Automatic
Loans/Insurance Partner integration USSD
The Stack
yaml
Channels:
USSD: Africa's Talking API
WhatsApp: Twilio/Meta
Mobile (future): Flutter
Web (buyers/admin): React
Backend:
API: Python/FastAPI
Cache/Queue: Redis
Primary DB: PostgreSQL
Time-series: TimescaleDB
ML:
Pest detection: TensorFlow (CNN)
Weather forecast: TensorFlow (LSTM)
Credit scoring: Scikit-learn
Infrastructure:
Cloud: AWS (EKS, RDS, S3)
Container: Docker
Payments:
M-Pesa API (C2B/B2C + escrow)
Questions for the Community
USSD scaling: Africa's Talking docs mention ~100 concurrent sessions. How do I handle 10,000+ farmers dialing in simultaneously during harvest?
Pest detection training: Public datasets (PlantVillage) have limited African crops. Should I partner with KALRO for labeled local data?
Matching engine (farmer → buyer): Need real-time matching by location, product, quantity, price. Redis sorted sets? Postgres LISTEN/NOTIFY? Kafka?
Offline challenges: Network in rural Kenya is unreliable. How should I design for offline-first?
Government APIs: Anyone worked with Kenya Space Agency or KAMIS APIs? Reliable?
This is open-source friendly. DM me if you want to contribute or collaborate
Top comments (0)