DEV Community

Cover image for How I Built a Full-Stack Blood Donation Management System with React, Node.js & Socket.IO
Bollareddy Pranoy Raj
Bollareddy Pranoy Raj

Posted on

How I Built a Full-Stack Blood Donation Management System with React, Node.js & Socket.IO

What I Built

A full-stack Blood Donation Management System for Aditya University that handles
camp registration, live dashboards, admin management, and real-time updates.

πŸ”΄ Live Demo: https://blood-donation-web-gamma.vercel.app
πŸ’» GitHub: https://github.com/BollareddyPranoyRaj/BloodDonationWeb

Tech Stack

  • Frontend: React, React Bootstrap, Recharts, Socket.IO Client
  • Backend: Node.js, Express, MongoDB, Mongoose, Socket.IO
  • Deployment: Vercel (Frontend) + Render (Backend) + MongoDB Atlas

Key Features

  • πŸ•οΈ Camp-based donor registration flow
  • πŸ“Š Live dashboard with real-time Socket.IO updates
  • 🩸 Donation desk for confirming donations
  • πŸ‘¨β€πŸ’Ό Admin panel for managing camps and gallery
  • πŸ“ˆ Donor demographics and analytics with Recharts
  • πŸ“Έ Gallery management with image uploads
  • πŸ“¬ Contact form with message inbox
  • πŸ” OTP verification system

Complete REST API

Authentication

  • POST /api/login β€” Admin login
  • POST /api/send-otp β€” Send OTP for verification
  • POST /api/verify-otp β€” Verify OTP

Donor Registration

  • POST /api/register β€” Register as a donor for a camp
  • GET /api/registrations β€” Get all registrations
  • GET /api/registrations/search β€” Search donor by roll number/date
  • POST /api/registrations/confirm-donation β€” Confirm donation at desk

Events

  • POST /api/create-event β€” Create camp with banner image upload
  • GET /api/events β€” Get all blood donation camps
  • DELETE /api/event/:id β€” Delete an event

Volunteers & Staff

  • POST /api/add-volunteer β€” Add volunteer
  • GET /api/volunteers β€” Get all volunteers
  • POST /api/add-staff β€” Add staff donor manually
  • GET /api/staff β€” Get all staff donors
  • POST /api/add-guest-management β€” Add guest/management donor
  • GET /api/guest-management β€” Get all guest donors

Gallery

  • POST /api/upload-gallery β€” Upload image to gallery
  • GET /api/gallery β€” Get all gallery images

Contact

  • POST /api/contact β€” Submit contact form
  • GET /api/messages β€” Get all contact messages

Real-time

  • Socket.IO β€” Live dashboard updates on every donation confirmation

Biggest Challenge

Deploying a monorepo to Render β€” the backend folder was accidentally
set as a git submodule which caused build failures. Fixed it by
deinitializing the submodule and re-adding as a regular folder.

What I Learned

  • Real-time communication with Socket.IO
  • Full-stack deployment with Vercel + Render + MongoDB Atlas
  • Monorepo structure for full-stack projects
  • OTP-based authentication flow
  • Image upload handling with Multer

What's Next

  • Cloudinary integration for persistent image uploads
  • Donor export/reporting feature
  • Automated tests

If you have any questions about the project, drop them in the comments!

Top comments (0)