Skip to content

AdelinePat/overlook_hotel

 
 

Repository files navigation

Overlook Hotel 🏨

NotreHotel Noschambres

School group project 📌, 3 contributors. Solution for hotel management with 3 different services :

  • 👤 Client app (rent a/multiple room(s), rent a/multiple place for an event, comment on past stay)
  • 🧑‍💼 Manager app (CRUD employee, manage employee schedule, view analytics, can do everything clients can in their stead)
  • 🔒 Authentication & Security : Account and session management with Spring Security.

🚀 Features

  • 🛎️ Reservation management: rooms + event halls.
  • 🛠️ Manager interface: full employee management and supervision.
  • 📊 Statistics & Analytics.
  • 📝 Customer reviews after stay.
  • 🔐 Security with Spring Security (login/logout, roles).
  • 🐳 Docker containerization with MySQL & Spring Boot application.

🛠️ Technologies

  • ☕ Java + Spring Boot
  • 🎨 Thymeleaf (HTML templates)
  • 🔄 Spring Data JPA + Hibernate
  • 🔑 Spring Security
  • ⚙️ Lombok
  • 🐳 Docker & Docker Compose

📂 Project Structure

📂 overlook_hotel  
 ┣ 📂 src/main/java/overlook_hotel  
 ┃ ┣ 📂 config          # Configuration Spring (sécurité, beans, etc.)    
 ┃ ┣ 📂 controller      # Controllers Spring MVC  
 ┃ ┣ 📂 model           # Entities + DTO  
 ┃ ┣ 📂 repository      # JPA Repositories  
 ┃ ┣ 📂 service         # Business logic  
 ┃ ┣ 📂 specification   # Critères dynamiques pour les requêtes JPA  
 ┃ ┣ 📂 util            # Fonctions utilitaires  
 ┣ 📂 resources  
 ┃ ┣ 📂 templates       # Thymeleaf templates (login, réservation, etc.)  
 ┃ ┣ 📂 static  
 ┃ ┃ ┣ 📂 css           # Styles CSS  
 ┃ ┃ ┣ 📂 img           # Images (logo, background, icônes…)  
 ┃ ┣ 📄 mpd.jpg         # Schéma de la base de données  
 ┣ 📄 docker-compose.yml  
 ┣ 📄 init.sql  
 ┣ 📄 README.md  

  

Installation ⚡

Setup

  1. Create .env file Copy .env.example and fill in the necessary values:
cp .env.example .env
  1. Build and run the project in dev mode
docker compose up --build

This will pull & build images and create necessary network and volumes

  1. Stop containers (if needed)
docker compose stop

The containers are set to restart automatically; stop them manually if not needed

  1. Restart containers
docker compose start

Running tests

Since the app runs inside containers, you need to execute tests from the dev container:

  • Run all tests:
docker compose exec dev mvn test 
  • Run a specific test class:
docker compose exec dev mvn test -Dtest=ClassName
  • Run a specific test:
docker compose exec dev mvn test -Dtest=ClassName#methodName

Database

  • Database: MySQL
  • Schema: MPD available in the resources folder as mpd.jpg
  • Initialization: script available in init.sql in root

Access the database

  1. Enter the MySQL container mysql-db and connect using the environment variables:
docker compose exec mysql-db sh -c 'mysql -h localhost -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"'
  1. Or run queries from queriesTest.sql
docker compose exec mysql-db sh -c 'mysql -h localhost -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" < /queriesTest.sql' 

Notes: $MYSQL_USER, $MYSQL_PASSWORD and $MYSQL_DATABASE are set in the mysql-db container environment variables


Contributing

This project was made by:

Licence

This project is licensed under the MIT License.


About

Second year IT Bachelor group project : hotel management project using Spring Boot and Java with Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 68.7%
  • HTML 24.5%
  • CSS 6.8%