Event-Driven Microservices Platform

ShopFlow

Distributed Microservices Platform

A production-oriented microservices platform
applying event-driven architecture and distributed systems patterns,
built with Quarkus, Spring Boot, and Kafka.

Run locally View source
localhost:4200
ShopFlow saga timeline — order placement through payment confirmation and inventory reservation

Order placement → payment confirmation → inventory reservation · full saga lifecycle


Quick Start
bash
# Requires Docker only — no Java, Maven, or Node needed
git clone https://github.com/panryba/shopflow.git
cd shopflow
docker compose up -d
Frontend localhost:4200
Grafana localhost:3000

Default user: user1 / password  ·  App admin (admin panel): admin / password


Distributed Systems Patterns
🔄
Saga Orchestration

Coordinates distributed order processing across payment and inventory, including compensation flows, timeout recovery, and Dead Letter Queue handling.

📬
Transactional Outbox

Ensures reliable Kafka event publishing alongside database transactions, avoiding dual-write inconsistencies. Safe across 2 order-service replicas via FOR UPDATE SKIP LOCKED.

🔑
Idempotent Consumer

Prevents duplicate processing during retries and message redelivery using the Inbox pattern and client-generated idempotency keys.

⚡
Event-Driven Messaging

Kafka-based service communication using Avro serialization and Apicurio Schema Registry for shared event contracts.

🛡️
API Gateway

Provides a single entry point with circuit breaker protection, Keycloak JWT authentication, and correlation ID propagation.

🏗️
Hexagonal Architecture

Separates order-service domain logic from infrastructure concerns, keeping the core independent of Quarkus, JPA, and Kafka.

📊
Observability

Prometheus, Grafana, and Loki provide infrastructure and application monitoring, with custom metrics for Saga outcomes, duration, and Outbox activity.

🚀
Kubernetes Deployment

GitOps delivery via GitHub Actions and Argo CD for automated Kubernetes deployment on Minikube.


Tech Stack
Backend Java 25 · Quarkus · Spring Boot · Spring Batch
Messaging Apache Kafka · Avro · Apicurio Schema Registry
Data PostgreSQL · MongoDB
Security Keycloak · JWT · OAuth2
Frontend Angular · TypeScript · PrimeNG
Observability Prometheus · Loki · Grafana
Infrastructure Docker · Kubernetes · Minikube · GitHub Actions · Argo CD
Testing JUnit 5 · Mockito · Testcontainers · REST Assured · Playwright