Skip to content

A full-stack event management application enabling organisers to book rooms and attendees to register for events through multiple client interfaces.

Notifications You must be signed in to change notification settings

rohitbams/Room-Management-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

328 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Room Management App

A full-stack event management application enabling organisers to book rooms and attendees to register for events through multiple client interfaces.

Java Spring Boot Build Status

Table of Contents


Overview

This application is a comprehensive event management platform designed to streamline the process of organising and attending events. It serves as a central hub where event organisers can book rooms for their events, and attendees can discover and register for events that interest them.

Real-World Use Case: Imagine a university, conference center, or community hub where multiple events happen daily. Event organisers (speakers, workshop leaders, club presidents) need to reserve rooms for their events. Meanwhile, students, employees, or community members want to browse available events and sign up to attend. This application bridges that gap by providing:

  • For Event Organisers: A simple way to book rooms, specify event details (date, time, duration), and track who's attending their events
  • For Attendees: An easy-to-use platform to browse available events, register for ones they're interested in, and manage their event schedule
  • For Administrators: System-wide oversight to manage rooms, monitor bookings, and ensure smooth operations

The platform is accessible through both a modern GUI interface (perfect for everyday use) and a terminal CLI (ideal for power users or remote access), making it flexible for different user preferences and scenarios.

Technical Overview

A comprehensive room booking system built by a 4-person software development team using Agile/Scrum methodology with Test-Driven Development (TDD). A Spring Boot application written following OOP principles, this system provides a RESTful backend API consumed by both terminal (CLI) and graphical (GUI) clients, enabling seamless event management and attendee coordination.

Core Capabilities

  • 3 User Roles: Organiser, Attendee, Admin with distinct permissions
  • 42 REST API Endpoints for complete CRUD operations
  • 2 Client Interfaces: Terminal CLI and Java Swing GUI
  • Real-time Capacity Management: Automatic capacity tracking and conflict prevention
  • Comprehensive Testing: 227 test cases across 27 test classes

Features

User Management

  • Role-based registration (Organiser/Attendee/Admin)
  • Secure authentication with username/password
  • Session management across multiple clients
  • Duplicate username prevention

Event & Room Management

  • For Organisers:

    • Create bookings with date, time, and duration (1-8 hours)
    • View and manage personal bookings
    • Access attendee lists with real-time counts
    • Cancel bookings with automatic capacity release
  • For Attendees:

    • Browse available events with capacity indicators
    • Register/unregister from events
    • View personal registered bookings
    • See unavailable events for future reference
  • For Admins:

    • System-wide monitoring dashboard
    • View all users, rooms, and bookings
    • Add/remove rooms from the system

Smart Business Logic

  • Automatic room capacity enforcement
  • Double-booking prevention with time slot validation
  • Duplicate registration detection
  • Real-time availability updates
  • Comprehensive error handling

Screenshots

Authentication & Registration

GUI Interface

GUI Login
Login Screen
GUI Registration
User Registration
Registration Success
Registration Success Confirmation

CLI Interface

CLI Login
Terminal Login
CLI Login Error
Error Handling

Admin Features

GUI Admin Dashboard

Admin Dashboard
Admin Dashboard - System Overview

CLI Admin Operations

Admin Menu
Admin Menu
View All Rooms
View All Rooms
View All Attendees
View All Attendees
View All Organisers
View All Organisers
Remove Room
Remove Room Functionality

Organiser Features

GUI Organiser Interface

Organiser Home
Organiser Dashboard
Create Booking
Create New Booking
Booking Success
Booking Created Successfully
My Bookings
View My Bookings
Select Booking
Select & Manage Booking

CLI Organiser Operations

Organiser Login
Organiser Login
Create Booking CLI
Create Booking
View Bookings CLI
View My Bookings

Attendee Features

GUI Attendee Interface

Attendee Registration
Attendee Registration
Attendee Home
Attendee Dashboard
Register for Event
Browse & Register for Events
Registration Success
Event Registration Success
My Events
View My Registered Events
Deregister
Deregister from Event

CLI Attendee Operations

Attendee CLI Operations
Register for Event & View My Bookings

