Virdis is a satellite-powered agricultural and land analytics platform that combines Sentinel-2 satellite imagery, Google Earth Engine processing, real-time weather data, soil science databases, and AI-driven crop planning into a single web dashboard.
Users draw polygonal regions on an interactive map and receive vegetation health analysis (NDVI), climate analytics, soil profiling, air quality data, land use classification, land suitability scoring, and AI-generated crop planning recommendations.
Virdis enables users to:
Sentinel-2 imagery is processed through Google Earth Engine to calculate the Normalized Difference Vegetation Index. This NDVI data is displayed as a semi-transparent raster layer above the satellite basemap,
NDVI = (NIR - Red) / (NIR + Red)
| NDVI Range | Vegetation Status |
|---|---|
| Below 0.2 | Critical / bare soil |
| 0.2 to 0.4 | Stressed vegetation |
| 0.4 to 0.6 | Moderate vegetation |
| Above 0.6 | Healthy vegetation |
Per-region weather analysis with current conditions, precipitation trends (incl. evapotranspiration), temperature ranges, soil moisture (surface & deep), and selectable date range
Air quality monitoring with AQI , PM2.5 levels, and color-coded indicators.
Soil data fetched from the ISRIC SoilGrids REST API at 250m resolution:
ESA WorldCover 10m land cover classification via Google Earth Engine:
Radar chart of six land suitability metrics :
Dual-approach crop planning system:
Local Agronomy Model
A client-side scoring engine with 50+ crop profiles that runs immediately:
Planner (Background)
Calls Google Gemini 2.5 Pro with full field context (NDVI, soil, weather, suitability, land use data). The AI response replaces the local model when available.
Crop Visualization
Plan Outputs
The system detects unsuitable regions and blocks crop planning:
| Edge Case | Detection Method | Threshold |
|---|---|---|
| Water bodies | ESA WorldCover "Water" land use percentage | 80% or more |
| Extreme deserts | Annual rainfall from CHIRPS via GEE | Below 50mm, or keyword match (Sahara, Atacama, etc.) |
| Polar regions | Average latitude of polygon coordinates | Above 66 degrees, or keyword match (Antarctica, etc.) |
| High altitude | Elevation from SRTM via GEE | Above 5000m |
| Urban regions | ESA WorldCover "Built-up" percentage | 30% or more (switches to urban analytics mode) |
User / Browser
│
▼
Frontend
React + Mapbox GL JS + Tailwind + shadcn
│
▼
Edge Functions (Supabase - Deno)
│
┌───────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┐
▼ ▼ ▼ ▼ ▼ ▼
Mapbox Token Field Analysis Land Analytics NDVI Tiles NDVI Series Soil Data
(Mapbox API) (GEE + AI) (GEE) (GEE) (GEE) (SoilGrids)
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
AI Crop Planning Land Use Tile Service Time-Series Soil Properties
(Gemini 2.5 Pro) + Suitability (250m)
│
▼
Crop Recommendations
│
▼
External Data Sources
│
┌───────────────┬───────────────┬───────────────┬───────────────┐
▼ ▼ ▼ ▼ ▼
Google Earth Open-Meteo SoilGrids Mapbox Sentinel-2
Engine (Weather) (Soil Data) (Maps API) ESA WorldCover
SRTM • CHIRPS
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + TypeScript 5 | UI framework with type safety |
| Build Tool | Vite 5 | Development server and production bundling |
| Styling | Tailwind CSS 3 + shadcn/ui (Radix primitives) | Utility-first CSS with accessible component library |
| Mapping | Mapbox GL JS 3 | Interactive 3D satellite map rendering |
| Charts | Recharts | Data visualization (area, bar, line, pie, radar charts) |
| Routing | React Router 6 | Client-side SPA navigation |
| Server State | TanStack React Query 5 | Async data fetching and caching |
| Backend | Supabase Edge Functions (Deno) | Serverless API endpoints |
| Satellite | Google Earth Engine | Sentinel-2 NDVI, ESA WorldCover, SRTM, CHIRPS |
| AI | Google Gemini 2.5 Pro | Crop planning and field analysis |
| Weather | Open-Meteo | Current forecast, historical archive, air quality |
| Soil | ISRIC SoilGrids | Soil properties (pH, carbon, nitrogen, texture) |
| jsPDF | Client-side PDF export of crop plans | |
| Animations | tailwindcss-animate | UI transition animations |
| Source | Resolution | Data Provided | Usage |
|---|---|---|---|
| Sentinel-2 (via GEE) | 10m multispectral | NIR and Red bands | NDVI vegetation health analysis |
| ESA WorldCover (via GEE) | 10m land cover | 11 land cover classes | Land use classification, urban/water detection |
| SRTM (via GEE) | 30m elevation | Digital elevation model | Elevation, slope, topography scoring |
| CHIRPS (via GEE) | 5km rainfall | Daily rainfall estimates | Annual precipitation for suitability analysis |
| Source | Endpoint | Data Provided | Usage |
|---|---|---|---|
| Open-Meteo Forecast API | /v1/forecast | Current temperature, humidity, wind, weather code, feels-like, soil moisture | Real-time conditions and soil moisture display |
| Open-Meteo Archive API | /v1/archive | Historical daily precipitation, temperature range, evapotranspiration, soil moisture | Climate analytics charts with configurable date range |
| Open-Meteo Air Quality API | /v1/air-quality | PM2.5, PM10, European AQI, US AQI | Air quality monitoring cards |
| Source | Endpoint | Data Provided | Usage |
|---|---|---|---|
| ISRIC SoilGrids | REST API at 250m resolution | pH, organic carbon, nitrogen, bulk density, CEC, sand/silt/clay texture, coarse fragments, water retention (field capacity, wilting point, available water) | Soil health profiling, texture pie chart, crop suitability input |
| Source | Data Provided | Usage |
|---|---|---|
| Mapbox GL JS | Vector and satellite tile rendering | Interactive map with satellite basemap |
| Mapbox Geocoding API | Forward and reverse geocoding | Location search bar, auto-detection of region location |
| Source | Model | Usage |
|---|---|---|
| Google Gemini 2.5 Pro | Large language model | Crop planning with native plant enforcement, field analysis, region-specific recommendations |
| Function | Method | Input | Output | External Calls |
|---|---|---|---|---|
| get-mapbox-token | POST | (none) | { token } | Reads MAPBOX_TOKEN secret |
| analyze-field | POST | polygon coordinates, field metadata, weather, soil data | NDVI stats + AI analysis text | GEE (Sentinel-2 NDVI), Gemini 2.5 Pro |
| gee-analytics | POST | polygon, analyses array | land_use, vegetation, suitability objects | Google Earth Engine (WorldCover, Sentinel-2, SRTM, CHIRPS) |
| gee-ndvi-tiles | POST | polygon, date | Tile URL template | Google Earth Engine |
| ndvi-timeseries | POST | polygon | 90-day NDVI array, growth stage, growth rate, canopy cover, biomass | Google Earth Engine (Sentinel-2) |
| soil-data | POST | lat, lon | classification, metrics, texture, water_retention | ISRIC SoilGrids REST API |
| crop-planning | POST | field name, crop, area, location, coordinates, NDVI/soil/weather/suitability data | zones, intercropping, rotation_plan, summary, tips, scores | Gemini 2.5 Pro |
| keepalive | GET | (none) | { status: "ok" } | (none) |
``` src/ ├── components/ │ ├── MapView.tsx # Main map with drawing, NDVI overlay, field rendering │ ├── MapToolbar.tsx # Left toolbar (zoom, draw, layers, NDVI, compass) │ ├── SidePanel.tsx # Right sidebar with field list & detail view │ ├── FieldDetailView.tsx # Per-field detail: weather, NDVI, soil, AI analysis │ ├── FieldCard.tsx # Compact field card for lists │ ├── FieldEditDialog.tsx # Edit field name, crop, color, group │ ├── FieldComparisonColumn.tsx# Side-by-side field comparison charts │ ├── WeatherView.tsx # Full analytics dashboard │ ├── CropPlanningSection.tsx # AI crop planning with map visualization │ ├── NewFieldDialog.tsx # Create new field from drawn polygon │ ├── SearchBar.tsx # Map search with geocoding │ ├── LocationAutocomplete.tsx # Location input with Mapbox suggestions │ ├── NdviLegend.tsx # NDVI color scale legend │ ├── Nd
$ claude mcp add Virdis \
-- python -m otcore.mcp_server <graph>