This repository is a chapter-by-chapter backend workspace for the Bookstore application in "Spring Boot and Angular – Second Edition". It contains the evolving source code for the same system as it grows from a simple Spring Boot service in Chapter 02 into a full microservices platform by Chapter 10.
Each chapter folder is a progressive stage of the backend. Early chapters focus on the core service and persistence layer, while later chapters add service discovery, API gateway routing, security, observability, SSE notifications, and containerized deployment.
Start here: Chapter 02 Environment Setup
The code across the later chapters is aligned with the current project setup and uses:
- Java 26
- Spring Boot 4.x
- Spring Cloud 2025.1.2
- Maven 3.9+
- PostgreSQL for inventory data
- MongoDB for user data
- Eureka for service discovery
- Spring Cloud Gateway for routing
- Keycloak for authentication and authorization
- Zipkin for distributed tracing
- Docker and Docker Compose for local infrastructure and runtime orchestration
This repository is not a single final monolith; it contains multiple chapter stages of the same backend architecture.
- Install the required tools by following the environment guide:
- Make sure Docker is running for PostgreSQL, MongoDB, Zipkin, and Keycloak.
- Start the services in chapter order, beginning with the discovery server and core microservices.
- Use the chapter-specific README files for the detailed implementation and test flow for each stage.
- chapter-02 – Baseline microservices setup and environment prep
- chapter-03 – AI-assisted development workflow
- chapter-04 – Database setup with Spring Data JPA and MongoDB
- chapter-05 – Services and REST APIs
- chapter-06 – Discovery server and API gateway
- chapter-07 – OpenAPI docs and observability
- chapter-08 – Security, OAuth2, JWT, and Keycloak
- chapter-09 – Reactive programming with Spring WebFlux and SSE
- chapter-10 – Packaging and containerization
- containerization/README.md – Docker Compose and runtime stack guide
- containerization/docker-compose.yml – Full backend stack definition
- TROUBLESHOOTING.md – Common runtime and setup issues
- Postman-Collection – API collection for exercising the backend
- This repository is the backend-only portion of the full Bookstore application.
- The frontend project lives in the separate Angular repository.
- Some project files and chapter folders include generated targets and local build outputs; the source code and chapter READMEs are the best reference when working through the book.