https://github.com/thisis-developer/medichain
MediChain: Blockchain-Based Pharmaceutical Supply Chain Management
https://github.com/thisis-developer/medichain
blockchain cloudflare dapps-development ethereum html-css-javascript jar javaspringboot railway smart-contracts solidity
Last synced: 3 months ago
JSON representation
MediChain: Blockchain-Based Pharmaceutical Supply Chain Management
- Host: GitHub
- URL: https://github.com/thisis-developer/medichain
- Owner: ThisIs-Developer
- License: apache-2.0
- Created: 2024-10-21T17:43:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T18:16:07.000Z (8 months ago)
- Last Synced: 2025-05-27T19:32:14.002Z (8 months ago)
- Topics: blockchain, cloudflare, dapps-development, ethereum, html-css-javascript, jar, javaspringboot, railway, smart-contracts, solidity
- Language: HTML
- Homepage: https://medichain.pages.dev
- Size: 26 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MediChain: Blockchain-Based Pharmaceutical Supply Chain Management
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/yourusername/medchain)
[](https://github.com/yourusername/medchain/releases)
[](https://ethereum.org/)
[](https://soliditylang.org/)
---
## โ๏ธ Overview
**MediChain** is a secure, transparent, and efficient blockchain-based system that transforms pharmaceutical supply chain management. Built on Ethereum, this solution provides end-to-end traceability of medical products from manufacturers to patients, eliminating counterfeit drugs and ensuring patient safety.
---
## โจ Features
- ๐ **Secure Drug Registration**: Immutable blockchain ledger for manufacturers
- ๐ **Automated Ownership Transfer**: Smart contract-based secure handovers
- ๐งญ **State Management**: Track medicine journey from production to sale
- ๐ฑ **QR Code Verification**: Instant authentication with a simple scan
- ๐๏ธ **Decentralized Architecture**: No single point of failure
- โฑ๏ธ **Real-Time Tracking**: Monitor the movement of medicines live
---
## ๐ ๏ธ Tech Stack
- **Blockchain**: Ethereum (Private Network), Solidity
- **Frontend**: HTML, CSS, JavaScript
- **Web3 Integration**: MetaMask, Web3.js
- **Smart Contracts IDE**: Remix IDE
---
## ๐๏ธ System Architecture
MediChain consists of three integrated layers:
### 1๏ธโฃ Blockchain Network
- Private Ethereum blockchain as the foundational database
- Solidity smart contracts for business logic automation
- Immutable record-keeping with timestamped transactions
### 2๏ธโฃ Client Communication Layer
- Web3.js for blockchain connectivity
- User interfaces for stakeholder interactions
- MetaMask integration for secure authentication and transaction signing
### 3๏ธโฃ Application Layer
- HTML-CSS-JavaScript frontend interface
- QR code integration for product verification
- Real-time tracking dashboard

---
## ๐งฉ Key Modules
### ๐ Smart Contract Operations
Smart contracts written in Solidity handle:
- `addMedicine()` โ Register medicines with full traceability
- `purchaseMedicine()` โ Buy securely with automatic ownership transfer
- `updateMedicineState()` โ Update lifecycle state (e.g., Manufactured, In Stock, Sold, Expired)
- `getMedicine()`, `getMedicineState()` โ Retrieve real-time product and status info
### ๐ฅ๏ธ Dashboard
- Clean, professional interface modeled after modern commerce platforms
- Track:
- ๐งพ Order history
- ๐ Total drugs registered
- ๐ฆ Total stock across batches
- ๐ท๏ธ Total units sold
- Manufacturer insights, quantity analytics, and QR-based lookup tools
### ๐ Track Medicine
- Search by medicine ID to view:
- ๐งฌ Batch metadata
- ๐ญ Manufacturer identity
- โณ Lifecycle state and timestamps
- ๐ค Current owner in the supply chain
- One-click **Verification Report** generation for regulators or consumers
### ๐ Buy Medicine
- ๐ Live search and filter system
- ๐ณ Detailed product cards with dynamic pricing
- โ
Integrated blockchain validation before purchase
- โก Smooth transaction flow with MetaMask authentication
### ๐ฅ User Management
- Register as:
- ๐ญ Manufacturer
- ๐ Distributor
- ๐ช Pharmacy
- Role-based login with Ethereum identity
- All interactions are cryptographically signed
---
## ๐ผ๏ธ Screenshots
> ๐งพ Dashboard Overview
> 
> 
> ๐ Track Medicine
> 
> ๐ Buy Medicines
> 
> 
---
## โก Performance
Optimized for speed and cost-efficiency:
- ๐ **Transaction Speed**: Avg. 100ms response under 500 concurrent users
- โฝ **Gas Optimization**: Lower costs via optimized smart contracts
- ๐ **Scalability**: Supports thousands of participants and millions of transactions
- ๐ **Security**: Multi-layer protection against unauthorized access
---
## ๐ Future Enhancements
- [ ] ๐ **Advanced Analytics**: ML-powered risk prediction
- [ ] ๐ **Cross-Chain Integration**: Interoperability with other networks
- [ ] ๐ก **Expanded Verification Methods**: NFC and RFID support
---
## ๐จโ๐ป Contributors
- **Baivab Sarkar** โ [@ThisIs-Developer](https://github.com/ThisIs-Developer)
- **Ayan Chatterjee** โ [@Ayan123C](https://github.com/Ayan123C)
- **Bhishmadev Ghosh** โ [@bhishma620](https://github.com/bhishma620)
- **Arpan Bhattacharya** โ [@Arpan550](https://github.com/Arpan550)
---
## ๐ License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.