# ShambaSauti
Climate intelligence and AI advisory platform for farmers and pastoralists.
Pilot region: Eldoret, Uasin Gishu County, Kenya.
## Architecture
Every page gets its data from one place — nobody calls an external API directly.
```
Landing Page ─┐
Dashboard ────┼──► /api/climate ──► lib/climate-engine.ts ──► Open-Meteo
SMS Engine ───┘ └─► Open-Meteo Air Quality
/api/advice ──► lib/ai-advisory.ts ──► Gemini
/api/satellite ──► lib/sentinel.ts ──► Sentinel Hub
/api/sms/send ──► lib/sms.ts ──► Twilio
/api/reports ──► lib/supabase/* ──► Supabase
```
## What's live right now (zero API keys needed)
- **Weather, forecast, historical rainfall, air quality** — 100% real, from
Open-Meteo and its Air Quality API. No key required.
- **Risk engine** — dry-spell, heavy-rain, spraying suitability, fall-armyworm,
and livestock heat-stress, computed from the live data above.
- **Live interactive map** — MapLibre GL JS on real OpenStreetMap tiles.
- **Geocoding** — OpenStreetMap Nominatim, for searching locations like
"Nakuru" or "Kitale" (`lib/climate-engine.ts: geocodeLocation`).
- **Every dashboard page** — Dashboard, Weather, Satellite Maps, Rainfall,
Pest Alerts, AI Advice, Messages, Reports, Farm Profile, Settings. No 404s.
## What needs your API keys to go live
Every integration below is fully coded and real — it just reports itself as
"not configured" and shows no fake data until you add its keys. Copy
`.env.example` to `.env.local` and fill these in as you create accounts:
| Integration | Env vars | Get it at |
|---|---|---|
| Gemini (AI advice) | `GEMINI_API_KEY` |
aistudio.google.com |
| Sentinel Hub (satellite, NDVI) | `SENTINEL_CLIENT_ID`, `SENTINEL_CLIENT_SECRET` |
sentinel-hub.com |
| Supabase (database, auth, reports) | `NEXT_PUBLIC_SUPABASE_URL`, `NEXT_PUBLIC_SUPABASE_ANON_KEY` |
supabase.com |
| Twilio SMS | `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO …