I recently made my first steps with Kotlin. After exploring the language for a couple of weeks, I tried to translate one of my favorite architectural patterns from my Java background to the Kotlin world – Domain Driven Design.
I’ve prepared an example project on GitHub showing some of the most important concepts of DDD with Kotlin. The project implements a fictitious product service which takes care of the bounded context of a product. The product service implements domain entities as well as value objects and uses an asynchronous communication via events and commands. The example use case (which is described in the README.md on GitHub) involves communication with five fictitious external systems.
I will refine the project during the next weeks and hope that it might serve as a starting point for up-coming projects.