Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DonorLink - A MERN stack web app connecting blood donation prospects directly to donors, facilitating quick responses during emergencies by bypassing traffic in local blood banks.


Detailed README.md for GitHub

DonorLink

DonorLink is a web application designed to connect individuals in urgent need of blood donations with nearby donors, avoiding the delays of local blood banks. This system allows prospects to directly connect with interested donors and ensures timely assistance in emergency health situations.

Features

  • Direct Donor-Prospect Connection: Connects users with available blood donors without intermediaries.
  • Emergency Focused: Aids in time-critical situations by quickly matching donors with those in need.
  • Secure Authentication: Utilizes JWT, Crypto-JS, and CORS for secure communication and authentication.
  • Automated Emails: Uses Node-Mailer to send notifications to donors.
  • Scheduled Cleanup: Node-Cron is implemented to clean up old/expired data.

Tech Stack

  • Frontend: React.js, Tailwind CSS
  • Backend: Express.js, Node.js, MongoDB, EJS (Embedded JavaScript)
  • Database: MongoDB for storing donor and prospect information
  • Authentication: JWT (JSON Web Token), Crypto-JS for encryption
  • Styling: Tailwind CSS for responsive and modern design
  • Email Automation: Node-Mailer for sending automated email notifications
  • Task Scheduling: Node-Cron for scheduling routine tasks

Libraries/Dependencies

  • Frontend:

    • react
    • tailwindcss
  • Backend:

    • express
    • mongoose
    • cors
    • crypto-js
    • jsonwebtoken
    • node-cron
    • nodemailer

Installation and Setup

Prerequisites

Ensure you have the following installed:

Steps to Run Locally

  1. Clone the repository:

    git clone https://github.com/your-username/donorlink.git
    cd donorlink
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory and add the following values:

    MONGO_URI=your_mongo_database_uri
    JWT_SECRET=your_jwt_secret
    MAIL_USER=your_email_username
    MAIL_PASS=your_email_password
    
  4. Start the development server:

    npm run dev
  5. Open your browser and navigate to http://localhost:3000 to access the application.

Usage

  • User Registration and Login: Prospects and donors can register and log in to access the platform.
  • Donor Search: A prospect can search for blood donors by blood type and location.
  • Connect with Donors: The system displays available donors and allows for direct messaging.
  • Email Notifications: Donors receive an email notification when they match with a prospect.

Project Structure

DonorLink/
│
├── backend/          # Backend server files (Express, MongoDB setup)
│   ├── models/       # Mongoose models for Donor, Prospect, etc.
│   ├── routes/       # API endpoints for donors, prospects, and authentication
│   └── utils/        # Utility functions (mail, cron jobs, etc.)
│
├── frontend/         # React frontend files
│   ├── components/   # React components (UI elements, forms, etc.)
│   ├── pages/        # Pages (Home, Register, Login, etc.)
│   └── services/     # API services (Axios setup)
│
├── public/           # Public assets (images, CSS)
├── .env              # Environment variables
├── package.json      # Node.js dependencies and scripts
└── README.md         # Project documentation

APIs

The following API endpoints are available:

  • POST /api/auth/register - Register a new user (prospect or donor)
  • POST /api/auth/login - Log in a user
  • GET /api/donors - Fetch available blood donors based on location and blood type
  • POST /api/prospects/request - Submit a blood request

Contributing

We welcome contributions! Please fork the repository and create a pull request. For major changes, please open an issue first to discuss what you would like to change.


Feel free to adjust the content as necessary for your project's exact details and repo setup!

About

DonorLink : A MERN stack web app designed to connect blood donation prospects directly with donors during emergencies, bypassing delays at local blood banks, and ensuring quick and secure connections using MongoDB for real-time data management.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages