demonstration of hexagonal architecture sample in kotlin lang
Primary motivation of hexagonal architecture is decoupling components to manage your business more precisely. In this example, the simple e-commerce-themed application has been built in Kotlin w/spring boot.
-
application; might be your communication layer.
-
domain; all of your business can be executed at here.
- entity; plain objects/data in which represents your business
- interaction; to orchestrate your business flows. mostly includes implementations.
- port; contracts for your business rules. for example; add item, search user
- repository; I/O layer for your domain. this can be your database or any kind of rpc endpoint.
-
infrastructure; technical details either executing your business or maintaining your application. for example; configuration management, database/message queue settings codes
Inspiration, code snippets, etc.