AgriBankChain is a blockchain-based agricultural marketplace built using Hyperledger Fabric.
It enables secure interaction between farmers, buyers, and financial institutions with full transparency and traceability of transactions.
This system is designed to improve trust and efficiency in the agricultural supply chain.
It allows:
- Farmers to register crops and manage listings
- Buyers to purchase agricultural produce securely
- Banks to provide crop-backed loans based on verified data
All actions are recorded on a blockchain ledger to ensure data integrity and prevent tampering.
- Hybrid consensus mechanism (PoA + DPoS + PBFT)
- Crop registration and management system
- Secure crop purchase workflow
- Loan application and processing
- Real-time blockchain updates
- High-value transaction validation (> $5000)
Frontend (React)
→ Backend API Server (Node.js + Express)
→ Hyperledger Fabric Network
→ Smart Contracts (Go Chaincode)
PoA → Banks + Government approval (2/3 rule)
DPoS → Stakeholder voting system
PBFT → Fault tolerance across network nodes
Used for high-value transactions above $5000.
- Frontend: React, CSS
- Backend: Node.js, Express
- Blockchain: Hyperledger Fabric 2.5
- Smart Contracts: Go
- Infrastructure: Docker, Docker Compose
- Node.js (v16+)
- npm
- Docker Desktop
- Go (1.19+)
- Hyperledger Fabric binaries
git clone https://github.com/Nirupama-Shankar/agrichain-blockchain.git
cd agrichain-blockchaincd network
./network.sh up createChannel -c mychannel -ca
./network.sh deployCC -ccn agrichain -ccp ../chaincode -ccl goexport PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=${PWD}/../config/
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=localhost:7051cd ../fullstack-app
node server.jscd ../frontend
npm install
npm start- GET /health
- POST /channels/mychannel/chaincodes/agrichain
- GetAllCrops
- CreateCrop
- PurchaseCrop
- PurchaseCropWithConsensus
- ApplyForLoan
- GetLoansByFarmer
Agri-Bank-Chain/
├── frontend/ # React frontend application
├── fullstack-app/ # Node.js + Express backend API
├── network/ # Hyperledger Fabric network setup
├── chaincode/ # Smart contracts (Go chaincode)
├── screenshots/ # Project UI screenshots
├── demo-video.mp4 # Project demo video
└── start-rest-server.sh # Script to start backend server
- Port already in use → kill process using that port
- Backend not responding → check /health endpoint
- Chaincode error → restart network
- UI not updating → refresh browser
- Fork repository
- Create branch
- Commit changes
- Push branch
- Open Pull Request
RIGASWAR S
Full Stack Blockchain Developer
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project for personal or commercial use with proper attribution.
See the LICENSE file for more details.




