Skip to main content
KT
OrderFlow
2026shop

OrderFlow

Event-driven e-commerce platform built as three Spring Boot microservices communicating through Apache Kafka. Demonstrates production-grade reliability patterns - Transactional Outbox, idempotent consumers (exactly-once processing) and Saga choreography - plus a RAG-powered AI shopping assistant (Spring AI, pgvector, local ONNX embeddings). Deployed live on AWS.

Architecture

Event-driven microservices (Kafka Saga) + RAG (Spring AI, pgvector) + Next.js

Features

  • Three Spring Boot microservices (product, order, fulfillment) communicating via Apache Kafka
  • Transactional Outbox pattern - reliable event publishing without the dual-write problem
  • Idempotent consumer (Redis SET NX) - exactly-once order processing
  • Saga choreography with compensating transactions and retry / dead-letter topics
  • Polyglot persistence: MongoDB (products), PostgreSQL (orders), Redis (cart)
  • RAG-powered AI shopping assistant: semantic search over the catalog with local ONNX embeddings (no API cost) stored in pgvector, and an LLM that answers strictly from retrieved context, returning its source products with similarity scores
  • RAG as a degradable feature behind a flag - with no LLM key the service still runs and semantic search keeps working
  • Managed cloud services: Confluent Kafka, MongoDB Atlas, Supabase, Upstash - deployed on AWS EC2
  • Tested with Testcontainers, 80% coverage, green CI on GitHub Actions

Gallery

Live DemoGitHub
Year

2026

Tech Stack

Java 25Spring Boot 4Spring AIApache KafkaMongoDBPostgreSQLpgvectorRedisDockerAWS EC2Next.jsReactTypeScriptTestcontainersConfluent CloudVercel

KT

Building modern, scalable web applications

Made with — © 2026 Karim Tounsi