Skip to content

Laravel Boost Ddd

Laravel Boost DDD gives agents the architectural rules they need to keep Domain, Application and Infrastructure boundaries consistent

Install

$git clone https://github.com/maiobarbero/laravel-boost-ddd

Install command taken from the project's README or registry entry. Always review code before running it.

Laravel Boost DDD

Pragmatic, Laravel-native Domain-Driven Design for Laravel Boost.

Laravel Boost DDD teaches your coding agents how to apply Domain-Driven Design without fighting Laravel.

It provides Laravel Boost with opinionated guidelines, 11 task-specific agent skills, and Pest architecture tests so that feature work consistently follows the same architectural boundaries.

The goal is not to turn every Laravel application into enterprise architecture. The goal is to give business complexity a clear place to live.

The approach keeps Eloquent, policies, events, queues, and Laravel's usual entry points. Business behavior belongs in Domain, use cases belong in Application, and external integrations belong in Infrastructure. Repositories, Data objects, and services are introduced only when the work gives them a purpose.

Adoption happens as you work on the application. New capabilities follow the DDD structure; existing code stays where it is until a migration is part of the task. Installing the package gives the agent that direction for feature work, bug fixes, and refactoring. It does not move application code or authorize a wider rewrite.

What does it change?

Without architectural guidance, a coding agent can easily put authorisation, business rules, database writes, external APIs, and event dispatching into the same controller or service.

Laravel Boost DDD gives the agent a shared set of decisions for where that code belongs.

For example, a request to:

Add the ability for a customer to cancel an order.

might result in:

app/
├── Application/
│   └── Orders/
│       └── Actions/
│           └── CancelOrder.php
│
├── Domain/
│   └── Orders/
│       ├── Models/
│       │   └── Order.php
│       └── Events/
│           └── OrderCancelled.php
│
└── Http/
    └── Controllers/
        └── CancelOrderController.php

Installation

The package requires PHP ^8.3, Laravel's Illuminate Support ^12.0|^13.0, and Laravel Boost ^2.9. Composer resolves the compatible versions and installs Boost if it is missing. Pest must also be available in the application, because the installer checks for it before making changes.

From your Laravel application's root, install the package as a development dependency:

composer require --dev maiobarbero/laravel-boost-ddd

If the application does not already use Pest, add it as a development dependency and initialize its test setup before continuing:

composer require --dev pestphp/pest
vendor/bin/pest --init

Then run the package installer:

php artisan boost-ddd:install

The command adds maiobarbero/laravel-boost-ddd to Boost's configured packages, retaining the existing package selections. It calls Boost's installer with guidelines and skills enabled, then publishes tests/Architecture/DddArchitectureTest.php without forcing an overwrite of an existing file.

If Boost already has agents configured, the command reuses them without prompting. Otherwise, follow Boost's prompts to choose your agents, keeping this package selected. The command does not enable Boost's Model Context Protocol (MCP) server configuration; if you also need those tools, configure them separately with php artisan boost:install --mcp.

Run the architecture tests

vendor/bin/pest tests/Architecture

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

Explore related