Architecture

Layered Architecture Pattern

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Client Layer               β”‚
β”‚  (Terminal CLI / Java Swing GUI)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ REST/JSON
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Controller Layer           β”‚
β”‚       (REST API Endpoints)         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Service Layer             β”‚
β”‚         (Business Logic)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Repository Layer           β”‚
β”‚       (Data Access - JPA)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Database Layer             β”‚
β”‚    (H2 In-Memory Database)         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Layer Technology
Backend Java 21, Spring Boot 3.4.4, Spring Data JPA, Spring Security
Database H2 (in-memory)
API RESTful with JSON
Terminal Client Java Console Application
GUI Client Java Swing, JavaFX 20
Build Tool Maven
Testing JUnit 5, Mockito, Spring Boot Test
Version Control Git, GitLab

Getting Started

Prerequisites

  • Java Development Kit (JDK): Version 21 or higher
  • Maven: Version 3.6.0 or higher
  • Git: For cloning the repository

Verify installations:

java -version
mvn -version
git --version

Installation

  1. Clone the repository
   git clone git@github.com:rohitbams/Room-Management-App.git
   cd p3-code
  1. Build the project
   mvn clean install
  1. Run tests (optional but recommended)
   mvn clean test

Usage

Starting the Server

mvn spring-boot:run

The server will start on http://localhost:8080

Running the Terminal Client

mvn compile exec:java -Dexec.mainClass=com.stacs.cs5031.p3.client.terminal.TerminalClient

Terminal Features:

  • Interactive menu system (14 commands)
  • User-friendly input validation
  • Date format: DD-MM-YYYY HH:MM
  • Duration input in hours (1-8)

Running the GUI Client

mvn compile exec:java -Dexec.mainClass=com.stacs.cs5031.p3.client.gui.login.LoginGUI

GUI Features:

  • Modern Java Swing interface
  • Visual feedback and error messages
  • Registration and booking forms
  • Attendee list views

Default Test Accounts

The system initialises with test accounts for development:

Username Password Role
organiser test Organiser
attendee test Attendee
admin test Admin

API Documentation

Base URL

http://localhost:8080

User Endpoints (7 endpoints)

Method Endpoint Description
POST /users/register Register new user
POST /users/login User login
POST /users/logout User logout
GET /users Get all users
GET /users/{id} Get user by ID
GET /users/by-username/{username} Get user by username
DELETE /users/{id} Delete user

Attendee Endpoints (7 endpoints)

Method Endpoint Description
GET /attendees Get all attendees
GET /attendees/{id} Get attendee by ID
GET /attendees/{id}/available-bookings Get available bookings
GET /attendees/{id}/unavailable-bookings Get unavailable bookings
GET /attendees/{id}/registered-bookings Get registered bookings
POST /attendees/{attendeeId}/register/{bookingId} Register for booking
DELETE /attendees/{attendeeId}/cancel/{bookingId} Cancel registration

Organiser Endpoints (8 endpoints)

Method Endpoint Description
POST /organiser/create-organiser Create new organiser
GET /organisers Get all organisers
GET /organiser/available-rooms Get available rooms
GET /organiser/my-bookings/{organiserId} Get organiser's bookings
GET /organiser/{organiserId}/my-bookings/{bookingId} Get specific booking details
GET /organiser/{organiserId}/my-bookings/{bookingId}/attendees Get booking attendees
POST /organiser/create-booking/{organiserId} Create new booking
DELETE /organiser/cancel-booking/{bookingId}/{organiserId} Cancel booking

Booking Endpoints (5 endpoints)

Method Endpoint Description
GET /api/bookings Get all bookings
GET /api/bookings/{bookingId} Get booking by ID
POST /api/bookings/organiser/{organiserId} Create booking for organiser
DELETE /api/bookings/{bookingId} Delete booking
POST /api/bookings/{bookingId}/attendees/{attendeeId} Add attendee to booking

Room Endpoints (5 endpoints)

Method Endpoint Description
GET /rooms/all Get all rooms
GET /rooms/{id} Get room by ID
GET /rooms/available Get available rooms
POST /rooms/{id}/book Book a room
POST /rooms/{id}/makeAvailable Make room available

