Inspiration We were inspired by the intersection of two critical global challenges: climate change and agricultural sustainability. India's farming communities are both vulnerable to climate impacts and key agents in carbon sequestration through soil health. Yet farmers had no accessible way to monetize this environmental value. The breakthrough came when we discovered that soil health could be quantified through spectroscopy data and predicted using machine learning—specifically Partial Least Squares Regression (PLSR) models. This opened a path: what if we could bridge soil science, AI, and financial incentives to create a carbon credit marketplace? We built AgroGreenBits to answer: Can technology empower farmers to earn revenue by improving soil health while helping companies achieve verified carbon offsets?
What it does AgroGreenBits is a full-stack AI carbon credit platform with three key components: For Farmers: -Register farms and input spectroscopy sensor readings (AS7341 sensors measuring reflectance across 11 wavelengths) -AI models instantly predict Soil Organic Carbon (SOC) levels from sensor data -Auto-calculate carbon credits based on SOC predictions (1 credit = 1 tonne CO₂ equivalent) -List credits on the marketplace and track earnings For Companies (Buyers): -Browse verified carbon credits with location, farm details, and environmental metrics -Purchase credits directly from farmers with transparent pricing -Track carbon portfolio and offset achievements -Generate compliance reports For Administrators: -Verify farms and their carbon credit claims -Manage marketplace integrity -Monitor platform statistics
How we built it Architecture: -Backend: Node.js + Express.js with MongoDB for persistence -Frontend: Responsive SPA (Single Page Application) in vanilla HTML/CSS/JavaScript with Chart.js visualization -Authentication: JWT-based role authorization (Farmer/Buyer/Admin roles) -AI/ML: Python-based PLSR models with scikit-learn Key Technical Implementations: -PLSR Model Training: Trained on OSSL (Open Soil Spectral Library) dataset with 5k+ samples -Spectroscopy Integration: AS7341 sensor data (11 wavelength bands) as model input features -Live Predictions: Real-time SOC prediction via /api/ai/predict endpoint -Role-Based Dashboards: Dynamic UIs for Farmer/Buyer/Admin workflows -Verification System: Admin dashboard with farm verification modal and status tracking Database Design: -User schema with roles and authentication -Farm schema linking to SOC readings and carbon credits -Transaction schema for marketplace purchases
Challenges we ran into
Challenge 1: Spectroscopy Data Complexity -Problem: OSSL dataset had inconsistent wavelength ranges; preprocessing required normalization -Solution: Built data pipeline with wavelength interpolation and feature scaling Challenge 2: PLSR Model Accuracy -Problem: Initial models (R² ~0.65) weren't reliable enough for carbon credit claims -Solution: Expanded training data, added cross-validation, achieved R² ~0.82+ Challenge 3: Real-Time ML Predictions -Problem: Python models needed integration with Node.js backend without latency -Solution: Pre-loaded trained models in memory; created /api/ai/predict endpoint with <500ms response Challenge 4: Farm Verification Trust -Problem: How to ensure farmers didn't falsify sensor data? -Solution: Implemented admin verification workflow with notes; future: blockchain timestamps Challenge 5: Responsive UI for Complex Data -Problem: Visualizing spectral data + charts + marketplace in single SPA -Solution: Built modular dashboard with tab-based navigation; used Chart.js for multi-metric visualization
Accomplishments that we're proud of -End-to-end working platform — From sensor data to carbon credit purchase, fully functional -AI/ML integration — PLSR model achieving production-quality SOC predictions -Role-based access control — Secure marketplace with farmer/buyer/admin separation -Admin verification system — 7-farm database with 5 verified farms ready for trading -Comprehensive documentation — 15+ guides including testing, API docs, and integration specs -Demo accounts & data — Pre-populated 869 carbon credits across 7 farms for immediate testing -Interactive visualizations — Real-time spectral plots and portfolio charts -Cloud-ready architecture — Firebase integration and MongoDB for scalable data persistence
What we learned -Soil science + AI = Game changer — Spectroscopy provides objective, quantifiable proxy for soil health -PLSR models are powerful but finicky — Feature engineering and data quality matter more than model complexity -Trust requires transparency — Farmers and companies need audit trails; verification workflows build confidence -Full-stack JavaScript is pragmatic — Vanilla JS frontend + Node.js backend minimizes context switching, speeds development -Documentation is deployment — Comprehensive guides made testing and iteration significantly faster -Real-world data is messy — Public datasets (OSSL) require extensive preprocessing; worth the effort -Role-based architecture scales — Separating Farmer/Buyer/Admin workflows makes feature additions cleaner
What's next for AgroGreenBits – Carbon Credits Phase 2 (Near-term): -Blockchain verification — Timestamp & sign carbon credit transactions for immutability -Mobile app — Native Android/iOS for on-farm sensor data capture
- Multi-language support — Hindi, Tamil, Telugu for Indian farmer accessibility -Advanced analytics — Farmer dashboard showing SOC trends over time, credit accrual projections Phase 3 (Medium-term): -Integration with carbon brokers — API for bulk corporate purchases -Farmer education portal — Guides on improving SOC through regenerative practices -Satellite + drone integration — Multi-modal data (spectroscopy + remote sensing) for richer models -Microfinance integration — Credits as collateral for farmer loans Phase 4 (Long-term): -Global expansion — Adapt models for different soil types, climates, regions -Advanced AI — Deep learning for multi-sensor fusion; predictive carbon accrual forecasting -Tokenization — Fractional carbon credits as tradeable tokens -Compliance reporting — ISO 14064-2, Verified Carbon Standard (VCS) alignment for institutional buyers
Log in or sign up for Devpost to join the conversation.