
Explore microservices powered by Spring Boot, learn clean and hexagonal architectures, domain-driven design, and event-driven patterns with Kafka, Saga pattern, outbox, and CQRS, then deploy with Docker, Kubernetes, and GKE.
Present a food ordering system with four microservices that communicate via Kafka, coordinating payments and approvals in a saga pattern.
Explore hexagonal architecture and domain-driven design, with ports, adapters, aggregates, domain events, saga and outbox patterns, plus dockerized deployment to Kubernetes and GKE.
The source code provided as GitHub links and zip files!
Explore clean and hexagonal architectures, centering the domain layer to ensure a testable, independent software with ports and adapters, dependency inversion, and clearly defined entities and use cases.
Create a multi-module food ordering system using clean and hexagonal architecture: build an order service with domain, application, dataaccess, and messaging modules, plus order-container and order-domain-core wired to Kafka.
Explore domain-driven design from strategic boundaries and ubiquitous language to tactical concepts such as entities, aggregates, value objects, domain events, and domain services, with kafka event logs guiding order-service.
Designs the order service domain using tactical domain-driven design patterns, building the order processing aggregate with value objects, entities, and domain events such as created, paid, and canceled.
Implement the order service domain logic by building the order aggregate with value objects and items, and enforce domain rules for initialize, pay, approve, and cancel.
Discover Apache Kafka basics: brokers, topics, partitions, replication, and offsets. Learn how producers, consumers, and consumer groups use append-only logs for resilient, scalable streaming with schema registry and K table.
Develop the data access adapter by adding JPA entities and repositories for orders, customers, and restaurants, with one-to-one and one-to-many mappings, address and order items, plus Lombok builders.
Create OrderJpaRepository extending JPA repository for OrderEntity with UUID and an OrderDataAccessMapper to convert between domain objects and entities, enabling findByTrackingId via Spring.
Implement payment and restaurant approval listeners, using PaymentResponseKafkaListener and RestaurantApprovalResponseKafkaListener to convert PaymentResponseAvroModel to PaymentResponse and ApprovalResponseAvroModel to approvalResponse via the messaging data mapper, triggering saga actions.
Implement the order container module by adding Spring Boot starter, building a jar and docker image, and configure multi-module support with scanBasePackages, entity scan, and JPA repositories, Postgres, and Kafka.
Create the order service PostgreSQL schema with UUID support, including orders, order items, and address tables, cascade deletes, and enum order status values for testing.
Implements the order notes interpreter with OpenAI API, using a system prompt and prompt template to extract order preferences into OrderPreferences, with retry logic and AIOrderNotesInterpreterException for failures.
Upgrade Java to 25 and Spring Boot to 3.5.8, configure Lombok, migrate to Jakarta, and switch to KRaft mode Kafka without ZooKeeper for the order AI module.
Explore running a local LLM with Ollama for the order AI module, switching between local mistral 7B and OpenAI via spring AI, using an OpenAI-compatible Ollama API, with logging.
Extend the domain exception framework with a payments domain exception and not found variant, then define abstract payment events (completed, canceled, failed) using a generic payment entity and super constructors.
Implement a spring kafka listener for payment requests, wiring a payment request message listener and messaging data mapper to handle pending and cancel payments under the saga pattern.
Implements the restaurant service container module by wiring domain core, application service, data access, and messaging with spring boot, and builds docker images and Kafka topics.
Explain and implement the order payment saga and order approval saga in a microservices architecture. Utilize transactional processing, domain events, and a shared saga helper for persisting orders.
Refactor the order domain to add outbox models and update ports, introducing order payments and approvals outbox messages with JSON payloads and saga status tracking via Kafka.
Refactor the order domain to add an outbox scheduler using spring scheduling. Implement a payment outbox scheduler with a helper and saga constants to publish messages and update outbox statuses.
Refactor the order domain to add approval outbox schedulers, including an approval outbox helper and restaurant scheduler, plus a daily outbox cleaner for completed and processing saga statuses.
Refactor the order payment saga to use the outbox pattern instead of direct event firing. Update saga steps and outbox handling for payment and approval to ensure idempotent processing.
Refactors the order messaging module to implement the outbox pattern for payment request events via a Kafka publisher, Avro model payloads, saga ID, and robust error handling.
Refactor the order messaging module to outbox-based Kafka publishing, introducing restaurant approval Avro payloads, saga tracing, and robust error handling for optimistic locking scenarios.
Add the Outbox repository adapters to the payment data access module, implementing entity, mapper, and repository components for order outbox messages using the Outbox pattern.
Refactor the payment messaging module to the outbox pattern with a Kafka payment response publisher and Avro models. Log saga IDs, configure topics, and enable Spring managed components.
Hi there! My name is Ali Gelenler. I'm here to help you learn microservices architecture while applying Clean and Hexagonal Architectures and using Domain Driven Design.
In this course, you will focus on architectural aspects of microservices architecture and use Clean & Hexagonal Architecture principles while developing each service. In the implementation of the domain layer you will also apply Domain Driven Design principles.
The course also includes a new section on adding AI functionality into the existing Order Service while still following Clean Architecture and Domain Driven Design principles. In this section, you will implement an AI-powered Order Note Interpreter that transforms raw customer order notes into structured order preferences. You will use Spring AI with both OpenAI and Ollama, apply system prompts as guardrails, use prompt templates for controlled and repeatable LLM calls, and connect LLM responses to business logic more safely using structured output.
You can always use the latest versions for spring boot, and other dependencies in this course. I will be constantly updating the dependency version in the last section's lectures. You may check that to see the required code and configuration changes for updated versions. Also if you would like to use subtitles during the course, you can turn on the captions on videos as all lectures are updated with hand-written subtitles. You may choose among over 20 different languages. I suggest using subtitles to make it easier to follow the lectures.
Scott Knox: "As a working professional, I can already tell this is the holy grail of understanding modern architectures. If your company is struggling to grasp certain concepts, this course will help you help them. Thanks Ali for the excellent explanations!"
You will implement SAGA, Outbox and CQRS patterns using the 4 Spring boot Java microservices that you will develop using Clean and Hexagonal architecture principles.
Nick Goupinets: "Great course - gives a deep-dive into microservice development experience with Spring Boot. As an added bonus shows how to deploy it with Kubernetes. At times it felt too detailed, sort of making it hard to see the forest behind the trees. Also Hex. architecture resulted in what looked like an over-engineered overall solution. With that said, Ali did a fantastic job explaining all of the design decisions with clear architecture diagrams that offset that complexity!"
You will also learn and use Apache Kafka as the event store, and use events to communicate between services, and to implement the architectural patterns.
Nischal Jadhav: "If u are looking to become an high level developer or an architect, then this is the best course.!"
The concepts that you will be learning and implementing are:
Spring boot microservices
Clean Architecture
Hexagonal Architecture
Domain Driven Design
AI integration using Clean Architecture, Ports and Adapters, and Domain Driven Design principles
Order Note Interpreter AI assistant using Spring AI, OpenAI, Ollama, LLMs, prompt templates, system prompts, guardrails, and structured output
Event-driven services using Apache Kafka
SAGA Architecture Pattern
Outbox Architecture Pattern
CQRS Architecture Pattern
Kubernetes on local using Docker desktop
Kubernetes on Google Cloud using Google Kubernetes Engine(GKE)
Ali Aminian: "I really like this course. Thanks Ali for complete description and professional coding. I really enjoy to participate this course."
To communicate with the data stores in microservices you will use Spring Data JPA for PostgreSQL, and Spring Kafka for Kafka.
You will be following a hands-on approach and developing a project from scratch. You will have 4 microservices that communicate using events with Kafka as the event store.
r j: "This is an amazing course. An architect from my team recommended this to me and he's implemented something similar but bigger in our company, the biggest retailer on the planet."
You will also have multiple choice quizzes in each section to check your progress throughout the course.
Arindam Majumdar: "This course helped me immensely to understand the Domain Driven Design approach on Microservices. Its so far the best hands on course I have come across in Udemy so far. Many thanks to Ali. Great job!! :)"
At the end of the course you will understand how to run an event-driven microservices architecture with Clean and Hexagonal Architecture principles and with Domain Driven Design concepts. You will use Spring boot and Java to develop the microservices. You will also learn implementing architectural microservices patterns such as SAGA, Outbox and CQRS. In the end you will be able to deploy your application to Kubernetes on Google Cloud using Google Kubernetes Engine. You will also learn how to add AI functionality effectively into an existing microservice using Ports and Adapters architecture. You will use Spring AI with OpenAI and Ollama and implement an AI assistant as a secondary adapter in Clean Architecture while using modern techniques such as prompt templates, system prompts, guardrails, and structured output.
Anurag tiwari: "Just started the course but i can already tell that this a good one Ali explains all the concepts like out box ,saga pattern so well. I would highly recommend this course for anyone who wants to take their knowledge about microservices to the next level using different patterns like hexagonal ,saga pattern. I would also recommend this course for beginners as youll learn a ton of stuff regarding microservices and patterns to create agile services as this course is very hands on"
I have followed the same clean & hexagonal architectures and domain driven design principles in the implementation of each microservice. If you feel like you want to skip some repeating parts, you may download the source code that I provide in the first lecture of each section starting from section-3 or using the github links that I provided in the course resources. You can then use the provided source code to continue with the section.
Narendra Kumar A: "Its awesome course, I have ever come across in Udemy explaining the DDD, Clean architecture and usage of patterns concepts so cleanly."
For more detailed information on the progress of this course, you can check the introductory video and free lessons, and if you decide to enroll in this course, you are always welcome to ask and discuss the concepts and implementation details on Q/A and messages sections. I will guide you from start to finish to help you successfully complete the course and gain as much knowledge and experience as possible from this course.
Jason: "This course is one of the best I ever had. There are many microsevices courses on Udemy, and most of them are like something that manufactured in the same factory. They all used the same framework and followed the same steps to teach microservices. They never talked about the important concepts behind the microservice. I felt like they just wanted to show off the latest version of frameworks and finish the long courses with them quickly and get paid. The impression after I watched first this lesson was amazing. He actually starts the project with the bare bone java plain object. It was like I'm flying with feather, not fully armed with numerous buzzword frameworks. It might be frustrated at first if you are really new to microservices and never heard of concepts like DDD before. But I'm pretty sure this is one of the courses that make you a "better" developer."
Remember! There is a 30-day full money-back guarantee for this course! So you can safely press the 'Buy this course' button with zero risk and join this learning journey with me.