Skip to content

1.9.0

Choose a tag to compare

@ntoufoudis ntoufoudis released this 25 May 08:49
· 146 commits to main since this release
3ca0e1a

What's Changed

This release adds an optional web interface for browsing the audit ledger directly from your Laravel application. The UI is disabled by default and has no impact on applications that do not opt in. No breaking changes. No migration required.


Enabling the UI

Set CHRONICLE_UI_ENABLED=true in your .env (or publish the config and set chronicle.ui.enabled directly). Routes are only registered when the UI is enabled — there is no middleware overhead for applications that leave it off.

CHRONICLE_UI_ENABLED=true

Publish the Blade views if you want to customize them:

php artisan vendor:publish --tag=chronicle-views

Entry index

GET /chronicle — paginated list of all audit entries.

Filter by any combination of action, actor ID, subject type, subject ID, tag, and date range. Sort ascending or descending by entry ID. Pagination page size is configurable via CHRONICLE_UI_PER_PAGE (default 25).


Entry detail

GET /chronicle/entries/{id} — full view of a single entry.

Shows actor, subject, action, payload, tags, correlation ID, hash chain values (payload hash and chain hash), and the linked checkpoint record when present.


Stats

GET /chronicle/stats — aggregate overview of the ledger.

  • Total entry count, oldest and newest entry timestamps
  • Total checkpoint count
  • Top 10 actions by frequency
  • 30-day daily activity chart

Configuration

// config/chronicle.php
'ui' => [
    'enabled' => env('CHRONICLE_UI_ENABLED', false),
    'prefix' => env('CHRONICLE_UI_PREFIX', 'chronicle'),
    'middleware' => ['web', 'auth'],
    'per_page' => env('CHRONICLE_UI_PER_PAGE', 25),
],
Key Env var Default Description
ui.enabled CHRONICLE_UI_ENABLED false Registers routes and enables the UI
ui.prefix CHRONICLE_UI_PREFIX 'chronicle' URL prefix for all UI routes
ui.middleware ['web', 'auth'] Middleware applied to all UI routes
ui.per_page CHRONICLE_UI_PER_PAGE 25 Entry index pagination size

Note

ui.middleware defaults to ['web', 'auth'], which means unauthenticated requests are redirected to your application's login route. Replace or extend this array in config/chronicle.php to suit your own authorization model.


Named routes

Name Url
chronicle.entries.index /{prefix}
chronicle.entries.show /{prefix}/entries/{id}
chronicle.stats /{prefix}/stats

Full Changelog: 1.8.1...1.9.0