Inspiration

The inspiration for this project came from the increasing problem of counterfeit medicines in the pharmaceutical industry. Fake drugs not only cause financial losses but can also lead to serious health risks and even loss of life. Traditional supply chain systems store data in centralized databases, which are vulnerable to tampering, data loss, and lack of transparency.

We wanted to explore how blockchain technology could solve this problem by providing a secure, transparent, and tamper-proof system to track medicines from the manufacturer to the pharmacy. This motivated us to build a real-world blockchain-based pharmaceutical supply chain management system.


What We Built

We built a Blockchain-Based Pharmaceutical Supply Chain Management System that securely tracks medicines through three main stages:

  • Manufacturer adds new drug batches to the blockchain
  • Distributor updates shipment and transit status
  • Pharmacy verifies product authenticity and views full history

Each transaction is stored on the Ethereum blockchain using a Solidity smart contract, ensuring that once data is recorded, it cannot be modified or deleted. The system also includes a product tracking page where anyone can view the complete lifecycle of a medicine.

To make blockchain interaction realistic and secure, we integrated MetaMask, so users must approve transactions before they are added to the blockchain.


How We Built It

The project is built as a full-stack decentralized application (DApp):

  • We created a Solidity smart contract to manage product creation, status updates, and history tracking.
  • A local Ethereum blockchain was set up using Hardhat.
  • The frontend was built using HTML, CSS, and JavaScript for simplicity and clarity.
  • MetaMask was used to sign and confirm blockchain transactions directly from the browser.
  • A small Node.js + Express server was used to serve the frontend files and blockchain configuration.

This architecture ensures that all important data is stored securely on the blockchain while providing a smooth user experience.


What We Learned

Through this project, we gained hands-on experience in:

  • Writing and deploying Solidity smart contracts
  • Working with Ethereum blockchain and Hardhat
  • Using ethers.js to interact with blockchain from the frontend
  • Integrating MetaMask for real transaction signing
  • Building a full-stack decentralized application (DApp)
  • Designing a secure, transparent, and tamper-proof system

We also learned how decentralized systems differ from traditional centralized applications in terms of security, trust, and data immutability.


Challenges We Faced

Some major challenges we faced during the development were:

  • Understanding the Solidity programming language and smart contract structure
  • Handling transaction confirmation using MetaMask
  • Debugging ethers.js and Hardhat deployment issues
  • Ensuring smooth interaction between frontend and blockchain
  • Managing asynchronous blockchain operations like transaction mining and confirmations

We overcame these challenges through continuous testing, debugging, and by gaining a deeper understanding of blockchain workflows.

Built With

Share this project:

Updates