Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ddd Laravel Package

forkrefactor/ddd

Domain-driven design toolkit for Laravel providing base classes for entities, value objects, aggregates, repositories, domain events, commands and handlers, with service provider wiring to keep business logic clean, testable and independent of the framework.

View on GitHub
Deep Wiki
Context7

Mini Framework to create projects with hexagonal architecture and domain driven design

Frequently asked questions about Ddd
What is forkrefactor/ddd and what problem does it solve in Laravel?
forkrefactor/ddd is a Domain-Driven Design toolkit for Laravel and PHP applications. It provides base classes and structure for entities, value objects, aggregates, repositories, domain events, commands, and handlers. The goal is to separate business logic from framework and infrastructure code so larger Laravel projects stay maintainable and testable.
How do I install forkrefactor/ddd in a Laravel application?
Install it as a Composer package with composer require forkrefactor/ddd. Laravel integration is handled through the package configuration and service providers described in the repository. Check the README for any publishable config or stub files and run the documented vendor:publish commands if they are provided.
Which Laravel and PHP versions does forkrefactor/ddd support?
The package is built for Laravel and PHP applications, but the exact supported Laravel and PHP versions depend on the release. Use the composer.json constraints and Packagist release metadata as the source of truth before installing. If you are on an older Laravel version, verify compatibility before adding it to production.
What Artisan generators does forkrefactor/ddd provide?
The package includes Artisan generators for domain classes and scaffolding. These commands help create the DDD building blocks consistently instead of writing boilerplate by hand. The generated output can be aligned with your team's conventions through customizable stubs.
How does forkrefactor/ddd keep domain code independent of Laravel?
It promotes a layered architecture that separates domain, application, and infrastructure concerns. Domain classes such as entities, value objects, and aggregates are intended to hold business rules without relying on framework code. Laravel-specific wiring is kept in configuration and service providers at the edges.
Can I customize the stubs used by forkrefactor/ddd generators?
Yes, the package advertises customizable stubs so generated classes can match your team's naming and structure conventions. The usual workflow is to publish or override the package stubs and then adjust them to your standards. Review the README for the exact stub paths and publish command for your version.
How do commands, handlers, and domain events work together in forkrefactor/ddd?
The package provides base classes for commands, handlers, and domain events as part of its DDD foundation. Commands represent application actions, handlers coordinate the work, and domain events capture meaningful business changes. The explicit boundaries help keep that flow organized and testable.
Is forkrefactor/ddd only for new Laravel projects or can I use it in an existing app?
It can be introduced incrementally because it is a foundation of base classes and boundaries rather than a full replacement for Laravel. You can start by modeling one bounded context and moving business logic into domain classes over time. Existing framework and infrastructure code can remain at the edges while you refactor.
How should I test domain logic built with forkrefactor/ddd?
Because the domain layer is meant to be independent of the framework, entities, value objects, aggregates, and domain events can be tested with plain unit tests. Repositories and other infrastructure concerns are better covered with integration tests or test doubles at the boundary. This separation is one of the main reasons to use the package in a growing Laravel codebase.
How does forkrefactor/ddd compare with other Laravel DDD packages?
forkrefactor/ddd focuses on providing a DDD foundation: base classes, generators, explicit boundaries, and Laravel service provider wiring. It is not a full application framework, so you should compare it with alternatives based on the specific building blocks and conventions you need. Review the repository and README to confirm whether its scope matches your architecture.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager