How moermansj/pizza-kata works
Project type and purpose
• This is a single‐service, RESTful Spring Boot application (“Pizza Kata”) whose sole responsibility is to accept pizza orders via a POST /order endpoint, apply business rules (size, optional toppings), persist orders, and return an estimated time.
• It uses an embedded H2 database by default, with an option to swap in PostgreSQL via Docker Compose or Testcontainers for integration testing.
File structure
• Top-level:
• pom.xml / mvnw / mvn wrapper: Maven-based build.
• compose.yaml: Docker Compose definition for spinning up PostgreSQL.
• src/main/java/be/pizza/kata:
• PizzaKataApplication.java – Spring Boot entry point.
• OrderController.java – REST controller.
• PizzaOrder.java – domain model/entity.
• PizzaOrderRepository.java – Spring Data JPA repository.
• src/main/resources:
• application.properties – DataSource config.
• schema.sql / data.sql – DB schema & seed data.
• src/test/java/...:
• Controller and application tests using JUnit5, Mockito, Testcontainers.
Extracted insights from the README
• Phases: refactoring (SOLID, Clean Code, constructor injection, domain layers, tests) and enhancements (custom toppings, Testcontainers with PostgreSQL).
• Tech stack: Java 21, Spring Boot 3.5+, JUnit5, Mockito, Testcontainers, Maven, Docker Compose.