A microservices-based e-commerce application built using Spring Boot, Angular, Kafka, Keycloak, and Kubernetes.
This project is designed to demonstrate a scalable backend architecture with separate services for products, orders, inventory, notifications, and API gateway routing.
- Product Service — product catalog management
- Order Service — order processing
- Inventory Service — stock validation and inventory management
- Notification Service — order notifications
- API Gateway — request routing with Spring Cloud Gateway MVC
- Shop Frontend — Angular 18 user interface
- Spring Boot
- Angular 18
- MongoDB
- MySQL
- Kafka
- Keycloak
- Testcontainers
- WireMock
- Kubernetes
- Prometheus
- Grafana
- Loki
- Tempo
- Spring Cloud Gateway MVC
Make sure you have the following installed on your machine:
- Node.js
- NPM
- Angular CLI
Run the following commands to start the frontend application
cd frontend
npm install
npm run startRun the following command to build and package the backend services into a docker container
mvn spring-boot:build-image -DdockerPassword=<your-docker-account-password>The above command will build and package the services into a docker container and push it to your docker hub account.
Make sure you have the following installed on your machine:
Run the Eureka discovery server before starting the services:
cd discovery-server
mvn spring-boot:runThen start each service in a separate terminal:
cd api-gateway
./mvnw.cmd spring-boot:runcd product-service
./mvnw.cmd spring-boot:runcd order-service
./mvnw.cmd spring-boot:runcd inventory-service
./mvnw.cmd spring-boot:run- Java 21
- Docker
- Kind Cluster - https://kind.sigs.k8s.io/docs/user/quick-start/#installation
Run the k8s/kind/create-kind-cluster.sh script to create the kind Kubernetes cluster
./k8s/kind/create-kind-cluster.shThis will create a kind cluster and pre-load all the required docker images into the cluster, this will save you time downloading the images when you deploy the application.
Run the k8s/manisfests/infrastructure.yaml file to deploy the infrastructure
kubectl apply -f k8s/manifests/infrastructure.yamlRun the k8s/manifests/applications.yaml file to deploy the services
kubectl apply -f k8s/manifests/applications.yamlTo access the API Gateway, you need to port-forward the gateway service to your local machine
kubectl port-forward svc/gateway-service 9000:9000To access the Keycloak admin console, you need to port-forward the keycloak service to your local machine
kubectl port-forward svc/keycloak 8080:8080To access the Grafana dashboards, you need to port-forward the grafana service to your local machine
kubectl port-forward svc/grafana 3000:3000