Skip to content

Sudhanshu-NITR/OrganLink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OrganLink: Bridging Donors and Recipients with Technology

Every minute counts when a life is at stake. OrganLink is a digital bridge between selfless organ donors and patients in need. Using a seamless interface and verified data handling, it aims to reduce delays, boost awareness, and empower communities through responsible organ sharing.

Why OrganLink?

In India, one life is lost every six minutes due to wait for an organ transplant... Source: timesofindia

17 people die each day waiting for an organ transplant in the United States... Source: techtarget

TechTarget notes that ‘digital workflows have the potential to allow providers to notify OPOs (organ procurement organizations) of potential donors in seconds rather than minutes… increasing opportunities for matches and successful donation recoveries’
Source: techtarget

OrganLink brings this vision to life by offering a real‑time platform for hospital registration, donor updation, and urgent matching—closing critical time gaps and improving patient outcomes & saving valuable lives...

How OrganLink Solves The Problem?

OrganLink

OrganLink addresses this critical issue by:

  • 📡 Connecting hospitals, donors, and recipients on a unified platform to reduce delays and eliminate manual communication gaps.

  • 🏥 Digitizing the donor registration process — making it fast, accessible, and verifiable by hospitals & medical institutions.

  • 🧠 Matching donors and recipients based on organ type, blood group, urgency, and location—ensuring faster and more accurate transplant coordination.

  • 📊 Maintaining a transparent and searchable database of verified donors and patients.

By centralizing the process and automating key steps, OrganLink ensures that no life is lost due to a preventable delay—and bridges the gap between those who want to help and those who desperately need it.

🛠️ Tech Stack

OrganLink is built using a modern full-stack JavaScript architecture. Here's a breakdown of the technologies powering the project:

🌐 Frontend

  • React.js – Core UI framework for building interactive components
  • Vite – Fast bundler and development server
  • React Router v7 – For seamless client-side routing
  • Redux Toolkit + Redux Persist – Global state management with persistence across sessions
  • Tailwind CSS – Utility-first styling for responsive design
  • Framer Motion – Smooth animations and UI transitions
  • React Hook Form – Optimized form handling and validation
  • Lucide React & Font Awesome – Icon libraries for UI enhancement

🔗 Backend

  • Node.js + Express – REST API server for handling all backend logic
  • MongoDB + Mongoose – NoSQL database for storing users, hospitals, and organ data
  • JWT (jsonwebtoken) – User authentication and route protection
  • bcrypt – Password hashing for secure login credentials
  • Multer + Cloudinary – For image/file uploads and cloud storage integration
  • CORS & Cookie-Parser – For secure and smooth client-server communication

🧰 Dev & Build Tools

  • Nodemon – Hot-reloading during backend development
  • ESLint + Prettier – Code linting and formatting
  • PostCSS + Autoprefixer – Enhanced CSS compatibility
  • dotenv – Environment variable management

📦 Others

  • Axios – For handling all frontend and backend HTTP requests
  • date-fns – Lightweight date utility for date handling and formatting
  • Smoothscroll Polyfill – For cross-browser smooth scrolling behavior

🚀 Deployment

  • Frontend is deployed on Vercel for blazing fast performance and global CDN support.
  • Backend is hosted on Render, providing autoscaling and a reliable Node.js runtime environment.

📡 API References

🧑‍💻 Auth & Hospital Management

All routes below use JWT-based authentication (verifyJWT middleware)

  • POST /api/hospital/register
    Register a new hospital (with avatar upload)

  • POST /api/hospital/login
    Log in a hospital and receive tokens

  • GET /api/hospital/logout
    Logout and invalidate session

  • POST /api/hospital/refresh-token
    Refresh JWT token

  • PATCH /api/hospital/change-password
    Change password for logged-in hospital

  • GET /api/hospital/current-hospital
    Get current hospital profile

  • PATCH /api/hospital/update-profile
    Update hospital profile information

  • PATCH /api/hospital/change-avatar
    Update hospital avatar (image upload)


🫀 Donor APIs

  • POST /api/hospital/donor/add-donor
    Add a new donor to the system

  • GET /api/hospital/donor/get-requests/:donor_id
    Get all recipient requests for a specific donor

  • PATCH /api/hospital/donor/accept-request
    Accept a request for organ donation

  • PATCH /api/hospital/donor/reject-request
    Reject a request for organ donation

  • GET /api/hospital/donor/donors
    List all registered donors

  • DELETE /api/hospital/donor/delete/:id
    Delete a donor by ID


🧍‍♀️ Recipient APIs

  • POST /api/hospital/recipient/send-request
    Send a request to a donor

  • GET /api/hospital/recipient/search-donors
    Search for potential donors based on criteria

  • GET /api/hospital/recipient/recipients
    List all recipients

  • DELETE /api/hospital/recipient/delete/:id
    Delete a recipient by ID


📊 Analytics & Activity

  • GET /api/hospital/match-history
    Fetch match history of donors and recipients

  • GET /api/hospital/get-stats
    Get statistical overview (e.g. counts, totals)

  • GET /api/hospital/get-activity
    Get recent hospital activity log


🧪 Getting Started

Follow the steps below to run OrganLink locally on your machine.

📦 Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB (Local instance or MongoDB Atlas)
  • Package manager: npm

🚀 Installation

1. Clone the Repository

git clone https://github.com/Sudhanshu-NITR/OrganLink.git
cd OrganLink

2. Install Frontend Dependencies

cd Frontend
npm install

3. Install Backend Dependencies

cd ../Backend
npm install

4. 🧑‍💻 Running the App Locally

Start the Backend

cd Backend
npm run dev

Start the Frontend

In a new terminal window:

cd Frontend
npm run dev

🔐 Environment Variables

OrganLink requires a .env file in the Backend/ directory to run properly. Below are the required environment variables:

# Server Port
PORT=8800

# MongoDB connection URI
MONGODB_URI=your_mongodb_connection_string

# CORS setup
CORS_ORIGIN=*

# JWT Tokens
ACCESS_TOKEN_SECRET=your_access_token_secret
ACCESS_TOKEN_EXPIRY=1d

REFRESH_TOKEN_SECRET=your_refresh_token_secret
REFRESH_TOKEN_EXPIRY=10d

# Cloudinary configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret

Screenshots

OrganLink Dashboard

Donor Page

Recipient Page

Match History Page

🌱 Future Scope

  • Real-time organ availability tracking map
  • SMS/email alerts to registered hospitals
  • AI-powered match ranking system
  • Donor card QR generation and mobile-friendly version

About

A platform that connects donors, recipients, and hospitals to streamline organ transplants and reduce delays.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages