Intelligent Geo-Spatial Afforestation Planning
An MVP for Smart India Hackathon 2026 (Internal Qualifying Round). Given any location on a map + a carbon offset target, returns:
| Layer | Tech |
|---|---|
| Frontend | Next.js 14, React-Leaflet, Recharts |
| Backend | FastAPI, SQLAlchemy, Pydantic v2 |
| Database | PostgreSQL (Neon/Supabase for prod) |
| Geo Data | Google Earth Engine (NDVI, CHIRPS, SoilGrids, ESA WorldCover) |
| ML | Scikit-learn / XGBoost (species suitability scoring) |
| Deploy | Vercel (frontend) + Render (backend) + Docker |
canopy-sense/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # Route handlers
│ │ ├── core/ # Config, settings
│ │ ├── db/ # SQLAlchemy models, session, init
│ │ ├── models/ # Pydantic schemas
│ │ └── services/ # GEE, species scoring, carbon calc
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/ # Next.js frontend
├── data/ # Species dataset (CSV + seed script)
├── ml/ # Model training scripts
└── docker-compose.yml
git clone <repo-url>
cd canopysense
cp backend/.env.example backend/.env
# Edit backend/.env with your DB URL and GEE credentials
docker-compose up --build
docker exec canopy_sense_backend python -m app.db.init_db
docker exec canopy_sense_backend python data/seed_species.py
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/analyze-location |
Main analysis endpoint |
| GET | /api/v1/species |
List all species in dataset |
| GET | /api/v1/demo-locations |
Pre-cached demo locations |
| GET | /health |
Health check |
POST /api/v1/analyze-location
{
"lat": 28.6139,
"lon": 77.2090,
"carbon_target_tonnes": 100.0
}
| City | Lat | Lon | Zone |
|---|---|---|---|
| Delhi | 28.6139 | 77.2090 | Semi-arid, BSh |
| Bangalore | 12.9716 | 77.5946 | Tropical savanna, Aw |
| Chennai | 13.0827 | 80.2707 | Tropical wet/dry, Aw |
Built for SIH 2026 Internal Hackathon — Smart Automation theme.