Provides and generates complete CRUD workflows for Spring Boot 3 services. Creates feature-focused architecture with Spring Data JPA aggregates, repositories, DTOs, controllers, and REST APIs. Validates domain invariants and transaction boundaries. Use when modeling Java backend services, REST API endpoints, database operations, web service patterns, or JPA entities for Spring Boot applications.
This skill provides and generates complete CRUD workflows for Spring Boot 3.5+ services using a feature-focused, DDD-inspired architecture. It solves the repetitive, error-prone work of scaffolding consistent create/read/update/delete services with proper separation of concerns, giving developers a structured workflow plus a code generator so that domain models, repositories, application services, DTOs, controllers, and exception handling follow the same conventions across a codebase.
The skill documents a seven-step workflow with explicit validation gates: establish a feature package structure (domain, application, presentation, infrastructure), define framework-free domain models with invariants enforced through factory methods, expose domain repository ports, provide JPA infrastructure adapters (verified with @DataJpaTest), implement @Transactional application services, define Java-record DTOs with jakarta.validation annotations and REST controllers returning correct status codes (201/200/204), and validate with Testcontainers integration tests and Liquibase/Flyway migrations. A Python generator script (generate_crud_boilerplate.py) renders a full feature from a JSON/YAML spec using string.Template placeholders and a directory of .tpl templates, producing versioned REST endpoints, pageable list endpoints returning a PageResponse, mappers, exception types, and a global exception handler mapping validation and data-integrity errors to appropriate HTTP codes. Reference docs and example specs accompany the templates.
It targets Java backend developers building Spring Boot REST APIs and JPA-backed services who want DDD-aligned, testable CRUD scaffolding and a repeatable generator. Use cases include creating new REST endpoints, adding database entities, mapping DTOs for aggregates, adding pagination, and diagnosing CRUD or transaction-boundary regressions. The generator runs locally, reads a spec and templates, and writes generated Java files to an output directory, with no network or destructive behavior.
Spring Boot 3.5+ with a feature-focused, DDD-inspired architecture organized into domain, application, presentation, and infrastructure subpackages, using Spring Data JPA aggregates and repositories.
The Python script generate_crud_boilerplate.py reads a JSON/YAML spec (entity, id, fields, relationships) and renders Java files from a required directory of .tpl templates using Python's string.Template placeholders, writing output to a chosen directory. All templates must be provided; there is no fallback.
A versioned REST controller at /v1/{resources} with POST returning 201 and a Location header, a pageable list endpoint returning PageResponse<T>, a DTO-to-domain mapper, NotFound and Exist exception types, and a GlobalExceptionHandler that maps validation and DataIntegrityViolation errors (409).
The workflow uses unit tests for domain invariants, @DataJpaTest for entity mapping, and Testcontainers integration tests, and expects Liquibase or Flyway migrations to mirror the aggregate schema. An optional --lombok flag adds Lombok annotations.
Quick Setup:
.claude/skills/Repository
giuseppe-trisciuoglio/developer-kit