https://github.com/snds-prfct/recommendation-system
Cluster of 3 microservices and Kafka broker. Kafka, Java 25/Spring Boot 4 Microservices, Docker, Prometheus, Grafana
https://github.com/snds-prfct/recommendation-system
docker grafana java kafka prometheus spring spring-boot
Last synced: 3 months ago
JSON representation
Cluster of 3 microservices and Kafka broker. Kafka, Java 25/Spring Boot 4 Microservices, Docker, Prometheus, Grafana
- Host: GitHub
- URL: https://github.com/snds-prfct/recommendation-system
- Owner: snds-prfct
- Created: 2025-10-25T19:20:46.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-03-30T19:00:38.000Z (3 months ago)
- Last Synced: 2026-03-30T21:04:02.948Z (3 months ago)
- Topics: docker, grafana, java, kafka, prometheus, spring, spring-boot
- Language: Java
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Recommendation System
The system consisting of several microservices and a Kafka broker, emulating the operation of a recommendation system (creating/processing recommendations based on users activity).
This project focuses not on business logic and code, but on the system as a whole, the interaction between components, and the infrastructure.

## System Components
### Main Service
###### Technology
Java 25 / Spring Boot 4 Microservice
###### Description
Has few REST endpoints in order to emulate users activity:
> GET localhost:8080/posts/view
> POST localhost:8080/posts/like
> POST localhost:8080/posts/repost
When these endpoints are executed it sends messages into `recommendation-system.users-activity` Kafka topic with specific key (`view`, `like`, `repost`)
in order to separate them by partition.
### Recommendation Service
###### Technology
Java 25 / Spring Boot 4 Microservice
###### Description
Emulates the generation of recommendations for users:
- Reads messages from the `recommendation-system.users-activity` Kafka topic about users activity
- Generates recommendations with different types and
- Sends messages with some information about recommendations to different partitions of a `recommendation-system.recommendations` Kafka topic.
### Notification Service
###### Technology
Java 25 / Spring Boot 4 Microservice
###### Description
Emulates the generation and sending of notifications to users based on recommendations:
- Reads recommendations from the `recommendation-system.recommendations` Kafka topic
- 'Sends' notifications about recommendations to users.
### Kafka Broker
###### Technology
A Docker container based on `apache/kafka:4.1.0` image
###### Description
Has few topics:
- `recommendation-system.users-activity` with 3 partitions for users activity types: views, likes, reposts;
- `recommendation-system.recommendations` with 3 partitions for different recommendations: news, new friends, interesting blog posts.
### Kafka UI
###### Technology
A Docker container based on `ghcr.io/kafbat/kafka-ui:v1.4.2` image
###### Description
UI for Apache Kafka message broker is available at:
> localhost:8083
### Prometheus
###### Technology
A Docker container based on `prom/prometheus:v3.9.1` image
###### Description
Prometheus becomes available after starting services using Docker Compose:
> localhost:9090
### Grafana
###### Technology
A Docker container based on `grafana/grafana:12.3.2` image
###### Description
Grafana becomes available after starting services using Docker Compose:
> localhost:3000
## Running the System using the Docker Compose tool
In order to run the system it is necessary to build microservices first:
> mvn clean package
Then the Docker images can be built:
> docker compose build [--no-cache]
And the full System can be launched:
> docker compose up -d
To shut down the system, run:
> docker compose down