Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 147 additions & 144 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
🧬 OrganChain
# OrganChain
Comment thread
anjanakri marked this conversation as resolved.
Outdated

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 on blockchain, IPFS, and cloud technologies.

---

## Table of Contents

- [Project Description](#project-description)
- [Architecture Overview](#architecture-overview)
- [Project Structure](#project-structure)
- [Tech Stack](#tech-stack)
- [Detailed Workflow](#detailed-workflow)
- [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)

---

Project Description
## Project Description

OrganChain addresses critical challenges in traditional healthcare systems such as:
OrganChain addresses critical challenges in traditional healthcare systems:

* Data tampering
* Lack of transparency in organ allocation
* Centralized control of sensitive records
- Data tampering
- Lack of transparency in organ allocation
- Centralized control of sensitive records

By integrating "Web3 technologies", the system ensures trust, traceability, and decentralization.
By integrating Web3 technologies, the system ensures trust, traceability, and decentralization across all medical data interactions.

---

>> Architecture Overview
## Architecture Overview

-> End-to-End Flow
### End-to-End Flow

```
User β†’ Frontend (React - Vercel)
Expand All @@ -26,210 +45,194 @@ User β†’ Frontend (React - Vercel)

File Upload β†’ Backend β†’ Pinata β†’ IPFS β†’ CID stored on Blockchain
```

---

## Project Structure

```
organchain/
Comment thread
anjanakri marked this conversation as resolved.
Outdated
β”‚
β”œβ”€β”€ frontend/ # React frontend
β”œβ”€β”€ backend/ # Spring Boot application
β”œβ”€β”€ contracts/ # Solidity smart contracts
β”œβ”€β”€ scripts/ # Deployment scripts
β”œβ”€β”€ config/ # Environment configurations
β”œβ”€β”€ frontend/ # React frontend
β”œβ”€β”€ backend/ # Spring Boot application
β”œβ”€β”€ 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?**

* Handles complex business logic
* Enterprise-grade architecture
* Secure REST APIs

**Why Maven?**

* Dependency management
* Build automation


>> Blockchain

* Ethereum Smart Contracts
* Alchemy API

**Why?**
---

* Immutable data storage
* Decentralized trust
* No need for self-hosted nodes
## Tech Stack

---
### Frontend

>> Storage
| Technology | Purpose |
|------------|---------|
| React.js | Fast UI rendering and seamless Web3 integration |
| Vercel | Serverless, scalable hosting |

* IPFS
* Pinata
### Backend

**Why?**
| Technology | Purpose |
|------------|---------|
| Spring Boot | Complex business logic, enterprise-grade REST APIs |
| Maven | Dependency management and build automation |

* Decentralized file storage
* Content-based addressing
* Reliable pinning service
### Blockchain

---
| Technology | Purpose |
|------------|---------|
| Ethereum Smart Contracts | Immutable, decentralized data storage |
| Alchemy API | Managed node access β€” no self-hosted infrastructure needed |

>> Development Tools
### Storage

* Ganache (Local blockchain)
* ngrok (Public tunnel)
| Technology | Purpose |
|------------|---------|
| IPFS | Decentralized, content-addressed file storage |
| Pinata | Reliable IPFS pinning service |

**Why?**
### Development Tools

* Faster local testing
* Easy frontend-backend integration
| Tool | Purpose |
|------|---------|
| Ganache | Local blockchain for faster testing |
| ngrok | Public tunnel for easy frontend-backend integration |

---

## Detailed Workflow

### User Interaction

* User accesses the web app
* Inputs data or uploads medical records

### Backend Processing

* Validates user data
* Prepares blockchain transactions

### File Upload (IPFS)

* File sent to Pinata
* IPFS returns a unique **CID (Content Identifier)**
### 1. User Interaction
- User accesses the web app
- Inputs data or uploads medical records

### Blockchain Storage
### 2. Backend Processing
- Validates user data
- Prepares blockchain transactions

* Smart contract stores:
### 3. File Upload (IPFS)
- File is sent to Pinata
- IPFS returns a unique **CID (Content Identifier)**

* Metadata
* IPFS CID
### 4. Blockchain Storage
- Smart contract stores metadata and the IPFS CID

### Data Retrieval

* Fetch CID from blockchain
* Retrieve file from IPFS securely
### 5. Data Retrieval
- CID is fetched from the blockchain
- File is retrieved securely from IPFS

---

## Screenshots

### Homepage
*Public-facing landing page with organ donation awareness and pledge CTA*

![OrganChain Homepage](Desktop/organchain-main/organchain-main/Version_1_Frontend/src/screenshots/landing-page.png)

---

### Admin Dashboard
*Platform dashboard for managing donors, patients, pledges, and transplant matching*

![OrganChain Dashboard](Desktop/organchain-main/organchain-main/Version_1_Frontend/src/screenshots/dashboard.png)
Comment on lines +152 to +159
Comment on lines +152 to +159
---
## 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 records using blockchain
- Decentralized file storage via IPFS
- Transparent organ tracking system
- Secure API-based backend
- Local blockchain testing environment

---

>> Setup Instructions

πŸ”Ή Prerequisites
## Setup Instructions
### Prerequisites

* Node.js
* Java (JDK 8+)
* Maven
* Ganache
* MetaMask Extension

πŸ”Ή Clone the Repository
- Node.js
- Java (JDK 8+)
- Maven
- Ganache
- MetaMask browser extension

### Clone the Repository
```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

### Frontend Setup

```bash
cd frontend
npm install
npm start
```

πŸ”Ή Smart Contract Deployment
### Smart Contract Deployment

```bash
cd contracts
# compile & deploy using truffle/hardhat
# Compile and deploy using Truffle or Hardhat
```

πŸ”Ή Start Ganache

* Launch Ganache GUI or CLI
* Copy RPC URL and configure in project
### Start Ganache

1. Launch Ganache (GUI or CLI)
2. Copy the RPC URL
3. Configure the RPC URL in the project's environment settings
---

>> Deployment
## Deployment

| Component | Platform |
| ---------- | -------------------- |
|------------|----------------------|
| Frontend | Vercel |
| Backend | Cloud (AWS/Heroku) |
| Backend | Cloud (AWS / Heroku) |
| Blockchain | Ethereum via Alchemy |
| Storage | IPFS via Pinata |
---

>> Comparison with Traditional Systems

| Feature | Traditional System | OrganChain |
| ------------ | ------------------ | ----------------- |
| Storage | Centralized DB | IPFS |
| Trust | Low | High (Blockchain) |
| Transparency | Limited | Full |
| Security | Moderate | High |
## Comparison with Traditional Systems
| Feature | Traditional System | OrganChain |
|----------------|--------------------|-------------------|
| Storage | Centralized DB | IPFS |
| Trust | Low | High (Blockchain) |
| Transparency | Limited | Full |
| Security | Moderate | High |

>> Limitations
---

* Gas fees for blockchain transactions
* Slower write operations
* Requires Web3 knowledge
## Limitations
- Gas fees apply for blockchain transactions
- Write operations are slower than traditional databases
- Requires Web3 knowledge for setup and interaction

>> Future Scope
---

* AI-based organ matching system
* Real-time dashboards
* Integration with hospital APIs
* Multi-chain compatibility
## Future Scope
- AI-based organ matching system
- Real-time dashboards
- Integration with hospital APIs
- Multi-chain compatibility

>> Contributing
---

## Contributing
1. Fork the repository
2. Create a new branch
3. Commit your changes
4. Push and create PR
2. Create a new branch (`git checkout -b feature/your-feature`)
3. Commit your changes (`git commit -m 'Add your feature'`)
4. Push to your branch (`git push origin feature/your-feature`)
5. Open a Pull Request

## ⭐ Acknowledgement
---

If you find this project useful, consider giving it a ⭐ on GitHub!
> If you find this project useful, consider giving it a ⭐ on GitHub!