A decentralized healthcare platform designed to ensure secure, transparent, and tamper-proof management of organ donation and medical data using blockchain, IPFS, and cloud technologies.
OrganChain addresses critical challenges in traditional healthcare systems such as:
- Data tampering
- Lack of transparency in organ allocation
- Centralized control of sensitive records
By integrating Web3 technologies, the system ensures trust, traceability, and decentralization.
User → Frontend (React - Vercel)
→ Backend (Spring Boot REST APIs)
→ Blockchain (Ethereum via Alchemy)
→ Smart Contracts
File Upload → Backend → Pinata → IPFS → CID stored on Blockchainorganchain/
│
├── frontend/ # React frontend
├── backend/ # Spring Boot application
├── contracts/ # Solidity smart contracts
├── scripts/ # Deployment scripts
├── config/ # Environment configurations
└── README.md- React.js
- Vercel (Deployment)
- Fast UI rendering
- Seamless Web3 integration
- Serverless and scalable hosting
- Spring Boot
- Maven
- Handles complex business logic
- Enterprise-grade architecture
- Secure REST APIs
- Dependency management
- Build automation
- Ethereum Smart Contracts
- Alchemy API
- Immutable data storage
- Decentralized trust
- No need for self-hosted nodes
- IPFS
- Pinata
- Decentralized file storage
- Content-based addressing
- Reliable pinning service
- Ganache (Local blockchain)
- ngrok (Public tunnel)
- Faster local testing
- Easy frontend-backend integration
- User accesses the web app
- Inputs data or uploads medical records
- Validates user data
- Prepares blockchain transactions
- File sent to Pinata
- IPFS returns a unique CID (Content Identifier)
- Smart contract stores:
- Metadata
- IPFS CID
- Fetch CID from blockchain
- Retrieve file from IPFS securely
- Tamper-proof records using blockchain
- Decentralized storage via IPFS
- Transparent organ tracking system
- Secure API-based backend
- Local blockchain testing environment
- Node.js
- Java (JDK 8+)
- Maven
- Ganache
- MetaMask Extension
git clone https://github.com/ffrazi/organchain.git
cd organchaincd backend
mvn clean install
mvn spring-boot:runcd frontend
npm install
npm startFor a full list of backend API endpoint, request parameters and example responses, SEE API Reference.
This project uses environment variables to keep sensitive credentials and environment-specific settings out of the codebase. Spring Boot reads these values through placeholders in application.properties, with fallback defaults where provided.
Variable | Purpose
PINATA_API_KEY | Pinata Api key used for IFPS-related Operations
PINATA_API_SECRET | Pinata Api secret used for Pinata Authentication.
PINATA_JWT | Pinata JWT token used for authenticated Pinata API requests.
WEB3_PRIVATE_KEY= Ethereum/Web3 private key used by Backend.
WEB3_CONTRACT_ADDRESS= Deployed smart contract address used by the backend.
SPRING_DATASOURCE_URL | Database connection string default to loal H2 if not set.
Create a Pinata account, then go to the API Keys page and click New Key. Pinata shows the API key, API secret, and JWT immediately after creation, and the secret/JWT are only shown once, so save them securely.
Create an app in the Alchemy Dashboard, then copy the API key from the app details page. Alchemy’s docs say the API key is available after creating an app, and the dashboard also provides the endpoint URLs you may need for requests.
- Add a .env file at the project root inside organchain-main/.
- Never commit real secret to github as .env file contains secret so never push this file in github.
- if any variable missing in your project, the backend might fail, so filling all environment variables is recommended.
cd contracts
# compile & deploy using truffle/hardhat- Launch Ganache GUI or CLI
- Copy RPC URL and configure in project
| Component | Platform |
|---|---|
| Frontend | Vercel |
| Backend | Cloud (AWS/Heroku) |
| Blockchain | Ethereum via Alchemy |
| Storage | IPFS via Pinata |
| Feature | Traditional System | OrganChain |
|---|---|---|
| Storage | Centralized DB | IPFS |
| Trust | Low | High (Blockchain) |
| Transparency | Limited | Full |
| Security | Moderate | High |
- Gas fees for blockchain transactions
- Slower write operations
- Requires Web3 knowledge
- AI-based organ matching system
- Real-time dashboards
- Integration with hospital APIs
- Multi-chain compatibility
- Fork the repository
- Create a new branch
- Commit your changes
- Push and create PR
MIT License
This project is licensed under the MIT License.
For the complete license text, see the LICENSE file.
If you find this project useful, consider giving it a ⭐ on GitHub!