A blockchain-based pharmaceutical supply chain tracking system built on Solana, providing transparency, security, and traceability for medical products from manufacturer to end consumer.
About • Features • Getting Started • Contributing • License
TrackMed is a decentralized pharmaceutical supply chain management platform designed to combat counterfeit drugs and ensure product authenticity throughout the distribution network. Built on Solana blockchain, the system creates an immutable record of each pharmaceutical product's journey from manufacturing through distribution to the final consumer, providing complete transparency and accountability for all stakeholders.
This project leverages Solana blockchain technology and a modern full-stack architecture for high-performance supply chain tracking.
- Blockchain: Solana
- Smart Contract Framework: Anchor
- Smart Contract Language: Rust
- Frontend/Backend: TypeScript, Node.js
- Database: PostgreSQL
- Infrastructure: Docker, Nginx
- Package Manager: Yarn
- Code Formatting: Prettier
- Immutable Record Keeping: All transactions recorded on Solana blockchain for permanent traceability
- Product Provenance Tracking: Complete journey tracking from manufacturer to consumer
- Authenticity Verification: Prevent counterfeit drugs from entering the supply chain
- Multi-Party Support: Manage manufacturers, distributors, retailers, and regulatory oversight
- Real-Time Visibility: Track product location and status throughout the supply chain
- High Performance: Built on Solana for fast transactions and minimal fees
- Decentralized Architecture: No single point of failure or control
To get a local copy up and running for development, follow these simple steps.
You will need Node.js (version 16 or higher), Rust and Cargo, Solana CLI, Anchor Framework, and Docker with Docker Compose installed on your system.
-
Clone the repository:
git clone https://github.com/neutron420/Trackmed.git cd Trackmed -
Install dependencies:
npm install # or yarn install -
Set up environment variables: Create a
.envfile in the root of your project by copying.env.docker.cp .env.docker .env
Configure your environment variables for:
- Solana network configuration
- Database connection string
- API endpoints
- Other service configurations
-
Build Solana programs:
anchor build
-
Run tests:
anchor test -
Run with Docker (Development):
docker-compose up
-
Run with Docker (Production):
docker-compose -f docker-compose.prod.yml up
trackmed/
├── apps/ # Frontend applications
├── programs/ # Solana smart contracts (Anchor/Rust)
├── services/ # Backend services
├── packages/idl/ # Interface Definition Language files
├── migrations/ # Database migrations
├── tests/ # Test suites
└── infra/nginx/ # Infrastructure configuration
- Regulator/Administrator: Registers and approves participants, issues licenses, oversees compliance
- Manufacturer: Records new medicine batches on-chain, provides product details
- Distributor/Wholesaler: Receives and validates products, distributes to retailers
- Retailer/Pharmacy: Receives products, verifies integrity, sells to consumers
- Consumer: Verifies product authenticity and views complete product history
The Solana program includes core instructions for supply chain management:
initialize_manufacturer- Register a new manufacturercreate_product- Add new product to the blockchaintransfer_product- Transfer product ownership between partiesupdate_product_status- Update product condition and statusverify_product- Check product authenticity and history
- Configure your Solana cluster in
Anchor.toml - Build the program:
anchor build
- Deploy to devnet/mainnet:
anchor deploy
Use the production Docker Compose configuration:
docker-compose -f docker-compose.prod.yml up -dContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/neutron420/Trackmed