Create a Blood Bank Management System. You have to use mongodb and Node Js for backend. Iclude comments and ensure security throught authorization middlewares and JWT tokens
Provide Testpoints for all api's that i will be listing along with full details how to test it in postman 3 User Donors, Recipient and Staff 1)User types Authenitcation: Donor, Recipients and Staff can login/logout, update profile, reset password, view profile
Donor mangement: Donor and Staff can view donation history, Schedule Donation, Check eligiblity, update health status, view certificates and recipient cannot do these things
Recipient Management: Recipient and Staff can Create blood request , view request statis, update request urgency, cancel request, view request history and Donor cannot do these things.
Blooad Bank Mangement: only staff can view bood invenotry, update bloood status, process request, manage inventory, view all requests, recipient and donors cannot do these things.
API Ebndpints by Role
Users:
/api/auth/login - POST - User login /api/auth/register - POST - User registration /api/auth/profile - GET - Get user profile /api/auth/profile - PATCH - Update Profile
Donor /api/donors/donoations- POST - Creat donoation /api/donors/donations - GET - Get donation History /api/donors/eligbility - GET - Check eigiblity
Recipient /api/recipient/requests - POST - Create blood request /api/recipient/requests - GET - Get request history /api/recipient/requests/:id - PATCH - Update request
Staff /api/blood-bank/inventory- GET - View Inventory /api/blood-bank/inventory - POST - Add inventory /api/blood-bank/requests - GET- View all requests /api/blood-bank/requests/:id- PATCH- Process request
Application- Client Routes Auth Routes Donor Routes Recipinet Routes Blood Bank Routes
Controller: Auth Controller Donor Recipinet Blood Bank
Models user (email,pass,rolename,phonenumber,isVerified,createdAt) Donor (userId(Foreign Key ref:User) ,bloodType,lastDonationDate,donationCount,healtStatus,createdAt) recipient (userId(Foreign Key ref:User) ,bloodType,diagnosis,hospitalName,emergenecyContact,createdAt) Blood (donorid(Foreign Key ref:Donor),recipinetid(Foreign Key ref:recipient,bloodtype,units,enum status(avaialble | requested | allocated) ,donationDate,expiryDate,createdAt)
I'll create a Blood Bank Management System using MongoDB and Node.js for the backend, including comments, security through authorization middlewares, and JWT tokens. I'll also provide test points for all the APIs you've listed, along with details on how to test them in Postman.
Let's start by setting up the project structure and implementing the core functionality.
Let's begin with the project setup and core functionality: