albertoarena/laravel-event-sourcing-generator

Laravel event sourcing domain generator

Maintainers

Package info

github.com/albertoarena/laravel-event-sourcing-generator

pkg:composer/albertoarena/laravel-event-sourcing-generator

Transparency log

Statistics

Installs: 10 120

Dependents: 0

Suggesters: 0

Stars: 24

Open Issues: 0

v1.1.0 2026-06-30 20:25 UTC

README

Laravel Event Sourcing Generator โ€” scaffold complete event-sourced domains with one Artisan command

coverage Documentation Latest Version on Packagist Total Downloads License Code Size Repo views

Laravel event sourcing generator scaffolds complete domain structures for Spatie's Laravel Event Sourcing, providing a single Artisan command to generate events, projections, projectors, aggregates, reactors, actions, DTOs, notifications, and PHPUnit tests โ€” optionally straight from an existing migration.

๐Ÿ“– Documentation

Full documentation is at albertoarena.github.io/laravel-event-sourcing-generator.

Installation

composer require albertoarena/laravel-event-sourcing-generator

Compatibility

Laravel PHP Testbench
11.x (deprecated) 8.3, 8.4 9.x
12.x 8.3, 8.4, 8.5 10.x
13.x 8.3, 8.4, 8.5 11.x

PHP: 8.3 โ€“ 8.5 ยท Spatie Laravel Event Sourcing: 7.x

Quick start

php artisan make:event-sourcing-domain Animal --domain=Animal

This creates a complete event-sourced domain (events, projections, projectors, actions and DTOs) in app/Domain/Animal/Animal/. Add --aggregate=1, --reactor=1, --unit-test, --notifications=โ€ฆ and more โ€” see the documentation for every option and worked examples.

Using Claude Code? Install the companion claude-laravel-event-sourcing skill to scaffold domains conversationally.

Changelog

Please see CHANGELOG for what has changed recently.

Contributing

Feel free to fork, improve and create a pull request. Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see LICENSE for more information.