Pufke / WEB-APP-Booking-apartments

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.
2 stars 3 forks source link

WEB APP Booking apartments

About

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.

Specification

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:

● User

● Location

● Address

● Apartment

● Contents of the apartment

● Reservation

Note: The guest can book a number of free / available dates only if they do not have them interrupts

● Comment for the apartment

Non-functional requirements and notes

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

Functionalities

● Registration

SingUp

● 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

Log in

LogIn

● 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

Logout

logOut

● 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

Modification of personal data

Profile

● 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

View all users

● As Administrator:

image

○ I have an overview of all existing users in the system, and I can also search

image

● As Host:

image

○ I have an overview of all the users who have made a reservation for my apartments and I can search among them

Apartment overview:

● As an unregistered user or as a Guest I can view all apartments with the status ACTIVE:

Apartments

○ I can search the apartment

ApartmentsSearch

○ I have the option of sorting apartments according to all criteria

SortApartments

○ I have a review of Guest comments on the apartments

ViewComments

● As a Host I have the opportunity to:

○ View, sort and filter by all criteria, but only your own apartments with the status ACTIVE

HostActiveApartments

○ I have an overview of my apartments with the status INACTIVE

InactiveApartments

○ I can change the information about my apartment:

ChangeApartment

■ 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

Eroor

○ I can delete my apartment

image

● 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

Adding an apartment

● As Host:

○ I can add a new apartment:

image

image

■ 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

Maintenance of the contents of the apartment

● As an administrator, I am also in charge of maintaining the list that represents the contents of the apartment:

image

○ I can add a new entity to the list of apartment contents:

image

■ 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

image

○ I can delete some existing contents of the apartment (it is necessary to delete that content and all apartments that have it)

image

Booking overview

● As a guest:

○ I want to have an overview of all our reservations:

image

■ 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

image

■ It is possible to reject a reservation if it is in the status CREATED or ACCEPTED, whereby the reservation changes status to REJECTED

image

■ After the overnight date is over, I can set the reservation to status COMPLETED

image

● As Administrator:

○ Enabled to view all bookings in the system

Creating reservations

● 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

image

■ 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

Leaving a comment

● As a Guest:

○ I can leave a comment on the apartment for which I have a reservation with status DECLINED or ENDED:

image

■ 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

Review comments

● As Host:

○ I have an overview of all the comments on my apartments:

image

■ I can choose which comment will be shown to Guests and which will not (so Guests only see comments selected by Host)

image

● As Administrator:

○ I can see all the comments on all the apartments in the system (regardless of whether selected by the Host or not)

Search / Filter / Sort

● As any user (unregistered user or registered user with any which role):

○ I want to search for apartments by the following criteria:

image0

■ 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

Additional tasks for higher grades

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)

image

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.

image

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.

image