A Blockchain-Based Botanical Traceability Platform for Ayurvedic Herbs
Ashvini is a next-generation traceability system designed to bring transparency, authenticity, and sustainability to the Ayurvedic herbal supply chain. By leveraging Hyperledger Fabric, IoT, and modern web technologies, it creates an immutable record of an herb's journey—from geo-tagged harvest to the final consumer's hands.
The Ayurvedic herbal supply chain in India is characterised by fragmented networks of smallholder farmers, wild collectors, and multiple intermediaries, leading to challenges in ensuring consistent quality, authenticity, and sustainable sourcing of medicinal plants.
Variations in harvesting practices, environmental conditions, and manual record-keeping introduce risks of mislabeling, adulteration, and over-harvesting of vulnerable species, undermining consumer trust and compliance with regulatory standards. Geographic provenance is often undocumented or opaque, making it difficult for manufacturers and regulators to verify that herbs originate from approved regions or follow sustainable collection guidelines.
Ashvini addresses these gaps by creating a tamper-proof, decentralized ledger that provides end-to-end visibility and enforces compliance, rebuilding consumer trust and promoting ethical sourcing.
- Immutable Ledger: Built on Hyperledger Fabric, ensuring that every transaction, once recorded, cannot be altered.
- Geo-Tagged Harvesting: Mobile DApp allows farmers to record precise GPS coordinates, timestamps, and photos at the point of collection.
- Offline-First Capability: Mobile app saves data locally and syncs automatically when network connection is available.
- Smart Contract Validation: Chaincode automatically enforces NMPB guidelines, including geo-fencing for approved zones and seasonal restrictions.
- End-to-End Traceability: Tracks every step, from harvest and processing to lab testing and final formulation.
- Consumer QR Code Portal: Customers can scan a unique QR code to view the herb's complete journey.
- Interactive Journey Map: Displays an interactive map tracing the herb's path with photos from each stage.
| Component | Technology | Purpose |
|---|---|---|
| Blockchain Network | Hyperledger Fabric 2.x | Permissioned, distributed ledger for all provenance data |
| Smart Contract | Node.js / Go (Golang) | On-chain business logic and validation rules |
| Backend API Server | Node.js with Express.js | Middleware connecting frontend to blockchain |
| Frontend (Collector) | React Native with Expo | Cross-platform mobile app for data capture |
| Frontend (Stakeholder) | React.js | Web dashboard for supply chain management |
| Frontend (Consumer) | Next.js | Web portal for QR code scans and product info |
| File Storage | AWS S3 / Google Cloud Storage | Secure storage for photos and documents |
| Database | PostgreSQL | User authentication and application metadata |
| Deployment | Docker & Kubernetes | Containerization and orchestration |
| Mapping | Leaflet with react-leaflet | Interactive journey map visualization |
Ashvini is built on a decoupled, three-tier architecture to ensure separation of concerns and scalability.
-
Blockchain Layer (
chaincode/)- Hyperledger Fabric network running smart contracts
- Acts as the trusted "rulebook" and database for all traceability data
-
Server Layer (
server/)- Express.js API as a secure bridge
- Handles authentication, request processing, and blockchain interactions
- Manages file uploads to cloud storage
-
Frontend Layer (
frontend/)- React and React Native applications
- Communicates exclusively with the Server Layer via RESTful APIs
Mobile App → Express Server → [Uploads to Cloud Storage] →
Express Server → [Submits to Blockchain]
Ashvini/
├── chaincode/ # Hyperledger Fabric smart contracts
├── server/ # Node.js/Express backend API
└── frontend/ # User-facing applications
├── mobile-app/ # React Native collector app
├── dashboard/ # React.js admin dashboard
└── consumer-portal/ # Next.js consumer portal
- Docker & Docker Compose: Install Docker
- Node.js (v16+): Install Node.js
- Go (v1.18+): Install Go
- Hyperledger Fabric: Installation Guide
-
Clone the repository:
git clone https://github.com/your-username/Ashvini.git cd Ashvini -
Start the Blockchain Network:
cd fabric-samples/test-network ./network.sh up createChannel -
Deploy the Smart Contract:
# Follow instructions in chaincode/README.md -
Install Server Dependencies:
cd server npm install -
Install Frontend Dependencies:
cd ../frontend/dashboard npm install # Repeat for other frontend apps
-
Start the Server:
cd server npm start -
Start the Frontend:
cd frontend/dashboard npm start