Blockchain-powered agricultural transparency from farm to table
A decentralized platform that tracks agricultural produce through the entire supply chain, ensuring transparency in pricing, quality, and origin verification.
SIH_project_demo.mp4
Problem Statement ID: 25045
Problem Statement Title: Blockchain-Based Supply Chain Transparency for Agricultural Produce
Create a blockchain-based system to track agricultural produce from farm to consumer, ensuring transparency in pricing, quality, and origin. The solution should allow stakeholders (farmers, distributors, retailers) to verify transactions and reduce exploitation in the supply chain.
A decentralized platform with a user-friendly interface for farmers and consumers to trace produce, reducing fraud and ensuring fair pricing, deployable on low-cost hardware or cloud infrastructure.
Leverages existing blockchain frameworks like Ethereum or Hyperledger, with smart contracts for automated tracking and QR code integration for consumer access.
Organization: Government of Odisha
Department: Electronics & IT Department
Category: Software
Theme: Agriculture, FoodTech & Rural Development
-
π Blockchain Integration
- Smart contracts for automated tracking and verification
- Deployed on Polygon network for low-cost, fast transactions
- Immutable records ensuring data integrity
-
π₯ Stakeholder Management
- On-chain registration for farmers, distributors, retailers, and inspectors
- Role-based access control and permissions
- Transparent ownership transfer tracking
-
π¦ Batch Tracking System
- Each harvest batch recorded with detailed metadata
- Hash-based verification for authenticity
- Complete supply chain journey tracking
-
β Quality Assurance
- Independent inspector verification system
- AI-powered harvest image validation
- Quality reports attached to each batch
-
π± QR Code Integration
- Instant access to complete product history
- Consumer-friendly verification interface
- Transparent pricing and origin information
-
π€ AI Validation (Coming Soon)
- Automated harvest image verification
- Invoice validation and fraud detection
- Smart anomaly detection
- Hybrid Data Storage: Essential data on blockchain, detailed information in database for cost optimization
- Low-Cost Infrastructure: Runs on Polygon for affordable, scalable deployment
- AI Integration: Validates harvest images and invoices automatically
- Multi-Stakeholder Design: Benefits farmers, distributors, retailers, consumers, and government
- QR Code Accessibility: Simple consumer verification without technical knowledge
- Next.js 14 - React framework for production-grade applications
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Shadcn/UI - Modern component library
- React Native (Expo) - Mobile app (Coming Soon)
- Node.js - JavaScript runtime
- Express.js - Web application framework
- TypeScript - Type-safe backend development
- JWT - Authentication & authorization
- PostgreSQL - Relational database
- Prisma ORM - Type-safe database client
- AWS S3 - File storage (Coming Soon)
- Polygon Network - Layer 2 scaling solution
- Solidity - Smart contract development
- Ethers.js - Ethereum interaction library
- Foundry - Smart contract development toolkit
- Anvil - Local Ethereum node
- Bun - Fast JavaScript runtime (backend)
- PNPM - Fast, disk space efficient package manager (frontend)
- Git - Version control
- Docker - Containerization (Coming Soon)
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- Bun (for backend) - Install Bun
- PNPM (for frontend) - Install PNPM
- PostgreSQL (v14 or higher)
- Git
git clone https://github.com/idityaGE/sih-project.git
cd sih-project# Navigate to backend directory
cd backend
# Install dependencies
bun install
# Copy environment variables
cp .env.example .env
# Configure your .env file with:
# - Database connection URL
# - JWT secrets
# - Blockchain RPC URLs
# - Private keys (for development only)# Start local development database
bun run db:dev
# Run database migrations
bunx prisma migrate dev --name init
# Open Prisma Studio (optional - database GUI)
bun run db:studio# Start local Ethereum node (in a new terminal)
anvil
# Deploy smart contracts (in another terminal)
cd ../blockchain
forge build
forge script script/Deploy.s.sol --rpc-url http://localhost:8545 --broadcastcd ../backend
bun run devThe backend server will start on http://localhost:8080
# Navigate to frontend directory
cd ../frontend
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env.local
# Configure your .env.local with:
# NEXT_PUBLIC_API_URL=http://localhost:8080pnpm devThe frontend will start on http://localhost:3000
- Register on the platform as a FARMER
- Create new batch records for harvested produce
- Add details: product name, quantity, harvest date, pricing
- Transfer batches to distributors/retailers
- Register as DISTRIBUTOR or RETAILER
- Receive batch transfers from farmers
- Update batch status during transit
- Transfer to next stakeholder in the chain
- Register as QUALITY_INSPECTOR
- Access assigned batches for inspection
- Add quality reports and grades
- Attach verification certificates
- Scan QR code on product
- View complete supply chain history
- Verify product authenticity
- Check quality reports and pricing
- User authentication & authorization
- Batch creation and management
- Blockchain integration
- Basic supply chain tracking
- QR code generation and scanning
- Quality inspector workflow
- Advanced analytics dashboard
- Multi-language support
- Harvest image validation
- Invoice verification
- Fraud detection system
- Predictive analytics
- React Native mobile app
- Offline mode support
- Cloud deployment
- Performance optimization
This project is licensed under the MIT License - see the LICENSE file for details.
For any queries or support, please reach out:
- Email: [email protected]
- GitHub: @idityaGE
- Project Link: https://github.com/idityaGE/sih-project
- Government of Odisha - For problem statement and support
- Electronics & IT Department - For guidance and mentorship
- SIH 2025 - For providing the platform
- Polygon - For blockchain infrastructure
- All open-source contributors