Bookstore Microservices Web Application (Spring Boot and Spring Cloud)


  • Github - https://github.com/nirmalks/bookstore-microservices
  • Backend Stack: Spring Boot, Spring Security (JWT), Spring Data JPA, PostgreSQL, Flyway, Spring Eureka client, Spring Eureka server, Spring Cloud gateway, Spring Boot Oauth2, Spring Webflux
  • Tools & Libraries: Swagger
  • Deployment: Local (Backend)

Key Features

  • Microservices Architecture: Decomposed the monolith into three core services: User, Catalog, and Checkout. Each service is independently deployable and scalable.
  • Service Discovery: Implemented Spring Cloud Eureka for service registration and discovery, allowing each service to find and communicate with others dynamically.
  • API Gateway: Utilized Spring Cloud Gateway to provide a single, unified entry point for all API clients, simplifying routing, load balancing, and authentication.
  • Security: Secured the entire system using JWT-based authentication and a dedicated Spring Boot OAuth2 authorization server.
  • Inter-service Communication: Services communicate with each other using Spring WebFlux and WebClient.
  • Data Management: Managed consistent database migrations for each service using Flyway, with data stored in a PostgreSQL database.
  • Documentation: Provided comprehensive API documentation with Swagger, making it easy for developers to test endpoints and understand the system’s capabilities.
  • RESTful APIs for managing books, authors, users, orders, carts, and genres
  • Advanced book search with filtering and pagination using JPA Specification.
  • Added resilience using circuit breakers in catalog service
  • Implemented monitoring stack using Prometheus for metrics collection, Grafana for visualization, Zipkin for distributed tracing.
  • Dockerized the application using dockerfiles and docker compose

Admin Capabilities

  • Add or update books, authors, and genres

User Capabilities

  • Register, log in, and manage account profile
  • Browse and search books
  • Add items to cart and place orders
  • View orders

swagger