A full-stack event management application enabling organisers to book rooms and attendees to register for events through multiple client interfaces.
- Overview
- Features
- Screenshots
- Architecture
- Getting Started
- Usage
- API Documentation
- Testing
- Project Structure
- Team
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.
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.
- 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
- Role-based registration (Organiser/Attendee/Admin)
- Secure authentication with username/password
- Session management across multiple clients
- Duplicate username prevention
-
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
- Automatic room capacity enforcement
- Double-booking prevention with time slot validation
- Duplicate registration detection
- Real-time availability updates
- Comprehensive error handling
Admin Dashboard - System Overview
Admin Menu |
View All Rooms |
View All Attendees |
View All Organisers |
Remove Room Functionality |
|
Organiser Dashboard |
Create New Booking |
Booking Created Successfully |
View My Bookings |
Select & Manage Booking |
|
Organiser Login |
Create Booking |
View My Bookings |
|
Attendee Registration |
Attendee Dashboard |
Browse & Register for Events |
Event Registration Success |
View My Registered Events |
Deregister from Event |
Register for Event & View My Bookings
ββββββββββββββββββββββββββββββββββββββ
β 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) β
ββββββββββββββββββββββββββββββββββββββ
| 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 |
- 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- Clone the repository
git clone git@github.com:rohitbams/Room-Management-App.git
cd p3-code- Build the project
mvn clean install- Run tests (optional but recommended)
mvn clean testmvn spring-boot:runThe server will start on http://localhost:8080
mvn compile exec:java -Dexec.mainClass=com.stacs.cs5031.p3.client.terminal.TerminalClientTerminal Features:
- Interactive menu system (14 commands)
- User-friendly input validation
- Date format: DD-MM-YYYY HH:MM
- Duration input in hours (1-8)
mvn compile exec:java -Dexec.mainClass=com.stacs.cs5031.p3.client.gui.login.LoginGUIGUI Features:
- Modern Java Swing interface
- Visual feedback and error messages
- Registration and booking forms
- Attendee list views
The system initialises with test accounts for development:
| Username | Password | Role |
|---|---|---|
organiser |
test |
Organiser |
attendee |
test |
Attendee |
admin |
test |
Admin |
http://localhost:8080
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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"
}- 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
# 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-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
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
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 -UH2 Console Access (for debugging):
URL: http://localhost:8080/h2-console
JDBC URL: jdbc:h2:mem:testdb
Username: sa
Password: (leave empty)
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
- Test-Driven Development (TDD)
- Continuous Integration via GitLab CI/CD
- Code reviews and pair programming
- JavaDoc documentation
- Git version control with feature branches
This project was developed as part of CS5031 - Software Engineering Practice at the University of St Andrews.
- University of St Andrews School of Computer Science
- CS5031 Module Team
- All team members for their collaborative effort
Made with β























