damgru/stupid-event-sourcing
A Laravel package that adds a simple, no-frills approach to event sourcing. Store and replay domain events to rebuild state, keep an audit trail, and model changes over time without heavy ceremony—aimed at small projects and quick adoption.
Event::dispatch()), enabling publish-subscribe patterns.spatie/laravel-activitylog compatibility is untested).$model->recordEvent()).Model::saved() listeners with Event::dispatch() calls.RebuildUserAggregateJob).events table (provided by the package) and custom projection tables.Schema::create() for the event table; manual migrations for projections.Event::fake() for unit tests.Order) to test event sourcing.OrderSnapshot).User, Payment) as needed.current_state table).spatie/laravel-activitylog (both track changes). Choose one or sync them.spatie/laravel-cqrs but requires manual alignment.OrderCreated, PaymentProcessed) before implementation.__construct only).events table.aggregate_id and event_id for query performance.Model::save() with explicit Event::dispatch() calls.aggregate_id) or async storage (e.g., Kafka + DB).How can I help you explore Laravel packages today?