Agriculture feeds the world, yet most farmers still make decisions in the dark.
- 📉 Yield losses are invisible until it's too late. Stress, drought, nutrient gaps — by the time you see them on the ground, the season is gone.
- 🛰️ Satellite intelligence is locked away. NDVI, soil data, climate history all exist — but they live in tools built for scientists, not growers.
- 💸 Smallholders can't afford agronomists. 500M+ small farms grow a third of the world's food, and most have no access to expert planning.
- 🌱 Climate change is rewriting the rules. Last year's plan doesn't work this year. Guessing is expensive.
AgriSense turns any phone or laptop into a satellite-powered agronomist.
Draw your field on the map. Within seconds, you get what used to take weeks: vegetation health from orbit, the soil under your feet, the weather above it, and an AI-generated crop plan that tells you what to plant, where, and when — with the numbers to back it up.
|
|
A real walkthrough — a 9.1-acre wheat farm in Lahore, Pakistan.
- Interactive Mapbox GL satellite map with polygon drawing
- Live NDVI overlay from Google Earth Engine
- Auto-detection of rural vs urban regions
- Fly-to animations, region search, side-by-side field comparison
Sentinel-2 imagery processed through GEE into NDVI — the gold standard for crop health.
NDVI = (NIR - Red) / (NIR + Red)
| NDVI | Meaning | Status |
|---|---|---|
< 0.2 |
Bare soil / critical | 🔴 |
0.2 – 0.4 |
Stressed | 🟠 |
0.4 – 0.6 |
Moderate | 🟡 |
> 0.6 |
Healthy | 🟢 |
Full pedological profile: pH, organic carbon, nitrogen, CEC, bulk density, sand/silt/clay texture, field capacity, wilting point — visualized.
ESA WorldCover 10m classification + a 6-axis suitability radar: soil, water, climate, topography, drainage, nutrients.
- Local agronomy engine — 50+ crop profiles scored against your field's signals, instantly.
- Gemini 2.5 Pro planner — full-field context, native-plant enforcement, zone allocation, intercropping, rotation, expert tips.
- Visual plan — every crop is a dot on your real field. Trees get bigger dots. Filter by crop.
We don't plan crops on a lake. Or a glacier.
| Blocked when | Threshold |
|---|---|
| 🌊 Water bodies | ≥ 80% water (WorldCover) |
| 🏜️ Extreme desert | < 50mm annual rain (CHIRPS) |
| ❄️ Polar | > 66° latitude |
| ⛰️ High altitude | > 5000m elevation |
| 🏙️ Urban | ≥ 30% built-up → switches to urban mode |
flowchart TD
U["👨🌾 You<br>browser / mobile"] --> FE
subgraph FE["🖥️ Frontend — React 18 + TypeScript"]
MAP["🗺️ Mapbox GL<br>satellite map + drawing"]
UI["📊 Dashboard<br>Recharts · Tailwind · shadcn"]
LOCAL["🧠 Local Agronomy Engine<br>50+ crop profiles"]
end
FE --> SB
subgraph SB["⚡ Supabase Edge Functions — Deno"]
A1["analyze-field"]
A2["gee-analytics"]
A3["ndvi-timeseries"]
A4["soil-data"]
A5["crop-planning"]
A6["gee-ndvi-tiles"]
A7["get-mapbox-token"]
end
SB --> EXT
subgraph EXT["🌐 Data & AI"]
GEE["🛰️ Google Earth Engine<br>Sentinel-2 · WorldCover · SRTM · CHIRPS"]
GM["🤖 Gemini 2.5 Pro<br>AI crop planner"]
OM["🌦️ Open-Meteo<br>weather + air quality"]
SG["🪱 ISRIC SoilGrids<br>soil @ 250m"]
MB["📍 Mapbox<br>geocoding + tiles"]
end
A5 --> GM
A2 --> GEE
A3 --> GEE
A6 --> GEE
A4 --> SG
A7 --> MB
UI --> OM
sequenceDiagram
actor F as 👨🌾 Farmer
participant M as 🗺️ Map
participant E as ⚡ Edge Functions
participant G as 🛰️ GEE / Gemini
participant P as 📊 Plan
F->>M: Draw field polygon
M->>E: Send coordinates
E->>G: NDVI + land use + soil + climate
G-->>E: Field signals
E-->>M: Analytics rendered
F->>M: Plan my crops
M->>E: Full field context
E->>G: Gemini 2.5 Pro reasoning
G-->>P: Zones, rotation, calendar, tips
P-->>F: Plan on map + PDF export
| Layer | Tech | Why |
|---|---|---|
| 🖥️ Frontend | React 18 · TypeScript 5 · Vite 5 | Type-safe and fast |
| 🎨 UI | Tailwind CSS 3 · shadcn/ui · Radix | Beautiful + accessible |
| 🗺️ Mapping | Mapbox GL JS 3 | Smooth 3D satellite rendering |
| 📊 Charts | Recharts | NDVI, climate, soil, suitability visuals |
| 🔄 State | TanStack React Query 5 | Smart caching, offline-friendly |
| ⚡ Backend | Supabase Edge Functions (Deno) | Serverless, low latency |
| 🛰️ Satellite | Google Earth Engine | Sentinel-2 · ESA WorldCover · SRTM · CHIRPS |
| 🤖 AI | Gemini 2.5 Pro | Context-aware crop planning |
| 🌦️ Weather | Open-Meteo | Forecast + 1-year archive + air quality |
| 🪱 Soil | ISRIC SoilGrids | Global soil @ 250m |
| 📄 Export | jsPDF | One-click crop plan PDF |
AgriSense/
├── 🖥️ src/
│ ├── components/ # MapView · FieldDetailView · CropPlanningSection · WeatherView
│ │ └── ui/ # shadcn/ui primitives
│ ├── data/ # 50+ crop profiles · field types
│ ├── hooks/ # mobile · swipe · toast
│ ├── lib/ # language · backend callers · cache
│ ├── pages/ # Index · NotFound
│ └── integrations/ # supabase client
├── ⚡ supabase/functions/ # 8 Deno edge functions
├── 🌐 api/ # serverless API endpoints
├── 🎨 public/ # logo · favicons · demo screenshots
└── 🗄️ supabase/migrations/# database schema
git clone https://github.com/theyapguard/AgriSense.git
cd AgriSense
npm installMAPBOX_TOKEN= # Mapbox map + geocoding
GEE_SERVICE_ACCOUNT_JSON= # Google Earth Engine key
GEE_PROJECT_ID= # GCP project with EE enabled
GEMINI_API_KEY= # Gemini 2.5 Pro🆓 Open-Meteo and ISRIC SoilGrids are free public APIs — no key needed.
npm run dev # frontend
supabase functions serve # edge functionsOpen http://localhost:5173 → draw a field → get your plan.
| UN SDG | How AgriSense helps |
|---|---|
| 🎯 SDG 2 — Zero Hunger | Higher yields through smarter crop choices |
| 💧 SDG 6 — Clean Water | 26% water savings in the sample plan |
| 🌍 SDG 13 — Climate Action | Climate-resilient rotation planning |
| 🌾 SDG 12 — Responsible Production | Right crop, right place — less waste |
AgriSense puts satellite intelligence in the hands of the people who need it most — small farmers, students, and communities — for free.
Theme: Earth Forward 🌍 Challenge: sustainable agriculture + climate resilience through technology Stack: React · TypeScript · Google Earth Engine · Gemini 2.5 Pro · Mapbox · Supabase
MIT — free to use, learn from, and build on.
AgriSense — because every field deserves a plan. 🌾
Made with 🛰️, 🤖, and ❤️ for the Earth.





