welcome to Booking clone
Booking is a web application that simulates a booking website for hotels
- Admin side
- Admin can control hotels in system
- Admin can cancel reservations
- admin can register new admins
- Admin can view clients’ reviews
- Client Side
- client can register using
Emailandusername - client can search for hotels rooms
- client can make a reservation to a room
- client can search with check in and check out
- client can search with location
- client can edit his profile
- client can review a hotel
- client can cancel his reservation
- client can register using
prerequisites
- you must have a
glassfish server, preferablyglassfish v5.0. - you must have
mysqlserver running on your machine. - you have to set up a configuration file in the following path
src/main/java/com/hagz_hotels/hotels_booking/Model/DAO/conf.javawith the same name conf.javashould have the following variables aspublic staticurl, MySql connection url, check this link to setup java mysql connectionuser, Mysql userpassword, Mysql password for the user to connect to database.StmpEmail, Stmp email to send system emails, we use gmail.StmpPassword, Stmp email password.Main functionalities
client Functionalities
- User registration
- User must provide
Emailandusername. - User must check reCaptcha to avoid spam.
- using Ajax to validate Email and username.
- If
EmailandUsernameprovided passes verification, an Email is sent to the Email provided with random generated password to Login with. - Admins only can register new Admins.
- User must provide
- login
- User provide Email and password.
- using Ajax to validate
EmailandPasswordprovided passes verification. - if User is authenticated, application redirect them to their
Homepage.
- search for hotels
- book a hotel room
- Add Hotel review
- Edit his profile
Admin Functionalities
- Register new Admins
- Add new Hotels to website
- Check clients’ reviews for hotels
- Update Hotels’ data
- User registration
Architecture
using 3 layers architecture
- Presentation Layer
- has all User interaction logic, handling the first layer of interaction and responses
- handling JSON responses and Html responses
- using an exposed interface from Business layer to authenticate and authorize users
- catching exceptions from lower layers and use a factory class to act with user interactions providing certain messages in case of certain Exceptions
- Business Layer.
- Has backend validation on input data
- Interact with Model layer - Database -
- throws exceptions in case of failure.
- has DTOs to provide for presentation layer to expose certain parts of our
Model
- Model Layer.
- has DAO to interact with database
- has Entity classes
Built With
- Java servlets
- Maven
- Map box API
Authors
- ahmeddrawy
- MostafaOmar98