This is a property reservation API made using Java 17 and Spring Boot 3.2.2.
Booking: is when a guest selects a start and end date and submits a reservation on a property.
Block: is when the property owner or manager selects a range of days during which no guest can make a booking (e.g. the owner wants to use the property for themselves, or the property manager needs to schedule the repainting of a few rooms).
- Create a booking and block.
- Cancel a booking and block.
- Rebook a canceled booking and block.
- Delete a booking and block from the system.
- Get booking and block information.
You can configure this project by cloning the current repository and running Maven
git clone https://github.com/senavs/hostfully-booking.git
cd booking/
./mvnw spring-boot:run
Integration tests were configure covering the following scenarios:
Person
- Register a new person into the system.
Property
- List all property that a person owns.
- Register a new property into the system and link it to its owner.
Reservation
- List all reservations for a property.
- List all reservations that are not marked as deleted.
- Book a property.
- Book a property, but there is another reservation in the same date range.
- Book a property, but it is blocked by the property owner.
- Soft delete a reservation (mark it as deleted).
- Hard delete a reservation (remove it from database).
- Rebook a property using a reservation previously marked as deleted.
- Rebook a property using a reservation previously marked as deleted, but there is another reservation in the same date range.
You can download Postman Collection here.
- Implement user authentication for update or register property and its reservations.
- Implement security request validations in param to avoid SQL Injection.
- Add pagination to
findAll
queries usingPagingAndSortingRepository
Spring interface. - Configure Docker Image and Docker Compose for straight forward local/production setup and container orchestration, scalability and availability.
- Configure server-side cache for most requested endpoints, using Redis as example.
- Configure database replicas or a data warehouse to not overload the unique instance of the database.