This project provides an example of an e-commerce system built using microservices architecture. The system consists of three services: product service, order service, and inventory service. Each service is built using Spring Boot and communicates with other services using REST API.
The following technologies are used in this project:
-
Spring Boot
-
Spring Data JPA
-
Spring Data MongoDB
-
Spring Security
-
Spring Cloud Gateway for API Gateway
-
Spring Cloud Sleuth for distributed tracing
-
Spring Cloud Config for external configuration
-
Spring Cloud Zipkin for distributed tracing
-
MySQL for data storage
-
MongoDB
-
PostgreSQL
-
Jib for building container images for your application without needing to write Dockerfiles.
- Spring Boot Actuator
- Grafana for monitoring and observability.
- Prometheus for monitoring system and time-series database.
- Micrometer for collecting and reporting metrics.
- Testcontainers to write integration tests that use real instances of these components.
The product service is responsible for managing product information. It provides APIs to create, update, and retrieve product information.
The order service is responsible for managing order information. It provides APIs to create, update, and retrieve order information.
The inventory service is responsible for managing inventory information. It provides APIs to update inventory levels when an order is placed or when new products are added to the system. The service also provides APIs to retrieve inventory information for a given product.
The API Gateway is responsible for routing requests to the appropriate service. It also provides cross-cutting concerns such as authentication and rate limiting.
This project demonstrates how to build an e-commerce system using microservices architecture. Each service is built using Spring Boot and communicates with other services using REST API. The system is highly scalable, fault-tolerant, and easy to maintain.