CASE STUDY 05 / ACADEMIC / MICROSERVICES
E-story — Reading & Learning Platform on Microservices
Academic project
A reading and learning platform split into Spring Boot microservices behind a Spring Cloud Gateway, with Keycloak authentication and one PostgreSQL database per service, all running in Docker Compose.
- ENTRYSpring Cloud GatewaySingle entry point and routing
- IDENTITYKeycloakDedicated realm and clients
- DISCOVERYEurekaService registry
- SERVICESSpring BootFive business microservices
- DATAPostgreSQL × 5One database per service
- business microservices
- 5
- PostgreSQL databases, one per service
- 5
- containers in Docker Compose
- 13
Request path
- 01Client request
- 02Spring Cloud Gateway routes it
- 03Keycloak secures access
- 04Eureka locates the service
- 05The service reads its own PostgreSQL database
Problem
E-story brings together book catalogues, private course requests, evaluations of submitted texts with their corrections, and user claims. Each area needed to evolve and be deployed independently.
Architecture
A Spring Cloud Gateway is the single entry point and routes requests to services registered in Eureka. Each Spring Boot microservice owns its PostgreSQL database and calls the others through OpenFeign.
- Authentication: users, roles, verification tokens and Keycloak integration
- Catalogues: book catalogues
- Private courses: course requests
- Evaluation: submitted texts and their corrections
- Claims: attachments and a dashboard
Security with Keycloak
Keycloak runs in its own container with a dedicated realm. Each microservice is registered as a Keycloak client, and the authentication service combines Spring Security, JWT and the Keycloak Admin Client to manage accounts and roles.
Containerised Delivery
Every service has its own Dockerfile. Docker Compose starts the full platform on a shared network: five PostgreSQL databases, the Eureka server, the gateway, Keycloak and the five business services, with startup dependencies and configuration passed through the environment.
Engineering Details
Swagger / OpenAPI documentation on each service, Lombok, Bean Validation and a database-per-service model that keeps every domain independent.
Tech Stack
NEXT PROJECT
DevOps CI/CD
A Spring Boot stock management API delivered through a Jenkins CI/CD pipeline: Maven build, unit tests, a Nexus artifact repository, a Docker image and a Docker Compose deployment.