albertoarena/filament-event-sourcing
A Filament admin integration for event-sourced Laravel apps. Browse stored events and aggregate streams, inspect projections and snapshots, and monitor replay activity from a familiar panel. Quickly debug domain changes and verify state without leaving your admin UI.
This package plugs Filament panels into an event-sourced Laravel app, giving you UI for inspecting stored events (and typically replaying/rebuilding projections) without writing bespoke admin screens.
Minimal path:
composer require albertoarena/filament-event-sourcing — as of v1.2.0 the constraint accepts Filament 4 and 5, so it drops into an existing panel on either major without touching your code.->plugin(EventSourcingPlugin::make())) inside panel() in e.g. app/Providers/Filament/AdminPanelProvider.php.php artisan filament:assets / clear caches (php artisan optimize:clear) so the new nav items and views show up.spatie/laravel-event-sourcing) is installed and its stored_events table is migrated — this package reads from it rather than owning storage.Where to look first:
config/ file (publish with php artisan vendor:publish --tag="filament-event-sourcing-config") — this is usually where table names, model bindings, and page/navigation toggles live.Best first use case: point it at a single aggregate in a local or staging database and use it to eyeball the event stream for one aggregate UUID. That validates the whole chain (DB connection, model binding, authorization) with the least blast radius before you let anyone replay anything.
Read-only inspector on shared panels. The lowest-risk pattern: register the plugin on an admin panel, gate it behind a policy/permission, and treat it purely as observability. Developers debug "why is this order in this state" by reading the stream instead of adding temporary dd() calls.
Replay behind a dedicated panel or gate. If you use the package's replay/rebuild actions, put them on a panel only ops/dev can reach, or wrap them behind a Gate/permission check. Replays are write operations against your read models — treat them with the same care as a queue restart, not like a Filament table refresh.
Pair it with seeders and factories for onboarding. New developers get the most value when a db:seed produces a handful of aggregates with realistic multi-event histories; the plugin then doubles as living documentation of your domain events. Keep a seeder that produces one long stream (10+ events) so pagination and ordering in the UI get exercised.
Use it as your event-versioning smoke test. After bumping an event class or changing an upcaster, open the affected aggregate in the UI and confirm old events still render. This catches serialization/EventSerializer breakage faster than reading test output.
Filament 4 → 5 migration workflow. Because v1.2.0 only widens the constraint, the upgrade path is: bump filament/filament to ^5.0 in your app, run composer update, then run your own test suite plus a manual pass over the plugin's pages (tables, filters, actions, modals). The package's CI covers both majors, but your panel's other plugins and custom pages are the real risk surface — do the Filament upgrade and the package bump in the same PR so regressions are attributable.
Keep it out of the request path. Nothing here should be called from application code. If you find yourself wanting programmatic access, use your event-sourcing package's repository/projector APIs directly rather than routing through Filament pages/resources.
composer update may not move you. If your lock file already resolved against 1.1.0, run composer update albertoarena/filament-event-sourcing --with-dependencies explicitly; a bare composer update on a large app can leave the plugin pinned while everything around it shifts.php artisan optimize:clear && php artisan filament:assets before you start debugging registration logic.How can I help you explore Laravel packages today?