How vyom-yadav/fake-product-detection-hyperledger works
Project type and purpose
• This is a blockchain-based asset-transfer system built on Hyperledger Fabric.
• It provides a permissioned DLT network plus a Go-based REST API for invoking and querying chaincode.
• Its goal is to track product ownership, generate QR codes, and prevent counterfeit products.
File structure
Top-level directories & files:
• asset-transfer/product-chaincode/…
• Chaincode implementation in Go (smartcontract.go and assetTransfer.go).
• asset-transfer/rest-api-go/…
• REST server in Go with app.go, initialize.go, invoke.go, query.go.
• compose/…
• Docker Compose files for CA services and network.
• config/ and configtx/…
• Fabric network configuration (orderers, channels).
• organizations/…
• CA scripts, MSP ENVs and templates.
• network.sh, scripts/…
• Scripts to install/clean network, create channels, deploy chaincode, set anchors.
README for additional insights
• Single channel, single chaincode on Fabric network.
• One Orderer, one Peer per Org, one CA per Org, one User/Admin each.
• Hard-coded channel name and chaincode name in REST API.
• QR code generation pointing to the REST endpoints.
Elements
• Client → REST API (HTTP calls)
• REST API → Peer/Orderer (gRPC or CLI invokes)
• Peer → Orderer (transaction distribution)
• Orderer → Peers (block delivery)