FarmIQ — AI-powered super-app for African smallholder farmers. Crop disease diagnosis via photo, weather forecasts, market prices, and tool sharing. Built with Gemini AI and runs on low-end phones. Free and open source.
# 🌱 FarmIQ — The African Farmer's Super-App
One app that replaces the need for an agronomist, a weather station, a market trader, and a farming advisor — powered by **Gemini AI**, working across Africa on low-end phones.
---
## ✨ Features (Built with Gemini AI)
| Module | Status | Tech |
|--------|--------|------|
| 🔬 **AI Crop Doctor** | ✅ Ready | Gemini Vision API — snap photo → diagnosis + treatment |
| ☁️ **Weather Forecast** | ✅ Ready | Open-Meteo + alerts (heavy rain, heat, drought risk) |
| 🌾 **Grow & Yield** | ✅ Ready | Planting calendar, care reminders, crop rotation, post-harvest tips |
| 🛒 **Market Prices** | 🧪 Demo | Placeholder — hook up crowdsourced data |
| 🚜 **Tool Sharing** | ✅ Ready | List/book tractor, sprayer, harvester, pump — GPS, ratings |
| 🎙️ **Voice Assistant** | ✅ Ready | Speak → Gemini answers → spoken reply (Hausa, Yoruba, Igbo, Pidgin, French, Arabic, Swahili) |
| 👥 **Farmer Community** | 📋 Planned | Supabase-backed forum |
---
## 🚀 Quick Start
### 1. Get a Gemini API Key (Free)
1. Go to Google AI Studio
2. Sign in with your Google account
3. Click **Create API Key**
4. Copy the key
### 2. Clone & Install
```bash
cd FarmIQ
cp .env.example .env
# Edit .env and add: GEMINI_API_KEY=your_key_here
npm install
```
### 3. Run
```bash
npm run dev
```
- **Frontend**:
localhost
- **API**:
localhost
### 4. Demo the Crop Doctor
1. Open
localhost
2. Go to **Crop Doctor**
3. Upload a photo of a plant leaf (or any crop image)
4. Select crop type (maize, cassava, yam, cocoa, sorghum, rice)
5. Click **Diagnose** — Gemini AI analyzes and returns diagnosis + treatment plan
---
## 📁 Project Structure
```
FarmIQ/
├── server/ # Backend (Express)
│ ├── index.js # API entry
│ └── routes/
│ ├── crop-doctor.js # Gemini Vision for crop diagnosis
│ ├── weather.js # Open-Meteo integration
│ └── market.js # Market prices (demo)
├── src/ …