How hoangtien2k3/ecommerce-microservices works
Main Components
• API Gateway – Acts as the entry point into the microservice ecosystem.
• Discovery Service – Provides service registration and discovery, enabling dynamic routing between services.
• Common Library (common-lib) – A shared reusable module that contains common constants, exception handlers, Kafka configurations, CSV utilities, mappers, etc., which many services depend on.
• External Systems – Include supporting components such as:
– Database systems (MySQL/other databases, as referenced in each service’s resources and Liquibase changelogs).
– Kafka (for message sending and consumption) along with Zookeeper/Broker.
– Docker and Docker Compose which are used to containerize and orchestrate these services.
– Distributed tracing tools (Zipkin, as indicated by the zipkin files) for monitoring interservice communications.
– API Documentation (Swagger) visible in several services for automated API docs.
• The API Gateway receives incoming client requests (from web or mobile apps) and routes them to the appropriate microservices.
Architectural Patterns and Technologies
• Microservices – Emphasize the decoupled architecture where each service is a standalone Spring Boot application.
• Database Per Service – Each service typically has its own database connection (document migrations with Liquibase in services like inventory-service, product-service, etc.).
• Shared Library – Show that services reference the common-lib for shared functionality (exception handling, configuration, messaging, etc.).
• Reactive Programming – Note that many services use WebFlux/Reactive programming (e.g., Reactor) for handling reactive streams if needed.