diff --git a/README.md b/README.md index f727407..340e1a4 100644 --- a/README.md +++ b/README.md @@ -1,176 +1,215 @@ -🧬 OrganChain +# Organ_BlockChain -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. +A decentralized healthcare platform for **secure, transparent, and tamper-proof management of organ donation and medical data** — built using blockchain, IPFS, and cloud technologies. +--- - Project Description +## Table of Contents + +- [Project Description](#project-description) +- [Architecture Overview](#architecture-overview) +- [Project Structure](#project-structure) +- [Tech Stack](#tech-stack) +- [Detailed Workflow](#detailed-workflow) +- [Screenshots](#screenshots) +- [Key Features](#key-features) +- [Setup Instructions](#setup-instructions) +- [Deployment](#deployment) +- [Comparison with Traditional Systems](#comparison-with-traditional-systems) +- [Limitations](#limitations) +- [Future Scope](#future-scope) +- [Contributing](#contributing) -OrganChain addresses critical challenges in traditional healthcare systems such as: +--- -* Data tampering -* Lack of transparency in organ allocation -* Centralized control of sensitive records +## Project Description -By integrating "Web3 technologies", the system ensures trust, traceability, and decentralization. +OrganChain addresses major challenges in traditional healthcare systems such as: +- Data tampering +- Lack of transparency in organ allocation +- Centralized control of sensitive medical records - >> Architecture Overview +By integrating Web3 technologies, the platform ensures: - -> End-to-End Flow +- Trust +- Transparency +- Traceability +- Decentralization -``` -User → Frontend (React - Vercel) +across all healthcare data interactions. + +--- + +## Architecture Overview + +### End-to-End Workflow + +```text +User → Frontend (React + Vercel) → Backend (Spring Boot REST APIs) → Blockchain (Ethereum via Alchemy) → Smart Contracts File Upload → Backend → Pinata → IPFS → CID stored on Blockchain ``` + +--- + ## Project Structure -``` -organchain/ +```text +Organ_BlockChain/ │ -├── frontend/ # React frontend -├── backend/ # Spring Boot application -├── contracts/ # Solidity smart contracts -├── scripts/ # Deployment scripts -├── config/ # Environment configurations +├── frontend/ # React frontend application +├── backend/ # Spring Boot backend services +├── contracts/ # Solidity smart contracts +├── scripts/ # Deployment scripts +├── config/ # Environment configurations └── README.md ``` ->> Tech Stack (With Purpose) - - ## Frontend - -* React.js -* Vercel (Deployment) - -Why? >> - -* Fast UI rendering -* Seamless Web3 integration -* Serverless and scalable hosting - ->> Backend -* Spring Boot -* Maven +--- -**Why Spring Boot?** +## Tech Stack -* Handles complex business logic -* Enterprise-grade architecture -* Secure REST APIs +### Frontend -**Why Maven?** +| Technology | Purpose | +|------------|---------| +| React.js | Fast and responsive user interface | +| Vercel | Scalable frontend hosting | -* Dependency management -* Build automation +--- +### Backend ->> Blockchain +| Technology | Purpose | +|------------|---------| +| Spring Boot | REST APIs and backend business logic | +| Maven | Dependency management and build automation | -* Ethereum Smart Contracts -* Alchemy API +--- -**Why?** +### Blockchain -* Immutable data storage -* Decentralized trust -* No need for self-hosted nodes +| Technology | Purpose | +|------------|---------| +| Ethereum Smart Contracts | Immutable decentralized storage | +| Alchemy API | Blockchain node infrastructure | --- ->> Storage - -* IPFS -* Pinata - -**Why?** +### Storage -* Decentralized file storage -* Content-based addressing -* Reliable pinning service +| Technology | Purpose | +|------------|---------| +| IPFS | Decentralized file storage | +| Pinata | Reliable IPFS pinning service | --- ->> Development Tools +### Development Tools -* Ganache (Local blockchain) -* ngrok (Public tunnel) - -**Why?** - -* Faster local testing -* Easy frontend-backend integration +| Tool | Purpose | +|------|---------| +| Ganache | Local Ethereum blockchain testing | +| MetaMask | Wallet integration and transaction signing | +| ngrok | Public tunnel for local backend exposure | --- ## Detailed Workflow -### User Interaction +### 1. User Interaction +- User accesses the web application +- Uploads medical records or enters donor/patient data + +### 2. Backend Processing +- Validates incoming data +- Handles API communication +- Prepares blockchain transactions -* User accesses the web app -* Inputs data or uploads medical records +### 3. File Upload to IPFS +- Files are uploaded to Pinata +- IPFS generates a unique CID (Content Identifier) -### Backend Processing +### 4. Blockchain Storage +- Smart contracts store metadata and IPFS CID references +- Data becomes immutable and traceable -* Validates user data -* Prepares blockchain transactions +### 5. Secure Retrieval +- CID is fetched from the blockchain +- Files are securely retrieved from IPFS -### File Upload (IPFS) +--- -* File sent to Pinata -* IPFS returns a unique **CID (Content Identifier)** +## Screenshots -### Blockchain Storage +### Homepage +*Public-facing landing page with organ donation awareness and pledge CTA* -* Smart contract stores: +![OrganChain Homepage](Desktop/organchain-main/organchain-main/Version_1_Frontend/src/screenshots/landing-page.png) - * Metadata - * IPFS CID +--- -### Data Retrieval +### Admin Dashboard +*Dashboard for managing donors, recipients, pledges, and transplant records* -* Fetch CID from blockchain -* Retrieve file from IPFS securely +![OrganChain Dashboard](Desktop/organchain-main/organchain-main/Version_1_Frontend/src/screenshots/dashboard.png) --- ## Key Features -* Tamper-proof records using blockchain -* Decentralized storage via IPFS -* Transparent organ tracking system -* Secure API-based backend -* Local blockchain testing environment +- Tamper-proof medical records using blockchain +- Decentralized file storage via IPFS +- Transparent organ donor tracking system +- Smart contract-powered verification +- Secure REST API backend +- Local blockchain development environment +- Immutable audit trails for sensitive data --- - >> Setup Instructions +## Setup Instructions -🔹 Prerequisites +### Prerequisites -* Node.js -* Java (JDK 8+) -* Maven -* Ganache -* MetaMask Extension +Install the following before starting: -🔹 Clone the Repository +- Node.js +- Java (JDK 8+) +- Maven +- Ganache +- MetaMask Browser Extension + +--- + +### Clone the Repository + +By default, cloning this repository creates a local folder named `Organ_BlockChain`. ```bash -git clone https://github.com/ffrazi/organchain.git -cd organchain +git clone https://github.com/jaideep005/Organ_BlockChain.git +cd Organ_BlockChain ``` -🔹 Backend Setup + +--- + +### Backend Setup ```bash cd backend mvn clean install mvn spring-boot:run ``` -🔹 Frontend Setup + +Backend server will start on the configured port. + +--- + +### Frontend Setup ```bash cd frontend @@ -178,58 +217,135 @@ npm install npm start ``` -🔹 Smart Contract Deployment +Frontend will run on: + +```text +http://localhost:3000 +``` + +--- + +### Smart Contract Deployment ```bash cd contracts -# compile & deploy using truffle/hardhat + +# Compile contracts +truffle compile + +# Deploy contracts +truffle migrate ``` -🔹 Start Ganache +You may also use Hardhat if preferred. + +--- + +### Start Ganache -* Launch Ganache GUI or CLI -* Copy RPC URL and configure in project +1. Launch Ganache GUI or CLI +2. Copy the RPC URL +3. Configure the RPC URL in environment variables +4. Import Ganache accounts into MetaMask --- ->> Deployment +## Environment Variables + +Create a `.env` file where required. + +Example: + +```env +ALCHEMY_API_KEY=your_api_key +PINATA_API_KEY=your_pinata_key +PINATA_SECRET_API_KEY=your_secret_key +PRIVATE_KEY=your_wallet_private_key +``` + +--- -| Component | Platform | -| ---------- | -------------------- | -| Frontend | Vercel | -| Backend | Cloud (AWS/Heroku) | +## Deployment + +| Component | Platform | +|-----------|----------| +| Frontend | Vercel | +| Backend | AWS / Heroku / Render | | Blockchain | Ethereum via Alchemy | -| Storage | IPFS via Pinata | +| Storage | IPFS via Pinata | + +--- + +## Comparison with Traditional Systems + +| Feature | Traditional System | OrganChain | +|---------|-------------------|------------| +| Storage | Centralized Database | IPFS | +| Transparency | Limited | High | +| Trust | Institution-based | Blockchain-based | +| Security | Moderate | High | +| Auditability | Difficult | Immutable | +| Data Ownership | Centralized | Decentralized | ->> Comparison with Traditional Systems +--- + +## Limitations + +- Blockchain transactions involve gas fees +- Slower write speeds compared to traditional databases +- Requires Web3 familiarity for advanced configuration +- Smart contract upgrades can be complex + +--- -| Feature | Traditional System | OrganChain | -| ------------ | ------------------ | ----------------- | -| Storage | Centralized DB | IPFS | -| Trust | Low | High (Blockchain) | -| Transparency | Limited | Full | -| Security | Moderate | High | +## Future Scope ->> Limitations +- AI-powered organ matching algorithms +- Real-time healthcare analytics dashboards +- Multi-chain blockchain compatibility +- Integration with hospital management systems +- Mobile application support +- Role-based access control enhancements -* Gas fees for blockchain transactions -* Slower write operations -* Requires Web3 knowledge +--- ->> Future Scope +## Contributing -* AI-based organ matching system -* Real-time dashboards -* Integration with hospital APIs -* Multi-chain compatibility +Contributions are welcome. ->> Contributing +### Steps to Contribute 1. Fork the repository -2. Create a new branch +2. Create a feature branch + +```bash +git checkout -b feature/your-feature +``` + 3. Commit your changes -4. Push and create PR -## ⭐ Acknowledgement +```bash +git commit -m "Add your feature" +``` + +4. Push your branch + +```bash +git push origin feature/your-feature +``` -If you find this project useful, consider giving it a ⭐ on GitHub! +5. Open a Pull Request + +--- + +## License + +This project is licensed under the `MIT License`. + +--- + +## Support + +If you found this project useful, consider giving it a ⭐ on GitHub. + +---