Project Story: KrishiNexus AI & AuraFlow Ecosystem
What Inspired Us
In regional agricultural hubs like Feni, Bangladesh, local farmers pour their sweat into producing high-quality yields—Premium Miniket rice, Diamant Holland potatoes, and organic hybrid tomatoes. Yet, they face a recurring trap: a fragmented supply chain dominated by unpredictable middlemen, price manipulation, and severe post-harvest losses.
We asked ourselves: What if we could build a decentralized, transparent, and intelligent infrastructure that cuts out the exploitation and connects farmers directly to bulk B2B commercial entities?
This question inspired KrishiNexus AI. We set out to engineer a secure B2B digital supply chain, backed by an automated escrow system to protect payments, an automated logistics hub to ensure fair distribution, and a neural plant-pathology diagnostic layer (the AuraFlow AI engine) to shield farmers from devastating crop diseases.
How We Built It
We engineered the entire ecosystem from scratch using a high-performance, strictly typed full-stack architecture:
Frontend Framework: Built with Next.js 15 (App Router) and TypeScript for structural integrity, compiled over Vite for rapid layout prototyping.
Styling & UI: Crafted a custom, low-illumination dark workspace dashboard using Tailwind CSS and Lucide React icons to maximize outdoor readability for farmers on low-end mobile devices.
Backend & Database: Orchestrated using a modular Node.js and Express engine, managing complex operational state relationships securely with a relational MySQL database.
Neural Diagnostics & AI Feature Integration: Integrated the native Gemini API into our custom "Neural Crop Doctor" and symptom mapper to dynamically handle image-based leaf diagnostics and unstructured data ingestion on the fly.
Engineering Mathematical Models & Logic
To ensure structural fairness and eliminate manual errors, KrishiNexus relies on automated programmatic logic to evaluate marketplace metrics and logistics payouts.
- Dynamic Price Advisory Function
To help farmers avoid undercutting their hard work, the platform calculates a fair recommended price (Prec) based on the running average of baseline market prices (Mbase), localized demand multipliers (Dlocal), and historical weather anomalies (Windex):
Prec = (Average Market Price) × Dlocal × (1 + Windex)
- Programmatic Escrow & Logistics Distribution
When a merchant buys a listing, the total transaction value (Vtotal) is locked inside an automated escrow state. Upon digital cryptographic verification of arrival, funds are released split-second across multiple native endpoints via secure webhooks:
Logistics Fee (Flog) = round(Vtotal × 0.08)
Net Farmer Payout (Pfarmer) = Vtotal − Flog
This ensures that the logistics transporter is guaranteed exactly an 8% operational fee on heavy cargo transit, while the farmer receives their automated settlement instantly.
Challenges We Faced
Building an interdisciplinary application brought intense technical and structural hurdles:
Next.js Server-Side Hydration Mismatches: One of our immediate roadblocks was handling state hydration mismatches between the server and client runtime when initializing local system metrics. We resolved this by building strict hasMounted state gates via React useEffect loops to prevent UI cracks.
Asynchronous Escrow Webhooks: Designing robust multi-party states where order fulfillment updates automatically across three distinct system roles (Farmer → Merchant → Logistics Operator) required meticulous design patterns to prevent multi-threading resource locks.
AI Diagnostics Consistency: Fine-tuning the Gemini API prompt matrix to consistently generate structured medical feedback for rural crop leaves without hallucinating required strict JSON parsing controls and aggressive error boundary handling.
What We Learned
This project was a massive milestone for us as developers and student leaders. We learned how to write clean, maintainable, typed full-stack code and scale complex dashboard states seamlessly.
Beyond the technical code, it reinforced our passion for social entrepreneurship. We realized that technology is only as valuable as the real-world impact it creates for everyday people.
By building KrishiNexus AI, we proved that localized technology built within regional communities can directly solve systemic infrastructure challenges and empower farmers through transparency, security, and innovation.
Log in or sign up for Devpost to join the conversation.