Farm intelligence dashboard for East African smallholder farmers.
# FarmPulse
**Farm intelligence dashboard for East African smallholder farmers.**
FarmPulse combines real-time weather forecasting with AI-powered tree canopy analysis to deliver actionable, context-aware insights — not just data. Instead of showing a farmer "rain is coming" and "12 trees need care" separately, FarmPulse cross-references both to surface recommendations like *"rain expected Thursday — ideal conditions to replant the 4 flagged trees."*
Built as a technical assessment integrating the WeatherAI API.
**Live demo:** farmpulse-1.onrender.com
**Backend:** farmpulse-l2c0.onrender.com
---
## Features
- **Current conditions** — temperature, humidity, wind, UV index, with Gemini AI summary
- **7-day forecast** — daily breakdown with precipitation probability
- **Auto-detect location** — uses WeatherAI's IP geo-detection to find the user's farm region automatically
- **Farm tree analysis** — upload a drone or satellite image to get tree count, canopy coverage, health breakdown (healthy / needs care / needs replacement), and agronomic recommendations powered by OpenCV + Gemini
- **Insight Banner** — cross-references weather forecast and tree health to generate combined, actionable farm recommendations
- **Annotated overlay** — visual output showing detected tree crowns on the uploaded image
---
## Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React, Vite |
| Backend | Node.js, Express |
| Image handling | Multer (memory storage) |
| HTTP client | Axios |
| API | WeatherAI (`/v1/weather`, `/v1/weather-geo`, `/v1/trees/analyze`) |
| Frontend deploy | Netlify |
| Backend deploy | Render |
---
## Architecture
```
Client (React + Vite)
│
│ GET /api/weather?lat=&lon=
│ GET /api/weather/current
│ POST /api/trees/analyze (multipart/form-data)
▼
Express Proxy (Node.js) ← API key lives here only
│
│ Authorization: Bearer wai_...
▼
WeatherAI API (api.weather-ai.co)
```
The backend is a deliberate thin proxy — its only responsibility is …