simple-criar-endpoint-rest

Scaffold a Kotlin Spring Boot REST endpoint with JpaRepository and Flyway migrations.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/diegolirio/ai-showcase-skills --skill simple-criar-endpoint-rest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simple-criar-endpoint-rest
Source: https://github.com/diegolirio/ai-showcase-skills/tree/main/skills/simple-setup-kotlin-spring/claude/skills/simple-criar-endpoint-rest
Command: npx skills add https://github.com/diegolirio/ai-showcase-skills --skill simple-criar-endpoint-rest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This lightweight variant of criar-endpoint-rest scaffolds an entire REST endpoint in Kotlin + Spring Boot without the Domain Repository interface or RepositoryImpl. It injects a JpaRepository directly in the handler and uses toDomain/fromDomain mappings, enabling rapid MVP endpoints in multi-module projects.

Core Features & Use Cases

  • Lean scaffolding: generates Route, Request, Command/Query, Handler, Result, Domain Entity, Business Rules, JPA Entity with toDomain/fromDomain, and a JpaRepository interface.
  • No domain repository interface: avoids XRepository in the domain, aligning with the simple variant.
  • Migration and tests: includes Flyway migration and tests for handler and route layers.
  • Use Case: ideal for MVPs or CRUD endpoints in Kotlin + Spring projects that prefer simple, fast scaffolding.

Quick Start

Describe the HTTP verb, path, and sample request body to scaffold a complete REST endpoint.

Frequently Asked Questions about simple-criar-endpoint-rest

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

FAQPage Schema
How do I scaffold a REST endpoint in Kotlin Spring Boot without a domain repository interface?

To scaffold a Kotlin Spring Boot REST endpoint without a domain repository, the tool injects a JpaRepository directly into the handler and uses toDomain/fromDomain mappings. This bypasses domain repository interfaces for rapid MVP CRUD development.

What files and components are generated when scaffolding a Kotlin Spring Boot endpoint?

Scaffolding a Kotlin Spring Boot endpoint generates Route, Request, Command/Query, Handler, Result, Domain Entity, Business Rules, JPA Entity, and JpaRepository interface. It also includes Flyway migrations and corresponding tests for handler and route layers.

When should I use lean REST endpoint scaffolding instead of full DDD repository patterns in Kotlin?

Use lean REST endpoint scaffolding for MVPs or CRUD endpoints in multi-module Kotlin projects where you prefer direct JpaRepository usage. It avoids creating a domain repository interface and RepositoryImpl, enabling faster and simpler scaffolding.

Can I generate Flyway migrations and tests alongside my Kotlin Spring Boot endpoints?

Yes, the scaffolding process includes Flyway migration generation and creates tests for both the handler and route layers. This ensures database schema changes and endpoint behavior are covered immediately after scaffolding.

How do I start scaffolding a CRUD endpoint by describing the HTTP verb and path?

You provide the HTTP verb, path, and a sample request body to start scaffolding. The tool uses this input to automatically generate the complete endpoint structure, including domain entities, JPA mappings, and route handlers.

What are the limitations of using direct JpaRepository injection in Kotlin Spring Boot handlers?

Directly injecting a JpaRepository into handlers skips the domain repository interface and RepositoryImpl, which may limit strict domain-driven design separation. It is best suited for simple CRUD scenarios rather than complex business logic requiring repository abstraction.