All projects

E-commerce backend

Easy-Buy

An e-commerce backend split into microservices, with Kafka passing events between them and Keycloak handling login.

  • Java
  • Spring Boot
  • Spring Cloud
  • Kafka
  • Keycloak
  • PostgreSQL
  • MongoDB
Project
Solo project
Contribution
Backend microservices
Availability
Backend project. No public demo.

Overview

Easy-Buy is an e-commerce backend split into eight services. A customer sends an order to the gateway. The order service checks that the customer exists, asks the product service to take the stock out, records the order lines, requests payment, and publishes a confirmation. The notification service picks that up and emails the customer. Keycloak handles login, and the services keep their data in PostgreSQL and MongoDB.

Architecture

Requests go through the API gateway, where the Keycloak token check starts. Behind it, each service registers with Eureka and reads its settings from the config server; an order is put together with OpenFeign for the customer lookup and RestTemplate for the product purchase. Payment and order events both go to Kafka, and the notification service turns them into email.

KeycloakAuthentication
API GatewayRequest routing
Spring Boot microservices Customer / Product / Order / Payment / Notification
PostgreSQLRelational data
MongoDBDocument data
KafkaEvent messaging

Supporting infrastructure: Spring Cloud Config + Eureka Discovery

Component overview. The payment service does not establish real payment processing.

What it does

Checkout across services

Creating an order calls the customer and product services, saves the order lines, requests payment, then publishes a Kafka event.

Stock checked during the purchase

The product service refuses the order when the quantity is not available, so stock cannot go negative.

Emails from events

The notification service consumes order and payment events and sends the matching email template.

Configuration and discovery

A config server holds the shared settings and Eureka registers each service, so URLs and ports live in one place.

Source code