REST API for managing table tennis tournaments: players, matches, tournament lifecycle, and single-elimination brackets. Persistence uses PostgreSQL via Spring Data JPA. Interactive API docs are served with springdoc-openapi (Swagger UI).
- JDK 17
- Maven 3.8+
- PostgreSQL (local install or Docker)
Alternatively, run the stack with Docker Compose (PostgreSQL + application container); see docker-compose.yaml.
Default datasource settings live in src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/tournaments
spring.datasource.username=postgres
spring.datasource.password=postgresAdjust URLs and credentials for your environment before starting.
git clone https://github.com/LuminiteTime/Tournament-Microservice.git
cd Tournament-Microservice
mvn clean verifyEnsure PostgreSQL is running and the database exists, then:
mvn spring-boot:runThe application listens on port 8080 by default.
From the repository root:
docker compose up -d --buildThis starts PostgreSQL and the service with spring.datasource.url pointing at the db service.
With the app running, open Swagger UI at:
http://localhost:8080/swagger
OpenAPI is backed by src/main/resources/static/docs/swagger.yaml.
- Create and list tournaments; fetch by ID; update tournament state
- Register players and query tournament game tables and matches
- Brackets: generate single-elimination brackets, fetch by ID, list matches, update bracket state
This project is licensed under the MIT License. See LICENSE.