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.

business microservices
5
PostgreSQL databases, one per service
5
containers in Docker Compose
13

Request path

  1. 01Client request
  2. 02Spring Cloud Gateway routes it
  3. 03Keycloak secures access
  4. 04Eureka locates the service
  5. 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

  • Java
  • Spring Boot
  • Spring Cloud Gateway
  • Eureka
  • OpenFeign
  • Keycloak
  • Spring Security
  • JWT
  • PostgreSQL
  • Hibernate / JPA
  • Docker
  • Docker Compose
  • OpenAPI / Swagger
  • Maven

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.