https://github.com/koriebruh/spring-services
A Spring Boot-based microservices architecture featuring authentication, patient management, billing, and analytics services with API Gateway, Kafka, gRPC, and PostgreSQL — all containerized using Docker Compose
https://github.com/koriebruh/spring-services
docker-compose hibernate-jpa mock postgresql spring-boot springcloudgateway springsecurity-jwt
Last synced: about 2 months ago
JSON representation
A Spring Boot-based microservices architecture featuring authentication, patient management, billing, and analytics services with API Gateway, Kafka, gRPC, and PostgreSQL — all containerized using Docker Compose
- Host: GitHub
- URL: https://github.com/koriebruh/spring-services
- Owner: koriebruh
- License: mit
- Created: 2025-03-30T17:24:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-12T18:22:21.000Z (11 months ago)
- Last Synced: 2025-07-12T20:38:50.303Z (11 months ago)
- Topics: docker-compose, hibernate-jpa, mock, postgresql, spring-boot, springcloudgateway, springsecurity-jwt
- Language: Java
- Homepage:
- Size: 469 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🚀 Microservice Architecture Overview
This project demonstrates a microservices-based architecture using Spring Boot, Kafka, PostgreSQL, gRPC, and Docker. Each service is containerized and communicates via REST, gRPC, or Kafka events.
---
## 📌 Architecture Flow
The following diagram illustrates the communication flow between services:

> Ensure the image `spring-microservice-flow.png` is located at the root of the repository or adjust the path if needed.
---
## 🧩 Microservices Overview
### 🌐 API Gateway
- **Spring Cloud Gateway** – Entry point (`http://localhost:3000`)
- Routes requests to Auth, Patient, and Billing services
- Validates JWT tokens from Auth Service
### 🔐 Auth Service
- Handles user authentication: `/auth/login`, `/auth/register`
- Issues JWTs and verifies them for the gateway
- Connected to a dedicated PostgreSQL instance (`postgres-auth-service`)
- Runs on `http://localhost:8083`
### 🧍 Patient Service
- Exposes patient-related endpoints (`http://localhost:8080`, `http://localhost:5555`)
- Communicates with Billing via gRPC
- Publishes patient-related events to Kafka
### 💰 Billing Service
- gRPC service running at `http://localhost:8081` and `http://localhost:9091`
- Responds to RPC requests from Patient Service
### 📊 Analytics Service
- Kafka consumer service
- Listens to patient events for analytical processing
- Available at `http://localhost:8082`
### 📬 Kafka
- Event broker at `http://localhost:9092`
- Used for asynchronous event streaming between services
### 🔔 Notification Service (Coming Soon)
> This service will be integrated in the future to handle event-based notifications (e.g., email, SMS, push alerts).
---
## 🐳 Running with Docker Compose
This project includes a `docker-compose.yml` file to orchestrate all services.
To start the full environment, run:
```bash
docker-compose up -d