Installation

Laravel DDD Generator is designed to be used as a development-only tool for scaffolding modules and architecture.


Requirements

  • PHP >= 8.1
  • Laravel >= 10.x
  • Composer

Install via Composer

composer require fixik/ddd-generator --dev

Publish configuration (optional)

php artisan vendor:publish --tag=ddd-config

This will create:

config/ddd.php

Default configuration

return [
    'base_path' => app_path('Modules'),
    'base_namespace' => 'App\\Modules',

    'auto_discovery' => [
        'enabled' => true,
        'cache' => false,
    ],
];

Verify installation

Shows a list of available commands:

php artisan list | grep ddd

First module

php artisan ddd:make api-http Order --entity=Order

Next steps

Continue exploring the documentation:

  • 📐 Read about the overall Architecture
  • 🎛️ Learn how generation Presets work
  • 🔀 Understand the CQRS flow in CQRS

These sections explain the design decisions and help you use the generator effectively in real-world projects.


This site uses Just the Docs, a documentation theme for Jekyll.