Inspiration

India has 35,000+ Farmer Producer Organizations (FPOs), including 10,000+ government-supported FPOs, representing over 30 lakh farmers. The Government of India has invested ₹6,865 crore to strengthen the FPO ecosystem, yet many organizations still manage post-harvest operations using spreadsheets, WhatsApp messages, and paper records.

While researching India's agricultural supply chain, we discovered that most agri-tech solutions focus on improving crop production, but very few address what happens after the harvest—the stage that directly determines farmer income.

FPO managers repeatedly face the same challenges: identifying the best mandi after accounting for market prices, transport costs, commissions, payment reliability, and settlement delays; coordinating dispatches; managing farmer payouts; and maintaining financial records. Farmers often have less visibility into where their crops were sold, how settlement amounts were calculated, when payments will arrive, and whether they received fair market value.

This gap inspired CropChain OS—an AI-powered financial operating system designed to help FPOs maximize every harvest while giving every farmer complete transparency from harvest to payment.


What it does

CropChain OS digitizes the complete post-harvest lifecycle for Farmer Producer Organizations.

Complete workflow

Farmer Registration → Harvest Submission → Godown Verification → AI Mandi Optimization → Dispatch Tracking → Sale Recording → Automatic Farmer Payouts → Financial Ledger → Analytics & Credit Insights

For FPO Managers

  • Register and manage farmers
  • Verify harvests and godown inventory
  • Compare real mandi prices and trust scores
  • Receive AI-assisted mandi recommendations
  • Create and track dispatches
  • Record sales
  • Automatically calculate farmer settlements
  • Monitor analytics and FPO credit insights

For Farmers

  • Join an FPO using a secure code
  • Submit harvests digitally
  • Track harvest approval and dispatch status
  • View where crops were sold
  • See exactly how payouts were calculated
  • Access complete earnings and payment history

The heart of CropChain OS is its Trust Score Engine, which combines real mandi prices, payment reliability, commission rates, transport costs, and operational history to recommend the mandi expected to generate the highest net return. Every recommendation is accompanied by an AI-generated explanation, making decisions transparent and understandable.

Every financial transaction is recorded through an immutable event log and double-entry ledger, creating a complete audit trail from harvest submission to farmer settlement.


How we built it

CropChain OS was built as a cloud-native full-stack application focused on scalability, transparency, and production readiness.

Frontend (Vercel v0)

  • Next.js 15 App Router
  • React 19
  • TypeScript
  • Tailwind CSS
  • Framer Motion
  • React Leaflet

We designed two dedicated experiences:

FPO Manager Dashboard

  • Live mandi map
  • AI optimizer
  • Harvest management
  • Dispatch tracking
  • Sales management
  • Payout calculator
  • Credit score dashboard
  • Revenue analytics

Farmer Portal

  • Mobile-first interface
  • Multilingual support
  • Harvest submission
  • Dispatch tracking
  • Transparent payout history
  • Portable farmer records

Backend

Built using modular Next.js API Routes, powering authentication, harvest management, mandi optimization, dispatches, settlements, analytics, notifications, and credit scoring.

Database — AWS Aurora DSQL

Aurora DSQL is the foundation of CropChain's architecture.

Rather than storing isolated application records, we designed a relational database that models the complete operational workflow of an FPO.

Our architecture contains 17 relational tables covering:

  • Managers
  • FPOs
  • Farmers
  • Memberships
  • Harvests
  • Mandis
  • Mandi Prices
  • Trust Scores
  • Dispatches
  • Sales
  • Payouts
  • Ledger
  • Events
  • Credit Scores
  • Analytics
  • Notifications

The database enables complete traceability from harvest submission to final payment.

To support realistic recommendations, we populated Aurora DSQL with:

  • 1,614 real mandi locations
  • 3,657 real mandi price records

sourced from the official AGMARKNET government data.

AI

CropChain deliberately separates deterministic business logic from AI.

The backend first calculates:

  • Net selling price
  • Transport cost
  • Commission
  • Payment delay impact
  • Trust score

Only the top-ranked mandi recommendations are sent to Google Gemini, which explains why a mandi is recommended in natural language.

This approach keeps financial calculations deterministic, explainable, and auditable.

Deployment

CropChain OS is deployed on Vercel, with AWS Aurora DSQL connected using AWS IAM authentication via the @aws-sdk/dsql-signer pattern.


Challenges we ran into

Aurora DSQL transaction behavior

Aurora DSQL executes DDL statements independently. While importing our schema, we discovered that running multiple CREATE TABLE statements together did not behave as expected. We redesigned our workflow to execute statements individually and built a custom Node.js importer that automatically refreshed IAM authentication tokens during large data imports.

Event sourcing on a relational database

Designing an immutable financial audit trail required careful schema planning. We implemented append-only event logging together with double-entry accounting so every harvest, sale, and payout remains fully traceable.

Building a two-sided platform

FPO managers require data-rich operational dashboards, while farmers need extremely simple web workflows. Building both experiences on top of the same backend required an API-first architecture with reusable business logic.

Processing real market data

Integrating official mandi data required processing hundreds of thousands of government records, identifying unique markets, mapping GPS locations, and preparing optimized datasets suitable for production use.


Accomplishments that we're proud of

  • Built a complete post-harvest operating system instead of a single-feature prototype.
  • Designed a scalable 17-table Aurora DSQL relational database modeling real FPO operations.
  • Integrated 1,614 real mandis with 3,657 real market price records.
  • Developed an explainable AI-powered Trust Score Engine.
  • Built separate role-based experiences for FPO managers and farmers.
  • Implemented transparent settlements with complete financial traceability.
  • Successfully deployed a production-ready cloud-native application on Vercel.

What we learned

This project taught us that building production-ready software is far more than integrating AI.

We learned that thoughtful database design becomes the foundation of every application decision, that deterministic systems and AI are strongest when combined, and that transparency is just as important as automation in financial workflows.

Most importantly, we learned that solving meaningful problems requires understanding the daily realities of the people using the software—not just the technology behind it.


What's next for CropChain OS

Our vision is to make CropChain OS the digital operating system for Farmer Producer Organizations across India.

Our roadmap includes:

  • Live AGMARKNET price synchronization
  • AI-powered price forecasting
  • Automated UPI farmer settlements
  • Voice-assisted multilingual workflows
  • WhatsApp-based harvest submission
  • Multi-FPO benchmarking
  • Credit and lending integrations
  • Native mobile applications

Market Opportunity

  • 30 Lakh+ Farmers Represented across 35,000+ FPOs (including 10,000+ government-supported)
  • ₹6,865 Crore invested by the Government of India in the FPO ecosystem
  • $471 Billion projected value of India's agriculture market
  • ₹4,84,000 Crore cumulative trade through the e-NAM mandi network

We believe CropChain OS can become the operational software layer that enables FPOs to manage post-harvest operations more efficiently while giving every farmer complete confidence in every harvest, every sale, and every payment.

Built With

Share this project:

Updates