🌱 KrishiDrishti
कृषि दृष्टि — Crop Vision
AI-powered crop yield intelligence for India's districts. Built to bring data-driven agricultural insights to district planners, researchers, and farming advisory bodies across Assam and beyond.
CC BY-NC 4.095 Districts8 NE States12,350 Records5 Crops6 ML ModelsReal Weather + NDVI + ERA5Security HardenedB+ AuditOracle Cloud
🏗️ System Architecture
┌─────────────────────────────────────────────────────────┐ │ Oracle Cloud VM · Ubuntu 22.04 │ │ 80.225.195.96 │ │ │ │ ┌──────────┐ ┌─────────────────┐ ┌──────────────┐ │ │ │ │:80 │ │ │ │ │ │ │ Nginx │───▶│ Next.js 14 │ │ FastAPI │ │ │ │ Proxy │ │ + shadcn/ui │ │ Python 3.11 │ │ │ │ │───▶│ + Deck.gl │─▶│ + XGBoost │ │ │ └──────────┘ │ (port 3000) │ │ + LSTM │ │ │ └─────────────────┘ │ (port 8000) │ │ │ └──────┬───────┘ │ │ ┌─────────────────┐ ┌──────────────────┐ │ │ │ │ SQLite DB │ │ Model Store │◀──┘ │ │ │ (yield data, │ │ .pkl / .pt │ │ │ │ predictions) │ │ (Docker volume) │ │ │ └─────────────────┘ └──────────────────┘ │ └─────────────────────────────────────────────────────────┘
🔄 Data Pipeline
IMD Rainfall ──┐
ICRISAT Yield ─┤ ┌─ XGBoost (.pkl)
Google GEE ────┼──▶ Ingest Scripts ──▶ SQLite ─▶ Feature Eng. ──▶ LSTM (.pt)
GADM GeoJSON ──┘ (APScheduler) └─ SHAP Explain
│
┌─────────▼──────────┐
│ /api/predict/yield │
│ + confidence CI │
│ + SHAP features │
└────────────────────┘🤖 ML Pipeline
Phase 1 — Baseline
✓ XGBoost Regressor
✓ 11 tabular features
✓ GroupKFold on year
✓ SHAP explainability
✓ RMSE target < 300 kg/ha
Phase 2 — Temporal
✓ PyTorch LSTM
✓ 30-day weather sequences
✓ Rolling window features
✓ Monsoon onset lag
✓ SPI drought index
Phase 3 — Spatial
✓ Graph Neural Network
✓ District adjacency graph
✓ Spatial spillover effects
✓ Multi-crop ensemble
✓ All-India expansion
📊 Feature Engineering
rainfall_mmTotal seasonal rainfall
IMD
temp_mean_cMean growing season temperature
IMD
ndvi_peakPeak satellite greenness
MODIS/GEE
ndvi_meanMean NDVI during season
MODIS/GEE
spi_90Standardised Precipitation Index
Computed
growing_degree_daysAccumulated heat units > 10°C
Computed
rainfall_cvRainfall variability coefficient
Computed
prev_year_yieldLag-1 district yield
DB
district_avg_yieldLong-term district baseline
DB
temp_range_cDiurnal temperature range
IMD
year_normalizedLong-term trend signal
Computed
🛠️ Tech Stack
🗺️ Project Roadmap
✅
Phase 0
Project scaffold + documentation
✅
Phase 1
Backend API + SQLAlchemy models + Docker Compose
✅
Phase 2
Data ingestion — 27 districts, 648 yield records, GeoJSON
✅
Phase 3
Next.js frontend — dashboard, predict, districts, about
✅
Phase 4
Assam choropleth map + Recharts trend charts + About page
✅
Phase 5
Real XGBoost training + mobile responsiveness + SHAP
✅
Phase 6
Multi-crop (5 crops), year filter, CSV export, LSTM, model dashboard
✅
Phase 7
Real weather (Open-Meteo) + GEE MODIS NDVI + model retrain
✅
Phase 8
NE India expansion — 95 districts, 8 states, ERA5 soil moisture
✅
Phase 9
Security hardening + rate limiting + error boundaries + input validation
👨💻 Developers
👨💻
Kunal Kanti Paul
Senior Software Developer & Deputy Manager
Digital India Corporation
Ministry of Electronics & IT, Govt. of India
✓ Full-stack architecture & system design
✓ Oracle Cloud infrastructure setup
✓ Domain expertise — Assam agriculture
✓ Project vision & civic impact direction
🤖
Claude AI
AI Engineering Partner
Anthropic · Claude Sonnet 4.6
Human-AI Collaborative Development
✓ ML pipeline design & implementation
✓ FastAPI backend scaffolding
✓ Next.js frontend development
✓ Feature engineering & model strategy
A note on human-AI collaboration: KrishiDrishti was built entirely through conversational pair programming between Kunal and Claude AI — from architecture decisions and data pipeline design to Docker deployment and UI development. Every line of code was written, reviewed, and debugged collaboratively in real time. This project demonstrates the potential of human-AI collaboration for civic technology in India's agricultural sector.
Licensed under CC BY-NC 4.0 — free for non-commercial use with attribution.