This is an web application for booking apartments and rooms with reliance on the Jersey RESTful Web Services framework on backend, and the Progressive JavaScript Framework-Vue.js on frontend.
Web application for a system that supports apartment reservations (such as Airbnb application). Using three user groups (roles): Guest, Host and Administrator. The application handles the following entities:
Username (unique)
Password
Name
Surname
Gender
Role (Administrator, Home, Away)
Apartments for rent (if the user is the Host)
Rented apartments (if the user is a Guest)
Reservation list (if the user is a Guest)
Latitude
Longitude
Address
Tip (whole apartment, room)
Number of rooms
Number of guests
Location
Release dates (set by Hosts)
Availability by dates (automatically generated by the system after each date change for issuance, creation of reservations or cancellation of reservations, system of forming lists on bases date of issue and created provisions)
Host
Comments for the apartment offered by guests who have visited the apartment
Pictures
Price per night
Check-in time (initially 14:00)
Check-out time (initial 10:00)
Status (Active or Inactive)
List of apartment contents (Benefits)
Reservation list
id
Name (eg parking, kitchen, iron, washing machine, etc.)
Apartment that is reserved
Booking start date
Number of nights (initially 1 night)
Total price
Booking message
Guest
Status (Created, Rejected, Cancel, Accepted, Completed)
Note: The guest can book a number of free / available dates only if they do not have them interrupts
Guest who left a comment
Apartment to which the comment refers
Text
Rating for the apartment
● Administrators are programmatically loaded from a text file and cannot be retrieved later add. Hosts can only be created by Administrators.
● All data changes must be saved in a file immediately after the operation is performed
● Functionality is available to a user type only if there is a described functionality for that user type
● Deletion is logical.
● If invalid arguments are sent from the client, there must be a response
○ Status 400 Bad Request
○ Error message in the body (HTML with error for JSP / Servlet, JSON for everything else)
● If a client tries to access a resource for which it does not have permission, it must have an answer
○ Status 403 Forbidden
○ Example: A guest tries to access a page to add the contents of an apartment that is the sole responsibility of the administrator.
● As a non-logged in user:
○ If I want to register:
■ It is necessary to enter a unique username, first name, last name, gender, password and a password control field
■ If a field is left blank or the passwords do not match, next to an error message is printed in the corresponding field
■ Pressing the send button sends a request to the server
■ In case of successful creation of a new Guest (username is unique and the Guest has been successfully created and logged into the application):
● The user is redirected to view the page accordingly his role
■ In case of failure to create a new Guest, an error message is displayed
● As a non-logged in user:
○ If I want to log in:
■ Enter the username and password in the fields provided for logging in
■ Both fields must be filled in, otherwise they are next to an empty field prints an error message
■ Pressing the send button sends a request to the server
■ In case of successful login, the user is redirected to the overview pages in accordance with its role
■ If the login fails, an error message and the user are displayed remains on the login page
● As a logged-in user of any type
○ I have the option to log out of the system
○ Pressing the send button sends a session invalidation request to the server
○ Upon successful logout, the login page opens
● As a logged in user of any type:
○ I have insight into my personal data
○ I can change my personal data as well as my password (except username)
■ All changes must be valid - if a field is not filled in or passwords are not appropriate (old is not good or new and control are not the same), in addition an error message is printed in the corresponding field
■ Pressing the send button sends a change request to the server
■ In the event of a successful change, the user is notified
■ In case of unsuccessful change of the data to the user, an error is printed
● As Administrator:
○ I have an overview of all existing users in the system, and I can also search
● As Host:
○ I have an overview of all the users who have made a reservation for my apartments and I can search among them
● As an unregistered user or as a Guest I can view all apartments with the status ACTIVE:
○ I can search the apartment
○ I have the option of sorting apartments according to all criteria
○ I have a review of Guest comments on the apartments
● As a Host I have the opportunity to:
○ View, sort and filter by all criteria, but only your own apartments with the status ACTIVE
○ I have an overview of my apartments with the status INACTIVE
○ I can change the information about my apartment:
■ All changes must be valid - if a required field is not filled in, an error message is displayed next to the corresponding field
■ Pressing the send button sends a change request to the server
■ In the event of a successful data change, the user is notified
■ In case of unsuccessful data change, an error is displayed to the user
○ I can delete my apartment
● As an Administrator you can:
○ I see all apartments regardless of their status
○ I am modifying the information about the apartment (same change procedure as the host)
○ I am deleting all existing apartments
● As Host:
○ I can add a new apartment:
■ It is necessary to enter the necessary data in the fields (apartment type, number room, number of guests, location, etc.) Note: There is an overview of all available facilities of the apartment can assign to the apartment
■ Pressing the send button sends a request to add the apartment to server
■ If the addition is successful, the user is notified
■ In case of unsuccessful addition, an error is printed to the user Note: The initial status of the apartment is INACTIVE, and the Host is who he is initiated creation
● As an administrator, I am also in charge of maintaining the list that represents the contents of the apartment:
○ I can add a new entity to the list of apartment contents:
■ It is necessary to enter the name of the new content
■ Pressing the send button sends a request to add content apartments on the server
■ If the addition is successful, the user is notified
■ In the event of a failed change, an error is printed for the user
○ I can change the names of the existing contents of the apartment
○ I can delete some existing contents of the apartment (it is necessary to delete that content and all apartments that have it)
● As a guest:
○ I want to have an overview of all our reservations:
■ I also have the option to cancel reservations, but only those with status CREATED or ACCEPTED, whereby the new status becomes DECLINED
● As Host:
I have overview of reservations for all my apartments (regardless of status):
■ It is possible to accept a reservation that is in the status CREATED, pri that the reservation changes status to ACCEPTED
■ It is possible to reject a reservation if it is in the status CREATED or ACCEPTED, whereby the reservation changes status to REJECTED
■ After the overnight date is over, I can set the reservation to status COMPLETED
● As Administrator:
○ Enabled to view all bookings in the system
● As a guest, I can only create reservations:
○ Reservation of apartments is made by the following steps:
■ Apartment I choose which one I want to book, and then we let review the date when it is available
■ I select the date of initial bookings and enter the number of nights
■ Enter the message intended for the host
■ Clicking the button sends a request to create reservations on the server (it is necessary to check the availability of the apartment)
■ If you have created everything correctly, you have reserved the status CREATED
■ If the check did not pass, a message was written to the guest that it was not reserved possible to execute for the specified dates
● As a Guest:
○ I can leave a comment on the apartment for which I have a reservation with status DECLINED or ENDED:
■ I enter a comment in the field
■ I assign a grade to the apartment
■ Clicking the button sends the comment to the server
■ If the comment is sent successfully, the user is notified
■ In case of unsuccessful sending of comments to the user, an error is printed
● As Host:
○ I have an overview of all the comments on my apartments:
■ I can choose which comment will be shown to Guests and which will not (so Guests only see comments selected by Host)
● As Administrator:
○ I can see all the comments on all the apartments in the system (regardless of whether selected by the Host or not)
● As any user (unregistered user or registered user with any which role):
○ I want to search for apartments by the following criteria:
0
■ by date - by setting the date of arrival and departure from the apartment
■ by location - I specify the name of the city or country
■ by price - the range from-to is set
■ by number of rooms - the range from-to is set
■ by the number of people who can stay in the apartment
All users need to carry out a combined search of the apartment as before specified criteria in the apartment search. Combined or multiple search means that the user may be able to select multiple options per which he will search. For example. the user can choose to search by number of rooms, prices and date.
● As a Guest:
○ I want to sort apartments and my reservations by price:
■ Ascending
■ Descending
○ I want to filter apartments by type and by apartment content
● As Host / Administrator:
○ I want to search for reservations by the username of the guest who created reservation, as well as users by:
■ Stakes
■ Semi
■ Username
(Note: The host searches only users (ie guests) who have a reservation in his apartments, and the Administrator can search all users)
○ I want to sort apartments and reservations by price:
■ Ascending
■ Descending
○ I want to filter reservations by status, and apartments by:
■ Type
■ The contents of the apartment
■ Status
The price of reservations varies depending on the date of reservation. If the reservation is on a weekend (Friday, Saturday and / or Sunday) the reservation price is reduced by 10%. If the reservation is during the holidays the price is increased by 5% per holiday (Administrators define a list of holidays)
Use OpenLayers folders (http://openlayers.org/) or an alternative when choosing a location. maps to search for apartments by location and specify location when creating apartments.
Administrators have the ability to block registered users (if they are not Administrators). A blocked user cannot log in to their account and does not have the ability to execute any action depending on its role.