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

v0.1.0 2025-11-26 22:38 UTC

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.

License Packagist Downloads

"Buy Me A Coffee"

πŸš€ 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.