Fyp Design Document

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

Institute of Business and Information Technology (IBIT)

University of the Punjab

Final IT Project
Spring Term 2024

IT-JU Tech

Submitted To:

Sir Asim Rasool

Submitted By:

Roll Number Name

F20BB108 Izzah Wahab

F20BB112 Tehreem Irfan

F20BB115 Junaid Farooq

F20BB144 Umar Hanif Qureshi

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

1.1 Usecase Description..........................................................................3

1.2 Usecase Diagram (refined and updated)........................................3

1.3 Sequence Diagram.........................................................................4

1.4 Design Class Diagram.................................................................10

1.5 Entity Relationship Diagram.......................................................11

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.

1.1 Use-case Description

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

Management of Blood Bank:


Description: The Admin oversees the blood bank's inventory, ensuring that blood
supplies are recorded, updated, and managed effectively.
Actors Involved: Admin

P a g e 4 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab

Management of Blood Donors:


Description: The Admin manages the list of blood donors, including registering new
donors, updating donor information, and monitoring donation records.
Actors Involved: Admin

User Management:
Description: The Admin manages user accounts, including creating, updating, and
deleting users, as well as assigning roles and permissions.
Actors Involved: Admin

1.2 Use-case Diagram (refined and updated)

1.2 sequence diagram

P a g e 5 | 12
Institute of Business and Information Technology (IBIT)
University of the Punjab

User: initiates the process by registering as a donor.


Authentication: validates the user's credentials.
Donor: The entity is updated with the user's information.
User: submits a blood request.
Blood-Request: records the new request.
Inventory: checks the availability of the requested blood type.
Blood-Request: updates the status based on inventory check.

1.4 Design class Diagram

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).

1.5 Entity relationship Diagram

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

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:
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

 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.

P a g e 12 | 12

You might also like