← ClaudeAtlas

ddd-spring-bootlisted

Write Domain-Driven Design code in Spring Boot / Java — the four-layer package structure, aggregate roots as JPA entities, value objects and typed ids as embeddables, command and query services, repositories, domain events, anti-corruption layers, and the REST interface with resources and assemblers. Use when implementing or refactoring a Spring Boot service around business rules, structuring a new bounded context in Java, or pulling business logic out of controllers into a domain model. It carries the DDD design rules it depends on, so it works on its own. Not for Spring configuration, security, or framework questions unrelated to domain modeling.
salimramirez/agent-skills · ★ 4 · Web & Frontend · score 75
Install: claude install-skill salimramirez/agent-skills
# DDD in Spring Boot Write the actual code for a Domain-Driven Design model in **Spring Boot / Java**. The core rules below say *what* the building blocks are and when to reach for each; the references say *how to express them idiomatically* in Spring Boot, and the assets and scripts write the parts that should come out the same every time. This is an **opinionated** house style: for every decision it names one convention and says what that convention buys, rather than listing options. It is one coherent way to do this, not the only correct one; where a choice is genuinely open, the reference says so. Examples use the **QuickBite** food-delivery domain — an `Order` in the `ordering` bounded context, a `Customer` in `customers`. The idioms are Spring Boot 3 with Spring Data JPA, Java records for everything that has no identity, Lombok for getters and nothing else, springdoc for the API description, and constructor injection throughout. The shipped code compiles for Java 17 and runs on Spring Boot 3.5 and 4.0 as verified; the one difference that matters between the two is the name of the web starter (`spring-boot-starter-web` on 3, `spring-boot-starter-webmvc` on 4). Persistence annotations are `jakarta.persistence.*` on both; on Spring Boot 2 they were `javax.persistence.*`. <!-- ddd:core:start --> ## Prime directive: model the domain, and protect it - Put business rules and invariants **inside the domain model itself**, not scattered across controllers, services, or SQL