Offline-first PWA crop disease advisor for smallholder farmers in Uasin Gishu County, Kenya
# FieldMate
**AI-enabled crop disease advisor for smallholder farmers**
FieldMate is a mobile-first Progressive Web App (PWA) built for farmers in **Uasin Gishu County, Kenya**. Farmers photograph crop leaves to identify diseases, get bilingual treatment advice (English & Kiswahili), check weather-related outbreak risk, and keep scan history offline.
**Repository:**
github.com
---
## Features
### For farmers
- **Leaf disease detection** — on-device TensorFlow.js model (PlantVillage-trained) for maize, potato, and tomato
- **Advisory fallbacks** — optional Claude Vision API, or built-in disease knowledge base (demo mode)
- **Bilingual UI & voice** — English / Kiswahili guidance for low-literacy users
- **Weather & disease risk** — Open-Meteo climate data for Eldoret / Uasin Gishu
- **Scan history & PDF reports** — save diagnoses locally and export printable advice
- **Offline-first PWA** — IndexedDB storage; installable on phone home screen
- **Secure auth** — register / login / forgot password with hashed passwords
### For administrators
- **User management** — view, edit, reset password, and delete farmer accounts
- **Disease catalog** — add, edit, or remove crop disease advisories used by the app
- **Reports dashboard** — scans by crop, disease, severity, and time range; export PDF summary
- **Enrolment & backup** — register Uasin Gishu pilot farmers; export/import JSON backups
- **Optional Claude API key** — enable live AI analysis when online
---
## Tech stack
| Layer | Technology |
|--------|------------|
| UI | React 19, TypeScript, Tailwind CSS, Vite |
| Routing | React Router |
| ML | TensorFlow.js (browser inference) |
| Storage | IndexedDB (`FieldMateDB`) |
| PWA | `vite-plugin-pwa` (service worker + install prompt) |
| Weather | Open-Meteo API |
| Reports | jsPDF |
| Deploy | Vercel (static SPA) |
---
## Getting started
### Requirements
- Node.js 18+ (20+ recommended)
- Chrome recommended for camera / PWA demos
### Install …