lunarstorm/laravel-ddd
A Laravel toolkit for domain-driven design: scaffold bounded contexts, aggregates, value objects, events, and commands with Artisan generators, plus conventions and service providers for keeping complex apps modular and maintainable.
stub files and make:-style commands. teylabs/laravel-ddd is a thin codegen layer over Laravel's existing generators, so the buy case rests on convention consistency across squads, not on unique capability.ddd:* generators let you prototype context boundaries in a branch and measure the cost of the structure before committing to a migration epic.Domain/<Context>/{Aggregates,Events,ValueObjects,...}) instead of reading three legacy modules to infer where things go. Useful when staffing parallel workstreams.Makefile, or wrapper that does if ddd:aggregate Foo; then ... to detect "class already exists" now silently changes behavior. This is an internal tooling decision — audit and update those scripts before upgrading, or pin to 3.2.x.ddd:listener --event=InvoicePaid now resolves to the domain event (Domain\Billing\Events\InvoicePaid) rather than App\Events\.... That is a deliberate opinion: domain events are the default, application events are the exception and must be fully qualified. If your product architecture keeps events in the app layer, this default works against you.Adopt when:
make:* generators as part of normal workflow — this slots in beside them rather than replacing them.Look elsewhere when:
deptrac, PHPArkitect, or PHPStan architecture rules for dependency-direction guarantees. This package will happily generate a class; it will not stop you from importing it where you shouldn't.Domain/ folders without domain modeling discipline produces ceremony without benefit.--event is a mismatch you'd be fighting on every invocation (you can pass a fully qualified name, including one picked from the interactive prompt, but the default nudges the wrong way for you).One-line summary: a small, dev-only Laravel package that generates DDD scaffolding (aggregates, value objects, domain events, listeners) so teams produce consistently structured code faster and with less review churn.
To engineering leadership: it is a convention tool, not a framework. It adds no runtime dependency, no request-path code, and no migration burden — which makes the decision low-risk and reversible. The trade-off is a single-maintainer dependency and a modest release cadence; acceptable because it lives in require-dev.
To engineering teams: you get make:*-style commands for domain building blocks, with interactive prompts and a predictable folder contract. Two things changed in v3.3.0 that you should know before upgrading: (1) ddd:* commands now exit 0 when a class already exists or a name is reserved by PHP, matching make:* — the error is still printed and your file is untouched, but any script relying on the old non-zero exit should check output instead; (2) ddd:listener --event=InvoicePaid now binds to the domain event, so pass a fully qualified name like --event="App\Events\InvoicePaid" for application events.
To product management: the value is lead time on new domain features and reduced onboarding cost; the cost is one dependency and a small amount of up-front agreement on folder conventions. Recommend a one-context pilot rather than a mandate.
Risk posture: low blast radius, medium maintenance exposure. Upgrade action item for v3.3.0 is a grep of CI scripts and Makefile targets for ddd:* invocations that branch on exit status.
How can I help you explore Laravel packages today?