MTG-CardBoard is a Spring Boot REST API designed to help Magic: The Gathering (MTG) players organize their card collections and manage decks with format-specific validations.
- Card Collection Management: Full CRUD operations to organize your MTG cards.
- Deck Building: Create and manage decks with cards from your collection.
- Format Validation: Automated rules for formats like Commander (Singleton, 100-card limit) and others (4-copy limit).
- JWT Security: Role-based access control (ADMIN/CLIENT) using JSON Web Tokens.
- Interactive Documentation: Built-in Swagger UI for easy API exploration.
- Docker Ready: Includes Docker Compose for quick setup with PostgreSQL.
- Java 17 & Spring Boot 3.3.5
- Spring Data JPA (H2/PostgreSQL)
- Spring Security with JWT
- Lombok & Springdoc OpenAPI
- Docker & Docker Compose
The easiest way to start the API and a PostgreSQL database:
cd docker
docker-compose up --build- Build the application:
mvn clean install
- Run the application:
mvn spring-boot:run
For more detailed information, please refer to:
- PROJECT_OVERVIEW.md: Detailed architecture, domain models, and business rules.
- Swagger UI: Accessible at
http://localhost:8080/swagger-ui.htmlwhen the app is running.
Released under the Apache License 2.0. See the LICENSE file.