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
- Create .env file
Copy
.env.exampleand fill in the necessary values:
cp .env.example .env- Build and run the project in dev mode
docker compose up --buildThis will pull & build images and create necessary network and volumes
- Stop containers (if needed)
docker compose stopThe containers are set to restart automatically; stop them manually if not needed
- Restart containers
docker compose startSince 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: MySQL
- Schema: MPD available in the
resourcesfolder as mpd.jpg - Initialization: script available in
init.sqlin root
- Enter the MySQL container
mysql-dband connect using the environment variables:
docker compose exec mysql-db sh -c 'mysql -h localhost -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"'- 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_PASSWORDand$MYSQL_DATABASEare set in the mysql-db container environment variables
This project was made by:
This project is licensed under the MIT License.