ldaidone / laravel-ddd-starter
A Laravel starter template preconfigured for Domain-Driven Design with folder structure, namespaces, and laravel-ddd-commands included.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
pkg:composer/ldaidone/laravel-ddd-starter
Requires
- php: ^8.2
- laravel/framework: ^12.0
- ldaidone/laravel-ddd-commands: ^0.1.1
This package is auto-updated.
Last update: 2025-12-26 23:05:49 UTC
README
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.
π Quick Start
Create a new Laravel DDD-ready project:
composer create-project ldidone/laravel-ddd-starter app-name
Youβ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
π Folder Structure
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.
π§ Included Package: laravel-ddd-commands
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 ddd
See full documentation here:
β‘οΈ Laravel-DDD-Commands
π§± Philosophy
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.
π§ͺ Testing
If you extend this template or contribute:
composer test
Support
If this saves you time or helps your project, consider starring β and consider buying me a coffee! βοΈ β it keeps the ideas flowing!
π€ Contributing
Pull requests are welcome. Please open an issue first if you're planning large changes.
π License
Released under the Apache 2.0 License.
See the LICENSE file for more details.