A clean, opinionated Laravel project template that comes preconfigured for Domain-Driven Design. This starter includes a ready-made DDD folder structure, PSR-4 autoloading, and the full laravel-ddd-commands package — so you can scaffold domains, entities, use cases, value objects, repositories, and more from day one.
Create a new Laravel DDD-ready project:
composer create-project ldidone/laravel-ddd-starter app-nameYou’ll get a fresh Laravel install with:
- Pre-built DDD folder structure under app/
- Autoload namespaces for Domains & Infrastructure
- The latest version of ldaidone/laravel-ddd-commands
- Optional post-install instructions in your terminal
This starter ships with an opinionated domain layout already in place:
app/
├── Domains/
│ └── Billing/
│ ├── Entities/
│ ├── ValueObjects/
│ ├── DataTransferObjects/
│ ├── UseCases/
│ ├── Actions/
│ ├── Repositories/
│ └── Events/
└── Infrastructure/
├── Persistence/
├── Http/
├── Services/
└── Support/You can add more top-level domains freely.
This template includes:
"require": {
"ldaidone/laravel-ddd-commands": "^0.1.1"
}Which gives you fully integrated generators such as:
php artisan ddd:create-domain Billing
php artisan ddd:create-entity Billing/User
php artisan ddd:create-use-case Billing/RegisterUser
php artisan ddd:create-repository Billing/UserRepository
php artisan list dddSee full documentation here:
This starter intentionally:
- Removes dynamic configuration for core DDD directories Ensuring predictable project structure and long-term architectural stability.
- Enforces explicit domain boundaries Each domain is isolated inside app/Domains/*.
- Treats Infrastructure as a first-class layer Living under app/Infrastructure.
- Follows Laravel’s conventions wherever possible But strengthens them with DDD clarity.
If you extend this template or contribute:
composer testIf this saves you time or helps your project, consider starring ⭐ and consider buying me a coffee! ☕️ — it keeps the ideas flowing!
Pull requests are welcome. Please open an issue first if you're planning large changes.
Released under the Apache 2.0 License.
See the LICENSE file for more details.
