ddd-architecture

Structure Java/Spring services with explicit DDD domain boundaries.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/rivkode/reservation --skill ddd-architecture-rivkode
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: ddd-architecture
Source: https://github.com/rivkode/reservation/tree/main/.claude/skills/ddd-architecture
Command: npx skills add https://github.com/rivkode/reservation --skill ddd-architecture-rivkode

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve?

Java/Spring ํ”„๋กœ์ ํŠธ์—์„œ DDD ์›์น™์„ ์ ์šฉํ•ด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑ/์ˆ˜์ •ํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค. ๋‹จ์ผ ์„œ๋น„์Šค ๋ชจ๋“ˆ ๋‚ด๋ถ€์˜ ๊ณ„์ธต ์„ค๊ณ„์™€ ๊ฒฝ๊ณ„ ์„ค์ •์„ ํ†ตํ•ด ๋„๋ฉ”์ธ์„ ํ•ต์‹ฌ์œผ๋กœ ๋‘๊ณ , ์ธํ”„๋ผ์ŠคํŠธ๋Ÿญ์ฒ˜ ์˜์กด์„ฑ์„ ๋ถ„๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

Core Features & Use Cases

  • Presentation, Application, Domain, Infrastructure ๊ณ„์ธต์˜ ๋ช…ํ™•ํ•œ ๋ถ„๋ฆฌ์™€ ๋ชจ๋“ˆ ๊ฒฝ๊ณ„ ์ˆ˜๋ฆฝ
  • Aggregate/Entity/Value Object/Domain Event/Repository ์ธํ„ฐํŽ˜์ด์Šค์™€ ๊ตฌํ˜„์˜ ๋ถ„๋ฆฌ ์›์น™ ์ œ์‹œ
  • ์„œ๋น„์Šค ๋‚ด Bound Context๋ฅผ ํ†ตํ•œ ์„œ๋น„์Šค ๊ฐ„ ์บก์Аํ™” ๋ฐ ์ผ๊ด€๋œ ๋ชจ๋ธ๋ง ๊ทœ์น™
  • ๋„๋ฉ”์ธ ๋ชจ๋ธ๊ณผ ํผ์‹œ์Šคํ„ด์Šค ์—”ํ‹ฐํ‹ฐ ๊ฐ„ ๋งคํผ ๊ตฌ์„ฑ ๋ฐ ๊ฒ€์ฆ ๋กœ์ง์˜ ์œ„์น˜ ์„ ์ • ๊ฐ€์ด๋“œ
  • module-boundary ์›์น™์— ๋”ฐ๋ฅธ ์„œ๋น„์Šค ๊ฐ„ ์˜์กด์„ฑ ๋ฐฉํ–ฅ์„ฑ๊ณผ ๊ณ„์ธต ๊ฐ„ ์ฑ…์ž„ ๋ถ„๋ฆฌ
  • ๊ตฌํ˜„ ์˜ˆ์‹œ์™€ ์„ค๊ณ„ ํŒ๋‹จ ๊ฐ€์ด๋“œ ์ œ๊ณต (์ฐธ์กฐ ๋ฌธ์„œ: references/)

Quick Start

Start by mapping each service to its own bounded context, define domain models and repositories, and implement application services with clean boundaries as described.

Frequently Asked Questions about ddd-architecture

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

FAQPage Schema
How do I structure a Spring service with clean domain boundaries using DDD?โ–ผ

Structure a Spring service with clean domain boundaries by mapping each service to its own bounded context and separating domain models from infrastructure using mappers for persistence translation.

Can I keep JPA annotations in the domain layer when applying DDD in Java?โ–ผ

No, you cannot keep JPA annotations in the domain layer when applying DDD in Java. The domain layer must remain pure, requiring mappers to translate between domain models and persistence entities.

What is the best way to separate repository interfaces and implementations in DDD?โ–ผ

The best way to separate repository interfaces and implementations in DDD is to define interfaces within the domain layer and place their concrete implementations in the infrastructure layer.

How do I manage aggregate boundaries and value objects in a Java DDD architecture?โ–ผ

Manage aggregate boundaries and value objects in a Java DDD architecture by explicitly defining aggregate roots, using value objects for IDs, and encapsulating models within bounded contexts to ensure consistent modeling rules.

Does this DDD architecture approach work for single-service module design?โ–ผ

Yes, this DDD architecture approach works explicitly for single-service module design, guiding internal layer separation between presentation, application, domain, and infrastructure layers to isolate infrastructure dependencies.

When should I use mappers to translate between domain models and persistence entities?โ–ผ

You should use mappers to translate between domain models and persistence entities whenever infrastructure dependencies must be isolated, ensuring the domain layer contains no persistence annotations like JPA.