Africa's agritech ecosystem: From Seed to Sale. Connecting farmers to loans, insurance, and fair prices via web, mobile, and USSD.
# 🌱 Shamba — From Seed to Sale
> Africa's premier agritech ecosystem. Empowering smallholder farmers across East Africa with credit, insurance, marketplace access, and AI-driven insights.
---
## Why Shamba wins
| Problem | Shamba solution | Revenue stream |
|---|---|---|
| Farmers can't access credit | AI credit scoring → input loans | 12–18% interest + 1.5% origination fee |
| Crops lost to weather | Parametric insurance, auto-payout | 12% commission on 4% premium |
| Produce sold at exploitative prices | B2B marketplace with escrow | 7% transaction commission |
| No market data | Live prices across 15+ counties | Premium SaaS tier |
| Post-harvest loss | Verified cold storage directory | Lead-gen fees |
| Feature phone farmers excluded | Full USSD interface | Africa's Talking |
**Target market:** 5.4M smallholder farmers in Kenya alone. East Africa (KE/UG/TZ) = 15M+ farmers.
---
## Tech stack
| Layer | Technology | Deploy |
|---|---|---|
| API | Node.js · Express · Prisma · PostgreSQL | Railway |
| Web | React 18 · Vite · Tailwind CSS · shadcn/ui · React Query | Vercel |
| Mobile | Expo SDK 51 · React Native · Expo Router | EAS |
| Database | Supabase PostgreSQL | Supabase |
| Shared | TypeScript · Zod · pnpm workspaces | — |
---
## Project structure
```
shamba/
├── apps/
│ ├── api/ # Express REST API
│ │ ├── prisma/
│ │ │ ├── schema.prisma # 25 models, 8 domains
│ │ │ └── seed.ts # Realistic EA data
│ │ └── src/
│ │ ├── controllers/v1/ # 11 controllers
│ │ ├── routes/v1/ # 11 route files
│ │ ├── services/ # credit, weather, mpesa, predict, sms, jwt
│ │ ├── jobs/ # node-cron insurance checker + reminders
│ │ └── middleware/ # JWT auth, Zod validation, error handler
│ ├── web/ # React SPA
│ │ └── src/
│ │ ├── pages/ # 11 pages (dashboard → admin)
│ │ ├── components/ # AppLayou …