Distributed Systems · Microservices
Library Management Microservices
Distributed library platform built around six Spring Boot domain services, centralized gateway routing, Eureka discovery and Docker infrastructure.
- Angular 15
- TypeScript
- Spring Boot
- Spring Cloud Gateway
- Eureka
- MySQL
- Docker Compose

01
Architecture Context
The architecture separates loans, books, reservations, subscriptions, inventory and events while keeping routing and service location outside the business services.
- Domain services
- 6
- API entry point
- Gateway :8111
- Discovery
- Eureka :8761
02
System Architecture
Angular 15
Frontend · :4200
Spring Cloud Gateway
Single API entry point · :8111
Loan Service
Spring Boot · :8189
Book Service
Spring Boot · :8183
Reservation Service
Spring Boot · :8184
Subscription Service
Spring Boot · :8009
Stock Service
Spring Boot · :8008
Event Service
Spring Boot · :8112
Eureka
Service registration & discovery
:8761
MySQL
Persistent data layer
:3307
Docker Compose
Local service orchestration
03
Domain Service Catalogue
Loan Service
:8189Loan lifecycle and borrowing operations
Spring Boot · Maven
Book Service
:8183Book catalogue management
Spring Boot · Maven
Reservation Service
:8184Library reservations
Spring Boot · Maven
Subscription Service
:8009Member subscriptions
Spring Boot · Maven
Stock Service
:8008Inventory and stock management
Spring Boot · Maven
Event Service
:8112Library event management
Spring Boot · Maven
04
Gateway & Discovery
The Angular client uses one gateway address. The gateway routes requests to domain services, while Eureka maintains the runtime registry used to locate service instances.
- Frontend
- :4200
- API Gateway
- :8111
- Eureka
- :8761
05
Independent Service Lifecycle
Each domain service keeps its own Maven configuration, source tree, application settings and tests. This supports separate builds and a distinct lifecycle for every service.
- 01Angular 15 client reaches services through Spring Cloud Gateway on port 8111
- 02Services register with Eureka on port 8761 instead of relying on fixed service locations
- 03Each Spring Boot service owns its Maven configuration, source, application configuration and tests
- 04Docker Compose coordinates the configured services and MySQL persistence on port 3307
06
Angular Client
The Angular 15 application provides the user and administration interface with TypeScript, Angular Material and RxJS, while backend access stays centralized through the gateway.
- Framework
- Angular 15
- Interface
- Angular Material
- Reactive layer
- RxJS
07
Architecture Principles
- 01One service per business domain keeps responsibilities explicit.
- 02Centralized gateway routing gives clients one backend entry point.
- 03Discovery separates logical service names from runtime service locations.
- 04Independent builds preserve a separate lifecycle for each service.
08
Limitations
- 01Local multi-service execution requires coordinated startup and environment configuration.
- 02API URLs, credentials, secrets and database settings must be externalized before production use.
09