Php architecture ddd
Skill ekut/claude-code-php-toolkit/skills/php-architecture-ddd
Domain-Driven Design architecture for PHP — Rich Domain Model, Hexagonal Architecture, CQRS, Bounded Contexts, Aggregates, Value Objects, Domain Events.From its SKILL.md
npx -y skills add ekut/claude-code-php-toolkit --skill php-architecture-dddAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.5 KB, as published. Nobody here has run it
Domain-Driven Design (DDD) Architecture
Domain-Driven Design places the business domain at the center of the software. The code mirrors the language and rules of the business, and the architecture enforces a strict dependency direction: infrastructure depends on the domain, never the reverse.
DDD is not a universal solution — it earns its complexity when the domain itself is complex. Projects with many business invariants, bounded contexts, and long lifespans benefit most. For simpler CRUD apps, the ceremony adds overhead without proportional value.
When to Use
- The domain has complex business rules — invariants, state machines, multi-step processes
- Multiple bounded contexts exist (e.g., Orders, Inventory, Billing are separate sub-domains)
- Domain experts are available and the team invests in a ubiquitous language
- The team has DDD experience or is willing to invest in learning
- The application is long-lived (3+ years) and will evolve significantly
- Multiple interfaces consume the same domain logic (web, CLI, API, async workers)
- Business rules change more often than infrastructure
Module Index
| Topic | File | Use when… |
|---|---|---|
| Core Principles | core-principles.md | Explaining dependency direction, ubiquitous language, bounded contexts, aggregates |
| Directory Structure | directory-structure.md | Setting up a new project or reviewing layer organisation |
| Building Blocks | building-blocks.md | Implementing Value Objects, Entities, Aggregates, Domain Events, CQRS, Repositories |
| Cross-Cutting | cross-cutting.md | Logging, auth, validation, and error handling in a DDD context |
| Anti-Patterns | anti-patterns.md | Code review, migration decisions, "When to Migrate Away", checklist |