Hi! I created a backend based on the Clean Architecture principles. Feedback would be very much appreciated!
The application is separated into three modules: Domain, Usecases and Adapters
• Domain module contains all entities, it's validation and repository interfaces
• Usecases module performs actions on the domain entities and repositories and does authorization
The domain and usecase modules do not have any external dependencies.
• Adapter layer: each adapter is implemented as a standalone module, lowering dependence on specific frameworks and libraries and making them interchangable. The server module consumes all adapters (e.g. databases, (graphql) endpoints, authentication logic)
GraphQL endpoints are auto-generated from the Usecases
Used technologies:
Ktor, JWT, Exposed, Flyway, KGraphQL/GraphQL generated endpoints.
https://github.com/ESchouten/CleanArchitecture
👍 2
m
Matteo Mirk
05/28/2021, 10:43 AM
Very good example thanks! I’ll use it to study clean architecture implementation in practice
😁 1
e
ESchouten
05/28/2021, 5:01 PM
@Matteo Mirk Let me know if you have any ideas or improvements!
👍 1
p
Peter
06/01/2021, 4:09 PM
nice, thanks for sharing! small nit: do you have transparency on the main readme image? compression artifacts makes it hard to read when github dark mode is enabled
e
ESchouten
06/01/2021, 5:28 PM
@Peter Image is replaced by one with a transparent background! Thanks!