kotlin-springboot-hexagonal
Installation
SKILL.md
Kotlin + Spring Boot Hexagonal Architecture Guide
This skill defines the architectural conventions for a Kotlin Spring Boot modular monolith using hexagonal architecture (ports & adapters). Follow these patterns when creating or modifying any code.
Module Structure
The project is organized into strict layers with unidirectional dependencies:
presentation (REST) → application (Use Cases) → domain (Models) → support (Shared Kernel)
| Layer | Responsibility | May Depend On |
|---|---|---|
presentation |
REST controllers, request/response DTOs, security adapters, Spring config. There can be multiple presentation modules (e.g., *-api, *-admin) sharing the same application layer. |
application, support |
application |
Use case interfaces (ports/in), service implementations, port/out interfaces | domain, support |
domain |
Entities, value objects, domain exceptions, repository interfaces & implementations | support |
support |
Base exception hierarchy, error codes, shared enums, cross-cutting types | (none) |
infrastructure/* |
External system adapters (Redis, messaging, etc.) | domain, support |