Inspiration
Millets are climate-resilient superfoods essential to nutritional security and sustainable agriculture. However, smallholder millet farmers in India face severe challenges: heavy reliance on middlemen who capture up to 45% of margins, lack of real-time market price intelligence leading to distress sales, language barriers in accessing scientific agronomy advice, and opacity across the supply chain.
We were inspired to build the Millets Value Chain Platform (MVCP) to eliminate information asymmetry, connect farmers directly to domestic processors and global exporters, provide AI-powered price forecasting, and establish cryptographic QR-code batch traceability from farm to fork.
What it does
MVCP v2.0.0 is an end-to-end, AI-integrated digital agricultural ecosystem that provides:
- ** Direct Millet Marketplace & Multi-State Order Flow**: Connects farmers directly with retail consumers, FPOs, and bulk exporters, eliminating intermediaries with transparent pricing.
- ** AI Mandi Price Intelligence & Forecasting**: Ingests Agmarknet historical and live wholesale prices across Indian APMC mandis and predicts 7-to-30 day price trends using machine learning models ($R^2 = 0.912$, $\text{MAPE} < 7.82\%$).
- ** 23-Language Conversational Agronomy Advisory**: An AI chatbot powered by Google Gemini Pro and domain-specific RAG that answers crop management questions and matches eligible government subsidy schemes (NFSM, PM-KISAN, AIF) in 22 scheduled Indian languages + English.
- ** QR-Code Provenance & Batch Traceability**: Generates tamper-proof QR codes for each harvest batch, recording GPS farm origin, quality grading, processing milestones, and logistics audit trails.
- ** Geospatial Exporter Matchmaking**: Automatically pairs millet producers with the nearest active export hubs using Haversine distance calculations.
- ** Integrated Electronic Payments**: Seamless online checkouts with Razorpay, HMAC-SHA256 signature verification, and automated transaction ledgers.
- ** Admin Command Center**: A centralized moderation dashboard for verifying product listings, managing user accounts, and monitoring microservice telemetry.
How we built it
We engineered MVCP using a scalable, distributed microservices architecture:
- Frontend Application: Built with React 19, Vite, Vanilla/Tailwind CSS, Lucide Icons, and Recharts 3.x for dynamic price charts. Multilingual support across 23 languages is powered by i18next.
- API Gateway & Service Discovery: Powered by Spring Cloud Gateway (Port 8080) for reactive routing and unified JWT security, registered with Spring Cloud Netflix Eureka (Port 8761).
- Core Microservices: Developed with Java Spring Boot 3.2:
auth-service(Port 8081): Stateless JWT auth (HMAC-SHA256), BCrypt hashing, and role-based access control (FARMER, PROCESSOR, EXPORTER, BUYER, ADMIN).marketplace-service(Port 8082): Product listings catalog and order lifecycle state machine.payment-service(Port 8083): Dedicated Razorpay SDK integration and payment transaction ledger.price-service&traceability-service(Ports 8083 & 8084): APMC data aggregation and cryptographic QR code generation.
- AI/ML Engine: Built with Python 3.11 and FastAPI (Port 8000), utilizing Scikit-Learn regression models for price predictions and Google Gemini Pro with agricultural RAG for localized advisory.
- Database Layer: MongoDB 7.0 NoSQL document stores (
mvcp_auth,mvcp_marketplace,mvcp_payments) ensuring high throughput and flexible schema persistence. - Containerization: 100% containerized with Docker and multi-service Docker Compose orchestration.
Challenges we ran into
- Multilingual Agronomy Accuracy: Rural farmers use localized dialectal names for millets (e.g., Ragi, Kelvaragu, Mandua). We mapped domain glossaries into the prompt context to ensure the Gemini model recognized regional terminology accurately across 23 languages.
- Real-Time Price Trend Modeling: Agricultural commodity prices fluctuate with weather and seasonal arrivals. We combined historical Agmarknet time-series with lag features and moving averages to minimize MAPE under 8%.
- Distributed Microservice State Consistency: Managing order states across multiple independent services and payment callbacks required implementing idempotent webhooks and state validation machines.
Accomplishments that we're proud of
- Delivering full localization for 23 Indian languages covering all 22 Eighth Schedule languages + English.
- Seamless end-to-end integration of Spring Boot Java microservices with a high-speed Python FastAPI AI engine.
- Instant, cryptographically verifiable batch QR traceability linking consumer packages directly back to farm GPS coordinates.
- Fully working test-mode Razorpay checkout integration with automated payment verification.
What we learned
- Designing robust microservices with Spring Cloud Gateway, Eureka discovery, and JWT stateless authentication.
- Efficient prompt engineering and context grounding with Google Gemini Pro for domain-specific agricultural advisory.
- Geospatial querying and Haversine distance computations for supply chain optimization.
What's next for Millet Value Chain Platform
- IoT Smart Silo Integration: Integrating temperature and humidity sensors in grain warehouses for automated shelf-life tracking.
- Smart Contract Verification: Transitioning QR traceability hashes to an Ethereum/Polygon-based ledger for immutable export certification.
- Voice-First Audio Interface: Enabling two-way speech input/output in local dialects for low-literacy farmers.
Log in or sign up for Devpost to join the conversation.