Sample solution implementing a ticket sales use case for the new (as of 2026) Spring Boot workshop.
A sample Spring Boot application for demonstrating clean architecture, Spring Data JPA patterns, and practical transactional workflows through a real-world ticket sales use case.
Ticketeer is a fictional ticket sales platform designed for workshops, presentations, and teaching modern Spring Boot development. The project models a streamlined event ticketing backend with a focus on correctness, concurrency handling, and clean design.
This repository provides a realistic foundation for exploring:
- Domain-driven modelling in Spring Boot
- Multi-step purchase workflows
- Seat inventory protection
- Transaction management patterns
- RESTful API design
- Extensible architecture for further exercises
Ticketeer is operated by Ticketeer Ltd., a startup founded by two event-industry veterans tired of outdated and clunky ticket systems. Their mission: “Make ticketing delightful—for organizers and attendees alike.”
Ticketeer helps small and midsize organizers publish events, manage seat inventory, and sell tickets reliably—even under load.
You, the workshop participant, act as a backend engineer helping grow the platform as they onboard their first clients.
-
Event Management: Create and view events with venue, schedule, and seat capacity.
-
Seat Inventory & Availability: Track available vs. sold seats.
-
Ticket Purchase Workflow:
- Reserve seat(s)
- Convert reservations into confirmed orders
- Simulated payment step
-
Optimistic Concurrency Control to prevent overselling.
-
Organizer Reporting (basic sales statistics).
Ticketeer follows a clean, layered structure:
com.ticketeer
├── application — Services & use cases
├── domain — Entities, repositories, business logic
├── infrastructure — JPA, persistence, configuration
└── api — REST controllers & DTOs
- Domain-first design with rich domain objects
- Transaction boundaries using
@Transactionaland/orTransactionTemplate - Optimistic locking via JPA
@Version - REST API with clear resource modelling
- Java 21+
- Spring Boot 3.x
- Spring Data JPA
- H2 or PostgreSQL (configurable)
- Maven
- Testcontainers (optional)
- Java 21+
- Maven 3.9+
mvn spring-boot:runTicketeer will start on:
http://localhost:8080
Once running, API docs (if enabled) are available at:
http://localhost:8080/swagger-ui.html
mvn testThe project includes unit and integration tests demonstrating:
- Domain logic
- Persistence behavior
- Purchase workflow boundaries
EventSeatInventoryReservationOrder
- One
Event→ OneSeatInventory - One
Reservation→ Many seats - One
Order→ One confirmed purchase
Suggested tasks:
- Implement seat reservation expiration.
- Add asynchronous email confirmations.
- Extend events with multiple price categories.
- Introduce event search & filtering.
- Add organizer accounts & authentication.
MIT License — feel free to reuse this for workshops or internal trainings.
Pull requests are welcome, especially improvements that help the educational purpose of the sample.
If you need a matching project skeleton, domain classes, or exercise instructions, just let me know!