diff --git a/docs/README.md b/docs/README.md index 4d61f91f..bde85cb4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,35 +14,7 @@ The Team Reservation Management System is a web-based application designed to st ### Use Cases The system supports several key use cases to enhance user experience and manage reservations efficiently. The following diagram provides an overview of the major use cases involved: -* Use Case Diagram: -``` -@startuml -left to right direction -actor User as U #yellow -actor Admin as A #lightblue -actor "Super Admin" as SA #pink -rectangle "Reservation Management System" { - U --> (Login) - U --> (Signup) - U --> (View Availability of venues according to the location) - U --> (View Availability of venues according to the venue type) - U --> (Reserve a venue) - U --> (View Summary and State of Reservation) - U --> (Remove draft venues) - U --> (Add feedback) - U --> (Cancel reservation) - A --> (Login) - A --> (Update Venue Details) - A --> (Add new venue details) - A --> (View the user reservations) - A --> (Accept/Reject user reservation) - A --> (Reply to Feedback) - A --> (Delete the venue) - A --> (Generate Reports) - SA --> (Assign Admin) -} -@enduml -``` + ### User Stories User stories capture the functionality from the perspective of different roles in the system. Each story describes a specific requirement or feature the system should fulfill. @@ -113,42 +85,140 @@ As an Admin, I want to generate reports about venue usage and user reservations ### Activity Diagram The activity diagram illustrates the flow of actions users perform within the system to complete various tasks such as reserving a venue, managing user roles, and generating reports. -* **Activity Diagram**: -``` - @startuml +## Description +This Venue Reservation System allows users to view and reserve venues online. The system accommodates different user types: guest users, registered users, and administrators, each with varying permissions and capabilities. + +## User and Admin Activity Flow +The UML activity diagram below illustrates the interactions between users (both guest and registered) and the system, as well as how administrators manage venues and reservations. + +### Diagram Outline + +1. **Landing Page Interaction** + Users start by landing on the homepage, where they are presented with: + - Login option + - Sign-up option + - Featured Venues section (available for all users, including guests) + Users can log in, sign up, or interact with featured venues. + +2. **Login Flow** + If a user clicks on Login, they are redirected to the login page: + - Users can log in if they have an account, redirecting them to the Logged-In Dashboard. + - Users can sign up if they do not have an account, redirecting to the Sign-Up Page. + +3. **Guest User Interaction** + If a user clicks on Featured Venues without logging in, they are treated as a Guest User: + - They can search for venues and view filtered results. + - They can check venue availability in a read-only calendar. + - If a guest user clicks to reserve a venue, they are prompted to sign up. + +4. **Registered User Interaction** + Once a user is logged in, they are redirected to their Logged-In Dashboard, where they can: + - **Search Venues**: View filtered results and proceed to the reservation form. + - **View My Reservations**: See a list of their reservations with options to modify or cancel. + - **View/Edit Profile**: Access and update their profile information. + +5. **Admin Interaction** + An Admin User logs in to access the Admin Dashboard: + - Admins can view venue utilization charts and reports. + - Admins can manage reservations, viewing requests and approving or rejecting them. + - Admins can manage venues, with options to add, edit, or delete venue information. + +## Activity Diagram +To better visualize the described user flow, the following activity diagram was generated using PlantUML: + +```plantuml +@startuml +|User| start -:User Login; -if (Is User Registered?) then (yes) - :Authenticate User; +:Land on Landing Page; +:View Login, Signup, and Featured Venues Options; + +if (User clicks on Login?) then (yes) + :Redirect to Login Page; + if (Has Account?) then (yes) + :Log In; + :Redirect to Logged-In Dashboard; + else (no) + :Redirect to Sign-Up Page; + endif else (no) - :Register User; - :Authenticate User; + if (Click on Featured Venues?) then (yes) + :Redirect to Guest User Dashboard; + |Guest User| + if (Click on Login or Signup?) then (yes) + :Redirect to Login or Signup Page; + else (no) + if (Search Venue?) then (yes) + :Enter Venue Name or Filter Criteria; + :View Filtered Venues; + if (Click on Venue?) then (yes) + :View Reservation Calendar (Read-Only); + if (Guest User?) then (yes) + :Prompt to Sign-Up for Reservation; + else (no) + :Proceed to Reservation Form; + endif + endif + endif + endif + endif endif -:View Available Reservations; -if (Select Reservation?) then (yes) - :Provide Reservation Details; - :Confirm Reservation; - :Send Confirmation Email; -else (no) - :Exit System; + +|Registered User| +if (User is Logged In?) then (yes) + :Redirect to Logged-In Dashboard; + :Search Venue, View My Reservations, or View Profile; + + if (Click on My Reservations?) then (yes) + :View Reservations List; + if (Modify Reservation?) then (yes) + :Update Reservation; + endif + if (Cancel Reservation?) then (yes) + :Cancel Reservation; + endif + endif + + if (Click Profile?) then (yes) + :View Profile Info; + if (Edit Profile?) then (yes) + :Edit Profile Info; + :Save Changes; + endif + endif + + if (Search Venue?) then (yes) + :Enter Venue Name or Filter Criteria; + :View Filtered Venues; + if (Click on Venue?) then (yes) + :View Reservation Calendar; + :Proceed to Reservation Form; + :Confirm Reservation; + endif + endif endif -if (Modify Reservation?) then (yes) - :Retrieve Reservation; - :Update Reservation Details; - :Send Update Confirmation; -else (no) - if (Cancel Reservation?) then (yes) - :Retrieve Reservation; - :Process Cancellation; - :Send Cancellation Confirmation; - else (no) - :Exit System; - endif + +|Admin| +if (Admin Log In?) then (yes) + :Redirect to Admin Dashboard; + :View Venue Utilization and Reports; + if (Manage Reservations?) then (yes) + :View Reservation Requests; + if (Approve or Reject Request?) then (yes) + :Send Approval/Rejection Notification; + endif + endif + if (Manage Venues?) then (yes) + :View Venues List; + if (Add/Edit/Delete Venue?) then (yes) + :Perform Venue Operations; + endif + endif endif -:Log Out; + stop @enduml -``` + ### Mockup Design The system design is visualized through mockups, which offer a representation of the user interface and flow. diff --git a/docs/schema/er_digram.wsd b/docs/schema/er_digram.wsd new file mode 100644 index 00000000..ff3ebce5 --- /dev/null +++ b/docs/schema/er_digram.wsd @@ -0,0 +1,71 @@ +@startuml +!define RECTANGLE_COLOR #FDF5E6 +!define ENTITY_COLOR #FFFAFA + +entity USER { + *user_id : uuid [PK] + -- + first_name : string + last_name : string + contact_number : int + address : string + email : string + password : string + user_type : enum {user, admin} +} + +entity VENUE { + *venue_id : uuid [PK] + -- + name : string + photo : string + description : string + capacity : int + venue_size : string + venue_type : enum {Auditorium, Outdoor, Co-Working Space, Conference Hall} + availability : enum {Available, Partial Available, Not Available, Reserved} + time_mode : enum {entire_day, hourly_time, session_time} + *location_id : uuid [FK] +} + +entity LOCATION { + *location_id : uuid [PK] + -- + city : string + district : string + provincial : string +} + +entity RESERVATION { + *reservation_id : uuid [PK] + -- + *user_id : uuid [FK] + *venue_id : uuid [FK] + title : string + purpose_of_reservation : string + time_duration : int + extra_services : enum {food, sound_system, private_parking, projectors, extend hours} + reservation_date : date + created_at : timestamp + updated_at : timestamp + question : string + option : string +} + +entity RESERVATION_STATE { + *reservation_state_id : uuid [PK] + -- + *reservation_id : uuid [FK] + status : enum {Pending, Rejected, Accepted} + admin_comments : string +} + + + +USER ||--|{ RESERVATION : "" +USER ||--o{ VENUE : "" +USER ||--o{ RESERVATION_STATE : "" +VENUE -- RESERVATION : "" +RESERVATION -- RESERVATION_STATE : "" +VENUE -- LOCATION : "" +@enduml \ No newline at end of file diff --git a/docs/uml/activity.wsd b/docs/uml/activity.wsd index c6f50609..cf629e7f 100644 --- a/docs/uml/activity.wsd +++ b/docs/uml/activity.wsd @@ -1,33 +1,91 @@ -@startuml Activity Diagram +@startuml Activity Diagram +|User| start -:User Login; -if (Is User Registered?) then (yes) - :Authenticate User; +:Land on Landing Page; +:View Login, Signup, and Featured Venues Options; + +if (User clicks on Login?) then (yes) + :Redirect to Login Page; + if (Has Account?) then (yes) + :Log In; + :Redirect to Logged-In Dashboard; + else (no) + :Redirect to Sign-Up Page; + endif else (no) - :Register User; - :Authenticate User; + if (Click on Featured Venues?) then (yes) + :Redirect to Guest User Dashboard; + |Guest User| + if (Click on Login or Signup?) then (yes) + :Redirect to Login or Signup Page; + else (no) + if (Search Venue?) then (yes) + :Enter Venue Name or Filter Criteria; + :View Filtered Venues; + if (Click on Venue?) then (yes) + :View Reservation Calendar (Read-Only); + if (Guest User?) then (yes) + :Prompt to Sign-Up for Reservation; + else (no) + :Proceed to Reservation Form; + endif + endif + endif + endif + endif endif -:View Available Reservations; -if (Select Reservation?) then (yes) - :Provide Reservation Details; - :Confirm Reservation; - :Send Confirmation Email; -else (no) - :Exit System; + +|Registered User| +if (User is Logged In?) then (yes) + :Redirect to Logged-In Dashboard; + :Search Venue, View My Reservations, or View Profile; + + if (Click on My Reservations?) then (yes) + :View Reservations List; + if (Modify Reservation?) then (yes) + :Update Reservation; + endif + if (Cancel Reservation?) then (yes) + :Cancel Reservation; + endif + endif + + if (Click Profile?) then (yes) + :View Profile Info; + if (Edit Profile?) then (yes) + :Edit Profile Info; + :Save Changes; + endif + endif + + if (Search Venue?) then (yes) + :Enter Venue Name or Filter Criteria; + :View Filtered Venues; + if (Click on Venue?) then (yes) + :View Reservation Calendar; + :Proceed to Reservation Form; + :Confirm Reservation; + endif + endif endif -if (Modify Reservation?) then (yes) - :Retrieve Reservation; - :Update Reservation Details; - :Send Update Confirmation; -else (no) - if (Cancel Reservation?) then (yes) - :Retrieve Reservation; - :Process Cancellation; - :Send Cancellation Confirmation; - else (no) - :Exit System; - endif + +|Admin| +if (Admin Log In?) then (yes) + :Redirect to Admin Dashboard; + :View Venue Utilization and Reports; + if (Manage Reservations?) then (yes) + :View Reservation Requests; + if (Approve or Reject Request?) then (yes) + :Send Approval/Rejection Notification; + endif + endif + if (Manage Venues?) then (yes) + :View Venues List; + if (Add/Edit/Delete Venue?) then (yes) + :Perform Venue Operations; + endif + endif endif -:Log Out; + stop -@enduml \ No newline at end of file +@enduml diff --git a/docs/uml/activity/admin-activity/add-venue.wsd b/docs/uml/activity/admin-activity/add-venue.wsd new file mode 100644 index 00000000..e6215ede --- /dev/null +++ b/docs/uml/activity/admin-activity/add-venue.wsd @@ -0,0 +1,61 @@ +@startuml +partition "Admin" { + start + :Log In; + :Navigate to Admin User Dashboard; + :Click "Manage" Button; + :Navigate to Admin Dashboard; + :Click "Venue Details"; + + if (Add New Venue?) then (yes) + :Click "Add New Venue"; + :Navigate to Add Venue Details Page; + :Enter General Venue Details; + :Enter Venue Related Settings; + :Enter Venue Related Questions; + + partition "System" { + :Validate Venue Information; + :Save Venue Details to Database; + :Show Confirmation Message; + } + + else (no) + endif + + if (View Venues List?) then (yes) + :View Venues List; + + if (Edit Venue?) then (yes) + :Click "Edit Venue"; + :Navigate to Edit Venue Details Page; + :Enter Updated Venue Details; + :Enter Updated Venue Settings; + :Update Venue Questions; + + partition "System" { + :Validate Updated Venue Information; + :Save Updated Venue Details to Database; + :Show Update Confirmation Message; + } + + else (no) + endif + + if (Delete Venue?) then (yes) + :Click "Delete Venue"; + + partition "System" { + :Confirm Deletion; + :Delete Venue from Database; + :Show Deletion Confirmation Message; + } + + else (no) + endif + else (no) + endif +} + +stop +@enduml diff --git a/docs/uml/activity/admin-activity/admin-login.wsd b/docs/uml/activity/admin-activity/admin-login.wsd new file mode 100644 index 00000000..13b1a4b4 --- /dev/null +++ b/docs/uml/activity/admin-activity/admin-login.wsd @@ -0,0 +1,39 @@ +@startuml +|Admin| +start +:Visit Admin Login Page; +:Enter Email/Password; +|System| +if (First Time Login?) then (yes) + :Redirect to Change Password Page; + :Enter New Password; + :Submit New Password; + if (Valid Password?) then (yes) + :Password Changed Successfully; + :Redirect to Admin Dashboard; + else (no) + :Show Error Message; + :Redirect to Admin Login Page; + endif +else (no) + if (Credentials Valid?) then (yes) + :Redirect to Admin Dashboard; + else (no) + :Show Error Message; + if (Forgot Password Clicked?) then (yes) + :Click "Forgot Password"; + :Enter Email; + :Send Password Reset Link; + |System| + if (Link Used?) then (yes) + :Reset Password; + :Redirect to Admin Login Page; + else (no) + :Show Error Message; + endif + endif + endif +endif + +stop +@enduml diff --git a/docs/uml/activity/admin-activity/calender.wsd b/docs/uml/activity/admin-activity/calender.wsd new file mode 100644 index 00000000..7acd8db4 --- /dev/null +++ b/docs/uml/activity/admin-activity/calender.wsd @@ -0,0 +1,38 @@ +@startuml +partition Admin { + :Log In; + :Navigate to Admin User Dashboard; + :Click "Manage" Button; + :Navigate to Admin Dashboard; + :Navigate to Calendar View; + :Select a Date on the Calendar; +} + +partition System { + if (Existing Reservation Status?) then (Yes) + :Display current Reservation Status; + else (No) + :Set status to "Available" by default; + endif +} + +partition Admin { + if (Add or Update Reservation Status?) then (Yes) + :Click to Add or Update Status; + :Select status ("Fully Reserved," "Partially Available," or "Not Available"); + + if (Partially Available?) then (Yes) + :Choose available hourly slots; + endif + + :Submit status; + else (No) + :Keep as "Available"; + endif +} + +partition System { + :Save and show updated status on Calendar; +} +stop +@enduml diff --git a/docs/uml/activity/admin-activity/reservation-request.wsd b/docs/uml/activity/admin-activity/reservation-request.wsd new file mode 100644 index 00000000..c9d3b16a --- /dev/null +++ b/docs/uml/activity/admin-activity/reservation-request.wsd @@ -0,0 +1,38 @@ +@startuml +|Admin| +start +:Log In; +:Navigate to Admin User Dashboard; +:Click "Manage" Button; +:Navigate to Admin Dashboard; +:Navigate to Reservation Requests; +:View list of reservation requests; + +:Click "See More" on a reservation; + +|System| +:Display detailed reservation information; + +|Admin| +if (Approve or Reject?) then (Approve) + :Click "Approve"; + :Admin adds comments if needed; + + |System| + :Update reservation status to "Approved"; + :Show confirmation message; + + |Admin| +else (Reject) + :Click "Reject"; + :Admin adds comments if needed; + + |System| + :Update reservation status to "Rejected"; + :Show rejection confirmation message; + + |Admin| +endif + +stop +@enduml diff --git a/docs/uml/activity/admin-activity/view-dashboard.wsd b/docs/uml/activity/admin-activity/view-dashboard.wsd new file mode 100644 index 00000000..5e27a7b0 --- /dev/null +++ b/docs/uml/activity/admin-activity/view-dashboard.wsd @@ -0,0 +1,33 @@ +@startuml +|Admin| +start +:Log In; +:Navigate to Admin User Dashboard; +:Click "Manage" Button; + +:Navigate to Admin Dashboard; + +fork + if (View Utilization Charts?) then (yes) + :View Utilization Charts (Last week, month, year); + endif +fork again + if (See Featured Venues?) then (yes) + :See Featured Venues (Most Reserved, Most Recent); + endif +fork again + :Access Sidebar Options; + + if (Select Sidebar Option?) then (Reservations) + :Click "Reservations" (Redirect to Reservation Requests); + elseif (Select Sidebar Option?) then (Calendar) + :Click "Calendar" (Redirect to Venue Calendar); + elseif (Select Sidebar Option?) then (Venue Details) + :Click "Venue Details" (Redirect to Venue Details); + elseif (Select Sidebar Option?) then (Payments) + :Click "Payments" (Redirect to Payment Info); + endif + +end fork +stop +@enduml diff --git a/docs/uml/activity/user-activity/my-reservations.wsd b/docs/uml/activity/user-activity/my-reservations.wsd new file mode 100644 index 00000000..50ff89b9 --- /dev/null +++ b/docs/uml/activity/user-activity/my-reservations.wsd @@ -0,0 +1,36 @@ +@startuml +|Registered User| +start +:Log In; +:Navigate to My Reservations; + +|System| +:Display List of Reservations as Cards (Pending, Accepted, Rejected); + +if (Click on Reservation Card?) then (yes) + :View Reservation Details; + + if (Reservation Status == "Pending") then (yes) + :Show Details with Message "Pending Approval"; + :Option to Cancel Request; + if (Cancel Request?) then (yes) + :Submit Cancellation Request; + |System| + :Show Confirmation Message "Cancellation Requested"; + else (no) + :Return to Reservations List; + endif + else if (Reservation Status == "Accepted") then (yes) + :Show Details with Message "Reservation Accepted"; + :Return to Reservations List; + + else if (Reservation Status == "Rejected") then (yes) + :Show Details with Message "Reservation Rejected"; + :Return to Reservations List; + endif +else (no) + :Return to Dashboard; +endif + +stop +@enduml diff --git a/docs/uml/activity/user-activity/register.wsd b/docs/uml/activity/user-activity/register.wsd new file mode 100644 index 00000000..0717a35f --- /dev/null +++ b/docs/uml/activity/user-activity/register.wsd @@ -0,0 +1,17 @@ +@startuml +|Guest User| +start +:Click on signup Button; +:Fill Registration Form (name,Email,phone number,Password); +:Submit Form; +|System| +if (Valid Inputs?) then (yes) + :Create New Account; + :Send Confirmation Email; + :Redirect to Login; +else (no) + :Show Error Message; + :Ask to Re-enter Details; +endif +stop +@enduml diff --git a/docs/uml/activity/user-activity/reservation-proposal.wsd b/docs/uml/activity/user-activity/reservation-proposal.wsd new file mode 100644 index 00000000..d3132e42 --- /dev/null +++ b/docs/uml/activity/user-activity/reservation-proposal.wsd @@ -0,0 +1,32 @@ +@startuml +|Registered User| +start +:Navigate to Venue Availability; +:Select Available Date; + +|System| +:Display Venue Availability Calendar; + +if (Select Available Date?) then (yes) + :Add Reservation Details; + :Select Amenities; + :Select Time; + :Answer Venue-Dependent Questions; + + |System| + :Show Reservation Summary; + + if (Confirm Reservation?) then (yes) + |System| + :Save Reservation to Database; + :Show Reservation Confirmation; + :Display Unique Reservation ID; + else (no) + :Return to Reservation Details; + endif +else (no) + :Return to Dashboard; +endif + +stop +@enduml diff --git a/docs/uml/activity/user-activity/user-login.wsd b/docs/uml/activity/user-activity/user-login.wsd new file mode 100644 index 00000000..adec9f6f --- /dev/null +++ b/docs/uml/activity/user-activity/user-login.wsd @@ -0,0 +1,52 @@ +@startuml +|User| +start +:Visit Login Page; +:Select Login Method (Email/Password, Magic Link, Google); + +if (Email/Password?) then (yes) + :Enter Email/Password; + if (Forgot Password Clicked?) then (yes) + :Click "Forgot Password"; + :Enter Email; + :Send Reset Link; + |System| + if (Link Used?) then (yes) + :Reset Password; + :Redirect to Login Page; + else (no) + :Show Error Message; + endif + endif + :Click Login; + |System| + if (Credentials Valid?) then (yes) + :Redirect to User Dashboard; + else (no) + :Show Error; + endif +else (no) + if (Magic Link?) then (yes) + :Enter Email for Magic Link; + :Send Magic Link; + |System| + if (Link Clicked & Valid?) then (yes) + :Redirect to User Dashboard; + else (no) + :Show Link Expired Error; + endif + else (no) + if (Google Login?) then (yes) + :Authenticate via Google; + |System| + if (Auth Success?) then (yes) + :Redirect to User Dashboard; + else (no) + :Show Auth Error; + endif + endif + endif +endif + +stop +@enduml diff --git a/docs/uml/activity/user-activity/user-profile.wsd b/docs/uml/activity/user-activity/user-profile.wsd new file mode 100644 index 00000000..39788f91 --- /dev/null +++ b/docs/uml/activity/user-activity/user-profile.wsd @@ -0,0 +1,17 @@ +@startuml +|Registered User| +start +:Log In; +:Navigate to Profile Section; +:Click on Edit Profile; +:Update Profile Information; +:Save Changes; +|System| +if (Valid Changes?) then (yes) + :Update User Profile; + :Show Success Message; +else (no) + :Show Error Message; +endif +stop +@enduml diff --git a/docs/uml/activity/user-activity/viewvenueavailabiliy.wsd b/docs/uml/activity/user-activity/viewvenueavailabiliy.wsd new file mode 100644 index 00000000..4754d337 --- /dev/null +++ b/docs/uml/activity/user-activity/viewvenueavailabiliy.wsd @@ -0,0 +1,37 @@ +@startuml +|Guest User| +start +:Landing Page; +:Search for Preferred Venue; +:Filter Venues; +:View Venue Availability; + +if (Venue Available?) then (yes) + :Prompt to Log In or Create Account; + if (Log In?) then (yes) + |Registered User| + :Log In; + else (no) + :Create New Account; + endif +else (no) + :Show No Availability Message; +endif + +|Registered User| +:Log In; +:Navigate to Venue Availability; +:Select Available Date; + +|System| +:Display Venue Availability Calendar; + +if (Venue Available on Selected Date?) then (yes) + :Proceed to Reservation; +else (no) + :Show No Availability Message; + :Return to Select Another Date; +endif + +stop +@enduml diff --git a/docs/uml/usecase.wsd b/docs/uml/usecase.wsd index c3ed1dd3..368ebf5e 100644 --- a/docs/uml/usecase.wsd +++ b/docs/uml/usecase.wsd @@ -18,8 +18,9 @@ rectangle "Reservation Management System" { A --> (Add new venue details) A --> (View the user reservations) A --> (Accept/Reject user reservation) - A --> (Reply to Feedback) A --> (Delete the venue) + A --> (Make availability reservation) + A --> (aske question) A --> (Generate Reports) SA --> (Assign Admin) }