Fyp Design Document
Fyp Design Document
Fyp Design Document
Final IT Project
Spring Term 2024
IT-JU Tech
Submitted To:
Submitted By:
P a g e 1 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
IT-JU Tech
P a g e 2 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
TABLE OF CONTENTS
1 Introduction.......................................................................................2
P a g e 3 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
Introduction:
The MERN Stack Blood Bank Project is a comprehensive web application designed
to streamline and enhance the process of blood donation and management. Leveraging
the power of MongoDB, Express.js, React.js, and Node.js, this project aims to provide
an intuitive and efficient platform for both blood banks and donors.
Blood banks play a crucial role in the healthcare system by ensuring the availability of
blood for patients in need. However, managing blood inventory, donor information,
and blood requests can be challenging. The MERN Stack Blood Bank Project
addresses these challenges by offering a centralized, digital solution that facilitates the
entire blood donation process, from donor registration to fulfilling blood requests.
Actors:
Admin:
The main actor responsible for overseeing and managing the entire blood bank
system. The Admin ensures that all operations are running smoothly, and the system
is secure and up-to-date.
Use Cases:
Register:
Description:
The Admin can register new users, including other admins, donors, and recipients.
Actors Involved: Admin
Login:
Description: The Admin can log into the system using their credentials.
Actors Involved: Admin
Authenticate:
Description: The Admin verifies the credentials of users and ensures they have the
correct permissions to access specific functionalities.
Actors Involved: Admin
Management of Hospital:
Description: The Admin manages hospital records, including adding new hospitals,
updating existing hospital details, and removing hospitals from the system.
Actors Involved: Admin
P a g e 4 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
User Management:
Description: The Admin manages user accounts, including creating, updating, and
deleting users, as well as assigning roles and permissions.
Actors Involved: Admin
P a g e 5 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
P a g e 6 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
User:
P a g e 7 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
Attributes:
userId: Unique identifier for the user.
name: Name of the user.
email: Email address of the user.
password: Password for user authentication.
phoneNumber: Contact number of the user.
userType: Type of user (Donor/Recipient/Admin).
Methods:
register(): Method for user registration.
login(): Method for user login.
updateProfile(): Method to update user profile information.
Donor:
Attributes:
donorId: Unique identifier for the donor.
userId: Identifier linking to the User entity.
bloodType: Blood type of the donor.
lastDonationDate: Date of the last blood donation.
Methods:
registerAsDonor(): Method for registering as a donor.
updateDonationDate(): Method to update the last donation date.
Inventory:
Attributes:
inventoryId: Unique identifier for the inventory item.
bloodType: Type of blood available in the inventory.
quantity: Quantity of blood available for each blood type.
Methods:
addBlood(): Method to add blood to the inventory.
updateQuantity(): Method to update the quantity of blood.
BloodRequest:
Attributes:
requestId: Unique identifier for the blood request.
userId: Identifier linking to the User entity.
bloodType: Type of blood requested.
status: Status of the request (e.g., pending, fulfilled).
requestDate: Date when the blood request was made.
Methods:
createRequest(): Method to create a new blood request.
updateRequestStatus(): Method to update the status of a request.
Authentication:
P a g e 8 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
Attributes:
authId: Unique identifier for the authentication record.
userId: Identifier linking to the User entity.
token: Authentication token.
expiry: Expiry date and time of the token.
Methods:
generateToken(): Method to generate a new token.
validateToken(): Method to validate an existing token.
invalidateToken(): Method to invalidate a token.
Relationships:
User to Donor:
One User can be associated with one Donor (1-to-1 relationship).
User to BloodRequest:
One User can make multiple BloodRequests (1-to-many relationship).
Inventory to BloodRequest:
One Inventory can be linked to multiple BloodRequests (1-to-many relationship).
User to Authentication:
One User can have multiple Authentication records (1-to-many relationship).
P a g e 9 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
In this ERD:
User:
userId: Unique identifier for the user (Primary Key).
name: Name of the user.
email: Email address of the user.
password: Password for user authentication.
phoneNumber: Contact number of the user.
userType: Type of user (Donor/Recipient/Admin).
Donor:
P a g e 10 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
Inventory:
inventoryId: Unique identifier for the inventory item (Primary Key).
bloodType: Type of blood available in the inventory.
quantity: Quantity of blood available for each blood type.
BloodRequest:
requestId: Unique identifier for the blood request (Primary Key).
userId: Identifier linking to the User entity (Foreign Key).
bloodType: Type of blood requested.
status: Status of the request (e.g., pending, fulfilled).
requestDate: Date when the blood request was made.
Relationships:
User:
userId: Unique identifier for the user (Primary Key).
name: Name of the user.
email: Email address of the user.
password: Password for user authentication.
phoneNumber: Contact number of the user.
userType: Type of user (Donor/Recipient/Admin).
Donor:
donorId: Unique identifier for the donor (Primary Key).
userId: Identifier linking to the User entity (Foreign Key).
bloodType: Blood type of the donor.
lastDonationDate: Date of the last blood donation.
Inventory:
P a g e 11 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab
P a g e 12 | 12