The objective of this project is to implement a user room booking feature for a hotel management system. The system will allow users to select rooms based on availability, input booking details such as check-in and check-out dates, and proceed with payment (UC-6). Once the payment is confirmed, the booking will be finalized and stored in the database. Additionally, room status will be updated automatically to reflect its current state (e.g., Reserved, Occupied, Cleaning).
Requirements:
Room Selection:
The user should be able to view available rooms based on the selected check-in and check-out dates.
Room availability will be checked and displayed to the user in real time.
Each room will have attributes such as room type, amenities, maximum occupancy, and price.
The user can select one room and proceed to booking.
If a room is already booked for one set of dates, it should still be available to other users for different, non-overlapping date ranges.
Booking Details:
The user should input personal information, including first name, last name, email, phone number, and address.
The user can review booking details (selected room, price, check-in, and check-out dates) before proceeding.
The total price of the room, including taxes and service fees, should be calculated and displayed.
Room Status Update:
Upon successful booking, the room status will automatically be updated to "Reserved."
Rooms that has not been booked, will be marked as "Available".
Checklists for Implementation:
Frontend (Angular):
[x] Display rooms available for the user’s selected check-in and check-out dates.
[x] Indicate which rooms are booked for different date ranges, allowing users to select the room for non-overlapping periods.
[x] Allow users to select rooms even if they are booked by someone else for different dates.
[x] Include room details like images, type, price, and maximum occupancy.
[x] Implement selection logic so only one room can be selected at a time.
[x] Create a form for user details (first name, last name, email, phone, address).
[x] Show booking summary with room details, stay duration, and total price.
[x] Disable the "Book Now" button until valid user inputs and room selection are completed.
[x] Disable the "Pay Now" button until valid user information and payment information are completed.
Backend (Node.js):
[x] Create API routes to check room availability based on user-provided dates.
[x] Ensure rooms are available to be booked concurrently if dates do not overlap.
[x] Implement the booking API to create a booking for the user and store booking details in the database.
[x] Update room status to "Reserved" upon booking confirmation.
[x] Ensure user details (name, email, phone, address) are collected during booking and be sent to the dataabse.
Database:
[x] Designed a Booking schema to track user details, room ID, check-in and check-out dates, and room status for each booking.
[x] Design a Room schema to track room information such as amenities, price, image, max occupancy, and etc.
[x] Updated the Room schema to manage room availability based on date ranges.
Testing:
[x] Test room availability checks based on date ranges.
[x] Test booking creation for non-overlapping dates and ensure concurrent booking works for different periods.
[x] Test the entire flow: room selection, availability checks, booking creation, and payment processing.
[x] Ensure rooms can be booked by multiple users for different dates without conflict.
[ ] Test that room statuses (Reserved, Occupied) update correctly at different stages of the booking lifecycle.
[x] Test room status transitions for multiple bookings at different date ranges.
Room Booking System for Users
The objective of this project is to implement a user room booking feature for a hotel management system. The system will allow users to select rooms based on availability, input booking details such as check-in and check-out dates, and proceed with payment (UC-6). Once the payment is confirmed, the booking will be finalized and stored in the database. Additionally, room status will be updated automatically to reflect its current state (e.g., Reserved, Occupied, Cleaning).
Requirements:
Room Selection:
Booking Details:
Room Status Update:
Checklists for Implementation:
Frontend (Angular):
Backend (Node.js):
Database:
Testing:
[x] Test room status transitions for multiple bookings at different date ranges.