kotlin-patterns

Standardize Kotlin/Spring backend architecture with reusable entity, service, repository, and controller patterns.

5|1|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/ashchupliak/dream-team --skill kotlin-patterns-ashchupliak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-patterns
Source: https://github.com/ashchupliak/dream-team/tree/main/skills/kotlin-patterns
Command: npx skills add https://github.com/ashchupliak/dream-team --skill kotlin-patterns-ashchupliak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kotlin/Spring Boot patterns for Orca service provide ready-to-use templates for modeling domain entities, implementing services, repositories, and controllers, ensuring consistent design across backend features.

Core Features & Use Cases

  • Entity Pattern: standard data class with id, createdAt, updatedAt.
  • Service Pattern: orchestrates business logic and coordinates repositories.
  • Repository Pattern (JOOQ): typed data access layer using DSLContext.
  • Controller Pattern: REST controller wiring to services.
  • API Interface Pattern: explicit API contracts with OpenAPI annotations.
  • DTO Pattern: request/response data transfer objects with validation.
  • Exception Pattern: typed exceptions for common error cases.
  • Null Safety Guidelines: use safe calls and avoid force unwraps.

Quick Start

Start by modeling your domain with Entity, then implement the Service, Repository, and Controller layers following the Kotlin-patterns templates.

Frequently Asked Questions about kotlin-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize Kotlin Spring Boot backend architecture across services?

Kotlin Spring Boot backend architecture is standardized by applying reusable patterns for entities, services, repositories, and controllers, ensuring consistent design across backend features. The set enforces specific patterns for domain modeling, data access, and REST APIs.

What's the best way to structure domain entities and DTOs in Kotlin?

Structuring domain entities and DTOs in Kotlin involves using standard data classes with id, createdAt, and updatedAt fields for entities, and request/response data transfer objects with built-in validation for DTOs. This approach enforces null-safety guidelines.

How do I implement a typed repository pattern using JOOQ in Spring Boot?

Implementing a typed repository pattern using JOOQ in Spring Boot involves creating a data access layer that uses DSLContext. This repository pattern orchestrates database interactions while maintaining type safety and coordinating with the service layer.

Does this Kotlin patterns set support transactional and idempotent operations?

This Kotlin patterns set supports transactional and idempotent operations within the service layer. The service pattern orchestrates business logic and coordinates repositories while ensuring safe transaction handling and explicit API contracts with OpenAPI annotations.

How do I define explicit API contracts for REST controllers in Kotlin?

Defining explicit API contracts for REST controllers in Kotlin uses an API Interface pattern with OpenAPI annotations. Controllers wire to services while DTO patterns handle request and response data transfer objects with validation.

What null-safety practices should I follow when modeling domain entities in Kotlin?

Null-safety practices for modeling domain entities in Kotlin require using safe calls and avoiding force unwraps. The entity pattern enforces standardized data classes while the service and repository layers maintain type safety throughout backend operations.