Skip to content

dana-akesh/hotel-management-system

Repository files navigation

Hotel Management System

Table Of Contents:

Description:

The Hotel Management System API provides endpoints for managing hotel-related operations within a business or organization. With the use of OpenAi 3.1.0 it allows the user to add, update, and delete the core reasources which are the user, customer, employee, reservation, task, and billing.

Features:

  • Authentication and Authorization for different roles using JWT.
  • Versioning the API.
  • Pagination.
  • Refresh token.
  • Dockerize the application.

Core Resources:

  1. User: Resource for the general user which is the main resource for the system. It only applies to the customer and admin. It has the userId, username, password, tokens, and role.
  2. Customer: Resource for the customer to give him the ability to manage his account, add, update, and delete the core resources. It has the inherited attributes from the user, additionally to reservations, and billings.
  3. Employee: Resource for the employee to give him the ability to manage his account, add, update, and delete the core resources. It has the attributes employeeId, name, phone, dob, and tasks.
  4. Reservation: Resource for the reservation to give the customer/admin the ability to reserve a room. It has reservationId, customer, reservationRooms, date, status, and billings.
  5. Task: Resource for the task to give the admin the ability to manage his tasks. it has taskId, taskName, taskDescription, taskStatus, and employee.
  6. Billing: Resource for the billing to give the customer the ability to manage his bills. it has billingId, date, reservation, amount, customer, and reservation.

ER Diagram:

HotelManagmentSystemER drawio(1)

Prerequisites:

  • IntelliJ IDEA (or any Java IDE)
  • Postman (or any API testing tool)
  • Maven
  • Java Development Kit (JDK) 19 or higher
  • MySQL Workbench
  • Docker
  • Git

Installation:

ℹ️ note: the application should be running on Port 8080 -> http://localhost:8080.

Clone The Repository

git clone https://github.com/dana-akesh/Inventory_managment_system_api
cd  Inventory_managment_system_api

Create a Database

CREATE DATABASE hotelmanagementsystemdb;

Check the application.properties file

link to application.properties file: application.properties

Build & Run the project

mvn clean install
mvn spring-boot:run

Docker:

Build the Docker Image

git clone https://github.com/dana-akesh/hotel-management-system
cd hotel-management-system

Postman File:

after running the application, you can access the API documentation through the following link:

API Documentation

http://localhost:8080/v3/api-docs

or you can download the postman file from the following link: Postman File

Swaggerhub:

after running the application, you can access the API documentation through the following link:

Open API Specification (OAS) 3.1.0

http://localhost:8080/swagger-ui/swagger-ui/index.html#/

Learned Lessons:

  • Authentication and Authorization for different roles using JWT.
  • The usage of OpenAi 3.1.0 to document the API from the source code.
  • How to use Docker to containerize the application, and make it run on different devices.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published