Skip to content

cfrank3N/booking-program

Repository files navigation

Booking Program

This project was developed as a group assignment for the Backend 1 course at Nackademin.
The task was to build a booking system for a small guesthouse, using Java Spring Boot, Hibernate, and a Thymeleaf web interface.


Project Overview

The system allows managing customers, rooms, and bookings.
All data is persisted in a relational database (created Code-First with Hibernate), and the entire application is accessible through a Thymeleaf-based web interface.


Features (Grade G Requirements)

  • Customer Management

    • Register new customers.
    • Update customer details.
    • Delete customers (only if they have no bookings).
  • Room Management

    • Manage a list of rooms available for booking.
  • Booking Management

    • Book one or more nights for a customer in a room.
    • Prevent double-bookings: no customer can be booked into an already occupied room/date.
    • Cancel bookings or update them.

Additional Features (Grade VG Requirements)

  • Room Types

    • Support for single rooms and double rooms.
    • Double rooms may allow extra beds (1–2 depending on size).
  • Advanced Booking Search

    • Search for available rooms by date or date range and number of guests.

Technical Requirements

  • Spring Boot application with layered architecture:

    • Controller Layer: Handles requests and serves Thymeleaf templates.
    • Service Layer: Contains business logic and mapping between Entities and DTOs.
    • Repository Layer: Hibernate/JPA repositories for persistence.
  • Thymeleaf Frontend

    • User interaction through templates for customers, rooms, and bookings.
    • Clear error messages and confirmations for all actions.
  • Validation

    • Use validation annotations in model classes to ensure correct data format.
  • Persistence

    • All changes made through the web interface are stored in the database.
  • Testing

    • Unit tests ensure coverage of core business logic.

Project Structure

booking-program/
├── src/main/java/com/example/booking/
│   ├── controller/   # Handles web requests
│   ├── service/      # Business logic
│   ├── model/        # Entities and DTOs
│   ├── repository/   # Data persistence with JPA/Hibernate
│   └── BookingProgramApplication.java
├── src/main/resources/
│   ├── templates/    # Thymeleaf views
│   ├── application.properties
│   └── static/       # CSS/JS assets (if any)
├── src/test/java/    # Unit tests
└── README.md

Contributors

This project was developed as a group assignment for the Backend 1 course.
Contributors:

About

First Spring project. A website where you can book/cancel rooms, add and remove extra beds.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •