This is an E-commerce backend project built on Microservice architecture using the following techstack:
- Spring boot for developing services
- Eureka discovery server and client-server dependencies for microservice environment
- Spring Cloud API gateway for API gateway
- Apache Kafka (Asynchronous communication between services)
- Zipkin for distributed tracing of requests
- Resilience4J for fault tolerance
- MongoDB and H3 database
- Product-Service - for fetching list and details of products
- Order service - for placing orders. Also publishes messages on Kafka.
- Inventory service - for checking if the specified product exists or not
- Notification service - A message will be published in the Kafka topic upon confirmation of an order. This service consumes that message and sends an email to the user mail with order details.
- Java 11 environment
- You need to have Kafka. It can be installed by running the docker-compose in the project root folder by
docker compose up -d
.
Docker must be running in order to run docker scripts. - Mailjet account for api-keys
- To run the whole application - in the root folder, run
./mvnw install && ./mvnw spring-boot:run -pl application
(quick and easy).
If you have maven installed, runmvn build && java -jar target/the-package-name.jar
which is th mostly used way of building spring applications.
Now all the applications must be up. You can check the application ports in respective application.yml file.