Admin Endpoints (5 endpoints)

Method Endpoint Description
GET /admin/rooms Get all rooms (admin view)
GET /admin/attendees Get all attendees (admin view)
GET /admin/organisers Get all organisers (admin view)
POST /admin/rooms Add new room
DELETE /admin/rooms/{roomId} Delete room

Example Request:

POST /api/users/register
{
  "name": "John Doe",
  "username": "johndoe",
  "password": "password123",
  "role": "ORGANISER"
}

Testing

Test Coverage

  • Total Test Cases: 227 test methods across 27 test classes
  • Controller Tests: 72 tests (6 controllers)
    • UserControllerTest, AttendeeControllerTest, BookingControllerTest
    • OrganiserControllerTest, RoomControllerTest, AdminControllerTest
  • Service Tests: 63 tests (6 services)
    • UserServiceTest, AttendeeServiceTest, BookingServiceTest
    • OrganiserServiceTest, RoomServiceTest, AdminServiceTest
  • Repository Tests: 29 tests (5 repositories)
    • Custom JPQL queries and data persistence validation
  • Model/Entity Tests: 38 tests (6 entities)
    • User, Attendee, Organiser, Booking, Room, Admin
  • DTO Tests: 20 tests (4 DTOs)
    • Data Transfer Object validation and mapping
  • Integration Tests: 5 tests
    • End-to-end workflows and client-server communication

Running Tests

# Run all tests
mvn clean test

# Run specific test class
mvn test -Dtest=UserServiceTest

# Run tests with coverage report
mvn clean test jacoco:report

Test Strategy

  • Test-Driven Development (TDD): Tests written before implementation
  • Unit Testing: Isolated component testing
  • Integration Testing: Client-server communication
  • Edge Case Testing: Malformed input, capacity limits, conflicts

Project Structure

p3-code/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/stacs/cs5031/p3/
β”‚   β”‚   β”‚   β”œβ”€β”€ client/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ gui/           # Java Swing GUI components
β”‚   β”‚   β”‚   β”‚   └── terminal/      # Terminal client
β”‚   β”‚   β”‚   β”œβ”€β”€ server/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ config/        # Configuration & DataInitialiser
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ controller/    # REST API controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dto/           # Data Transfer Objects
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ exception/     # Custom exceptions
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ mapper/        # Entity-DTO mappers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ model/         # Entity classes
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository/    # JPA repositories
β”‚   β”‚   β”‚   β”‚   └── service/       # Business logic
β”‚   β”‚   β”‚   └── resources/
β”‚   β”‚   β”‚       └── application.properties
β”‚   └── test/
β”‚       └── java/com/stacs/cs5031/p3/
β”‚           └── server/             # Test classes (227 tests across 27 classes)
β”œβ”€β”€ pom.xml
└── README.md

Troubleshooting

Common Issues

Port 8080 already in use:

# Find and kill the process
lsof -i :8080
kill -9 <PID>

Maven build fails:

# Clean and rebuild
mvn clean
mvn install -U

H2 Console Access (for debugging):

URL: http://localhost:8080/h2-console
JDBC URL: jdbc:h2:mem:testdb
Username: sa
Password: (leave empty)

Team

This project was developed by a team of 4 using Agile/Scrum methodology:

  • Weekly sprints with rotating Scrum Master
  • Daily stand-ups via Microsoft Teams
  • Sprint planning, reviews, and retrospectives
  • Collaborative development via GitLab

Development Practices

  • Test-Driven Development (TDD)
  • Continuous Integration via GitLab CI/CD
  • Code reviews and pair programming
  • JavaDoc documentation
  • Git version control with feature branches

License

This project was developed as part of CS5031 - Software Engineering Practice at the University of St Andrews.


Acknowledgments

  • University of St Andrews School of Computer Science
  • CS5031 Module Team
  • All team members for their collaborative effort

Made with β˜•

About

A full-stack event management application enabling organisers to book rooms and attendees to register for events through multiple client interfaces.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages