Back to projects
Spring Boot Microservices

Spring Boot Microservices

Sai Upadhyayula / September 15, 2024

This repository contains the latest source code of the Spring Boot microservices. To get started with this project, you can clone the repository from https://github.com/mounirrouissi/microservices-project/tree/master.

Services Overview

  • Product Service
  • Order Service
  • Inventory Service
  • Notification Service
  • API Gateway using Spring Cloud Gateway MVC
  • Shop Frontend using Angular 18

Tech Stack

The technologies used in this project are:

  • Spring Boot
  • Angular
  • MongoDB
  • MySQL
  • Kafka
  • Keycloak
  • Test Containers with Wiremock
  • Grafana Stack (Prometheus, Grafana, Loki, and Tempo)
  • Kubernetes

Application Architecture

Architecture Diagram

How to Run the Frontend Application

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 start

How to Build the Backend Services Run the following command to build and package the backend services into a Docker container:

mvn spring-boot:build-image -DdockerPassword=<your-docker-account-password>


This command will build and package the services into a Docker container and push it to your Docker Hub account.

How to Run the Backend Services Make sure you have the following installed on your machine:

Java 21 Docker Kind Cluster - Installation Instructions Start Kind Cluster Run the k8s/kind/create-kind-cluster.sh script to create the Kind Kubernetes cluster:

./k8s/kind/create-kind-cluster.sh

This will create a Kind cluster and pre-load all the required Docker images into the cluster, saving you time downloading the images when you deploy the application.

Deploy the Infrastructure Run the k8s/manifests/infrastructure.yaml file to deploy the infrastructure:

kubectl apply -f k8s/manifests/infrastructure.yaml

Deploy the Services Run the k8s/manifests/applications.yaml file to deploy the services:

kubectl apply -f k8s/manifests/applications.yaml

Access the Keycloak Admin Console To access the Keycloak admin console, you need to port-forward the Keycloak service to your local machine:

kubectl port-forward svc/keycloak 8080:8080

Access the Grafana Dashboards To access the Grafana dashboards, you need to port-forward the Grafana service to your local machine:

kubectl port-forward svc/grafana 3000:3000