whitedigital-eu/audit-service
A Laravel package for adding audit trails to your application. Track model changes, user actions, and custom events with configurable storage, straightforward integration, and a clean API for reviewing activity history.
Architecture fit
whitedigital-eu/audit-service is a Laravel package that owns an audit/event-log entity and ships its own migrations — the classic "drop-in cross-cutting concern" shape: service provider registration, config publish, migration publish, and an internal model/repository that other application code calls to record audit events. Architecturally this fits well as a supporting bounded context in a Laravel monolith or modular monolith, provided the application treats the audit store as append-only and does not couple domain logic to the package's Eloquent models.
The 0.7.2 change — retargeting the audit entity schema to the whitedigital namespace and supplying a migration — signals that the package owns table/model naming conventions that were previously different (likely a generic or application-derived name). That is a positive direction for package hygiene (vendor-namespaced tables avoid collisions) but it converts table identity into a public contract that downstream code, reporting, and BI tooling may already depend on.
Integration feasibility
Feasible for a standard Laravel app: composer require, publish config/migrations, run php artisan migrate. The presence of a shipped migration means the vendor is treating existing installations as first-class, which is the right call. PR #35 ("improve migration for nonexistent scenarios") explicitly hardens the fresh-install / partially-migrated case, indicating the first cut of the migration did not handle the absence of the legacy table gracefully — a real-world signal that upgrade paths are still being shaken out rather than proven.
The critical unknown is whether 0.7.2 is a rename (table dropped/recreated or RENAME TABLE), a new table plus backfill, or a namespace-only change to models with the physical table untouched. Each has a very different blast radius.
Technical risk
RENAME is metadata-only and cheap; a copy-and-backfill is not, and will hold locks and consume I/O on production.down() that recreates the old table but loses rows written after cutover is a data-integrity hazard in a compliance-adjacent dataset.Key questions
whitedigital_* and copy data? Is there a backfill, and is it chunked?down() behavior, and is it data-preserving?Stack fit
Standard Laravel/Lumen-compatible service provider + migrations + Eloquent model. Low friction: no queue/worker, no external service, no new infrastructure. Fits any Laravel 9/10/11 application as a persistence-layer dependency. Verify PHP and Laravel version constraints in composer.json before committing, since 0.x packages often trail framework majors.
Migration path
0.7.2 — do not use a floating ^0.7 constraint while the vendor is still renaming schema.SHOW CREATE TABLE output before/after.Compatibility Additive within the app — no framework upgrade implied. The compatibility surface is downstream SQL and any serialized audit references (e.g., foreign keys from other tables pointing at the audit table; if any exist, a rename will break them unless the migration handles them). Check for foreign keys explicitly.
Sequencing Pin → inspect migration → inventory consumers → staging rehearsal → decide strategy → notify compliance/security stakeholders if audit data is in regulatory scope → deploy during a controlled window → verify row counts and application behavior → update docs → remove any legacy compatibility shims once parity is confirmed.
Maintenance Ongoing cost is low at the code level (small surface, no runtime infrastructure) but non-trivial at the release-tracking level: a 0.x package that renames schema is a package you must read the diff of before bumping. Budget for a review step on every version increment until 1.0. Treat the composer constraint as a governance control, not a convenience.
Support
Upstream support appears to be a small maintainer group (@raraworks on both PRs), with fast follow-up fixes — good responsiveness, but also a bus-factor and maturity signal. No visible evidence of a formal deprecation policy. For an audit subsystem this matters: the package is likely to be in the critical path for compliance evidence, and vendor abandonment would be disruptive. Mitigation: keep the integration thin so the package is replaceable, and ensure the application can read audit records through its own abstraction rather than directly via the package's models.
Scaling Audit tables grow monotonically and are write-heavy. The package's scaling characteristics are really the database's: index choices on the audit entity, write amplification, and whether writes are synchronous in the request path. If the package writes synchronously, high-throughput endpoints will pay the cost; confirm whether queueing/async is supported and whether failed audit writes can block business transactions. The schema rename itself does not change scaling, but a backfill migration on a large table is a one-time scaling event that must be planned for (chunking, off-peak window, replica lag monitoring).
Failure modes
down() restores structure but not rows; rollback after cutover means permanent loss of post-cutover audit records.Ramp-up Low engineering ramp-up — a Laravel developer is productive in under a day; the API is a thin persistence wrapper. The real ramp-up is organizational: getting security/compliance/audit stakeholders to accept a schema change to the audit store, and getting whoever owns the BI/reporting layer to update their queries. Plan for a short engineering task and a longer coordination task. Add the table-name change to the internal schema changelog and to any data-lineage documentation.
How can I help you explore Laravel packages today?