waseet/filament-activity-log
A Filament plugin that adds an activity log to your admin panel, automatically tracking model changes and user actions with a searchable timeline, diff views, and per-record history so you can audit what changed, when, and by whom. Built on spatie/laravel-activitylog.
Architecture fit. This is a thin presentation layer, not a logging engine. All actual capture is delegated to spatie/laravel-activitylog, which is mature, widely deployed, and well documented; the package under review contributes Filament resources/pages, filters, and a viewer UI on top of Spatie's activity_log table. That separation is architecturally favorable: the durable asset (the audit data and its schema) belongs to a well-maintained upstream, while the replaceable asset (the admin UI) is the small third-party dependency. If the plugin is abandoned, we lose a UI, not our audit trail.
Integration feasibility. Low effort for a team already on Filament. Expected shape: composer require waseet/filament-activity-log, register the plugin in the relevant PanelProvider, ensure Spatie's migration is published, and apply the LogsActivity trait to models we want audited. Assumes Laravel 10/11, PHP 8.1+, and Filament 3.x — these constraints must be confirmed against composer.json rather than assumed. No service-layer or data-model changes are required, which keeps the blast radius contained to one panel.
Technical risk.
waseet/* but hosted at noxoua/*, suggesting a transfer or fork. This is a supply-chain and continuity signal worth resolving before adoption (confirm the canonical repo and Packagist ownership).Key questions.
composer.json, and is there an open issue or branch for Filament v4?activity_log at scale — server-side pagination, indexed filters, or full-table loads?properties rendered verbatim? We need PII redaction and a whitelist of audited attributes before this faces non-technical staff.Stack fit. Targets the standard Laravel + Filament admin stack with Spatie activitylog v4. It is additive: no changes to existing models beyond opting into the LogsActivity trait, and no changes to our persistence layer. Teams without Filament get nothing from this package — that is the gating precondition.
Migration path. Two-track. (1) Stand up Spatie first: publish its migration, define the Activity model and morph map, and enable logging on a small set of high-value models. (2) Layer the plugin UI on top in a non-production panel. If we have pre-existing audit data in bespoke tables, plan a one-time backfill into activity_log — the plugin has no opinion on historical data. Greenfield adoption is materially cheaper than retrofitting.
Compatibility. Pin exact versions of filament/filament, spatie/laravel-activitylog, and this plugin together, and record them in a compatibility matrix. Verify: panel boots without error, resources are discovered, filters render, and the morph map resolves subject types correctly (a common silent failure). Treat Filament major upgrades as requiring an explicit plugin-compatibility check.
Sequencing.
LogsActivity on 2–3 models in staging.Fallback. Budget 1–2 engineer-days to build a minimal custom Filament resource over activity_log. This is the decisive mitigation: it converts an abandonment risk into a bounded cost, and should be scoped before commitment rather than after.
Maintenance. Small code surface to own if forked, but we inherit the maintenance obligation on Filament upgrades. Recommend vendoring/forking into our VCS at adoption time and pinning, so an upstream disappearance does not block a panel upgrade. Track upstream releases quarterly.
Support. Community-only, no SLA, no vendor. Upstream Spatie is well supported and absorbs most of the debugging burden; failures will concentrate in the UI layer and are diagnosable. Assign a named internal owner for the plugin so it does not become orphaned on our side.
Scaling. The real scaling risk is the log table, not the plugin. activity_log grows monotonically; without retention it will dominate the database. Required before production: composite indexes on (subject_type, subject_id) and (causer_type, causer_id), a date-range filter enforced in the UI, and a retention/purge job (e.g., 12–24 months, or per compliance requirement). At high volume, consider partitioning by month or pointing reads at a replica. Validate the viewer's pagination is server-side — a naive ->all() load is a production outage waiting for month six.
Failure modes.
properties visible to staff, including old/new values of sensitive fields; mitigate with $logAttributes/$logOnlyDirty, attribute exclusions, and property redaction.Ramp-up. Half a day for a developer already fluent in Filament; 1–2 days including Spatie configuration, policy wiring, and redaction rules. Documentation quality is the unknown — assume thin docs and plan for source reading on the access-control and filtering behavior.
How can I help you explore Laravel packages today?