Skip to content

kalebzaki4/room-reservation-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,304 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 SyncSpace API

A professional-grade Room Reservation System built with Java 21 and Spring Boot 3. Optimized for concurrency, security, and scalability.

Java Spring Boot MySQL Docker License

SyncSpace is a robust REST API designed to handle corporate meeting room bookings. It goes beyond a simple CRUD by implementing advanced backend concepts like Optimistic Locking for concurrency and Stateless JWT Authentication.

✨ Features

  • Spring Boot 3.2 — Built using the latest features of the Spring ecosystem.
  • Optimistic Locking — Prevents double-booking using JPA versioning (@Version).
  • 🔐 Stateless Security — Secure endpoints with Spring Security and JWT.
  • 🗃 MySQL 8.0 — High-performance relational data management.
  • 🐳 Docker Ready — Fully containerized environment (App + DB) for easy deployment.
  • 📏 Clean Architecture — Clearly separated layers for Controllers, Services, and Repositories.
  • 🛡 Data Validation — Strict request validation using Bean Validation (Hibernate Validator).
  • 📖 OpenAPI 3 (Swagger) — Fully documented and interactive API playground.

🚀 Quick Start

1. Requirements

  • Docker & Docker Compose
  • JDK 21 (only if running locally without Docker)
  • Maven 3.x

2. Development

The fastest way to get the project running is using Docker Compose:

Clone the repository

git clone https://github.com/kalebzaki4/room-reservation-api

Navigate to the folder

cd syncspace-api

Start the services (API + MySQL)

docker-compose up -d

📂 Directory Structure

src/main/java/com/kalebzaki/room-reservation-api/
├── config/      # Security, Swagger, and App configurations
├── controllers/ # REST API Resource Providers
├── dto/         # Request/Response Data Transfer Objects
├── exceptions/  # Global Exception Handling & Custom Errors
├── models/      # Database Entities & Mappings
├── repositories/# Spring Data JPA Interfaces
└── services/    # Business Logic & Rule Validations

🛠 Scripts & Commands

Command Description
./mvnw spring-boot:run Starts the application locally.
./mvnw clean package Creates an optimized .jar production build.
./mvnw test Runs the JUnit 5 and Mockito test suite.
docker-compose logs -f View real-time logs from the API and MySQL.

📐 Architecture & Decisions

  • DTO Pattern: Used to decouple the database layer from the client, ensuring security and API flexibility.
  • Global Error Handling: Implemented @ControllerAdvice to return standardized error messages following RFC 7807.
  • Optimistic Locking: Essential for reservation systems to handle simultaneous booking attempts without database overhead.

🤝 Contributing

  1. Fork the project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the Branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

👨‍💻 Author

Kaleb Zaki
Backend Developer specializing in Java & Spring Ecosystem.

About

High-performance Room Reservation API built with Java 21, Spring Boot 3.2, and MySQL. Featuring JWT Security and Optimistic Locking for high concurrency.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages