laravel-ddd/starter
Composer starter kit that turns a fresh Laravel 12/13 app into a Domain-Driven Design structure. Includes base Entity/ValueObject/Repository/Service classes, 12 generators, interactive installer (auth, docs, tests, sample module), API-ready routes, and optional AI context.
{Users} β Users)database/migrations/)Users.php β User.php)ddd:test command for running module testscomposer create-project laravel/laravel mi-proyecto
cd mi-proyecto
composer require laravel-ddd/starter
php artisan ddd:install --auth=none --module=users
Supported Options
- Auth: none, breeze, sanctum
- Module: none, users
Fixed:
Fixed syntax error in DddInstallCommand that caused undefined variable $content error during installation.
Transform any Laravel 12/13 project into a fully structured Domain-Driven Design architecture.
ddd:install) with auth selection: Breeze / Sanctum / NoneEntity, ValueObject, Repository, Servicecomposer create-project laravel/laravel my-project
cd my-project
composer require laravel-ddd/starter
php artisan ddd:install
| Command | Description |
|---|---|
ddd:install |
Interactive installation |
ddd:make-module |
Create a complete module |
ddd:make-entity |
Entity + model + migration |
ddd:make-service |
Service class |
ddd:make-repository |
Repository interface + implementation |
ddd:make-controller |
Thin controller |
ddd:make-request |
Form Request |
ddd:make-resource |
API Resource |
ddd:make-value-object |
Value Object |
ddd:make-routes |
Module routes file |
ddd:test |
Run package tests |
Running php artisan ddd:make-module Products gives you:
src/
βββ Products/
βββ Entities/
βββ Repositories/
β βββ ProductRepositoryInterface.php
β βββ EloquentProductRepository.php
βββ Services/
βββ Http/
β βββ Controllers/
β βββ Requests/
β βββ Resources/
βββ Routes/
βββ Providers/
βββ database/
β βββ migrations/
βββ tests/
βββ Unit/
βββ Feature/
Each module includes:
| Resource | Description |
|---|---|
| README.md | Complete user guide |
| Commands Reference | All commands documented |
| Best Practices | DDD patterns guide |
| Routing Guide | API routing setup |
| Dependency | Minimum version |
|---|---|
| PHP | ^8.4 |
| Laravel | ^12.x or ^13.x |
None at this time. If you run into any problems, open an issue on GitHub.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
This package is open-sourced under the MIT license.
Found a bug or have a suggestion?
Open an issue on GitHub β all feedback is welcome.
How can I help you explore Laravel packages today?