kg-bot / hookbox-ui-core
Backend-only UI core for Hookbox inbox and replay surfaces.
Requires
- php: ^8.2
- ext-json: *
- illuminate/auth: ^12.0 || ^13.0
- illuminate/config: ^12.0 || ^13.0
- illuminate/contracts: ^12.0 || ^13.0
- illuminate/http: ^12.0 || ^13.0
- illuminate/pagination: ^12.0 || ^13.0
- illuminate/routing: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
- illuminate/validation: ^12.0 || ^13.0
- kg-bot/hookbox: ^1.0
Requires (Dev)
- larastan/larastan: ^2.11 || ^3.0
- laravel/framework: ^12.0 || ^13.0
- laravel/pint: ^1.17
- orchestra/testbench: ^10.0 || ^11.0
- phpstan/phpstan: ^1.12.17 || ^2.1.44
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.5
README
Hookbox UI Core is the shared backend-only package for Hookbox inbox and replay experiences. It is JSON-first by default through the responder contract and does not render framework-specific UI.
Support
Hookbox UI Core supports Laravel 12 and 13 on PHP 8.2+.
What It Provides
Laravel apps that want a Hookbox inbox still need the same backend concerns over and over: request parsing, authorization, pagination defaults, normalized page data, and safe replay orchestration. Hookbox UI Core packages those concerns into a headless backend layer so Blade, Livewire, Filament, Vue, or other adapters can share one stable UI-core surface instead of rebuilding it per stack.
The package currently provides:
- route registration for inbox, message detail, and replay endpoints
- inbox query parsing and pagination defaults
- authorization checks for inbox access, replay, and redacted payload visibility
- normalized inbox and message-detail view models
- JSON responses by default via
Hookbox\UiCore\Contracts\HookboxUiResponder - replay orchestration that defaults to dry-run behavior
Dependencies
hookbox-ui-core depends on kg-bot/hookbox for the stable read and replay contract. UI Core sits on top of that package and does not read Hookbox internal models, receipts, jobs, queued handlers, or other implementation details directly.
Supported integration surface:
Hookbox\Repositories\MessageRepositoryHookbox\Repositories\SourceRepositoryHookbox\ReplayServiceHookbox\ReplayOptionsHookbox\Repositories\MessageFiltersHookbox\Repositories\MetricsRangeHookbox\Views\WebhookMessageViewHookbox\Views\WebhookAttemptViewHookbox\Views\SourceViewHookbox\Views\MetricsSummaryHookbox\Views\SourceCounters
Installation
This package depends on the published kg-bot/hookbox Composer package.
To install dependencies for local development in this repository, run:
composer install
For a release install in a consuming Laravel application, require UI Core. Composer will install its kg-bot/hookbox dependency automatically:
composer require kg-bot/hookbox-ui-core
If you need to override package defaults, publish the config with:
php artisan vendor:publish --tag=hookbox-ui-config
Additional installation details are documented in docs/installation.md.
Default Routes
When hookbox-ui.enabled is true, the package registers these routes under hookbox-ui.route_prefix, which defaults to hookbox:
GET /hookbox/messagesGET /hookbox/messages/{message}POST /hookbox/messages/{message}/replay
Default config keys:
enabledroute_prefixmiddlewarepagination.per_pagereplay.allow_live
Authorization
The package expects these Laravel abilities to exist:
viewHookboxInboxreplayHookboxMessageviewRedactedPayload
viewHookboxInbox gates the inbox and message detail endpoints. replayHookboxMessage gates replay requests. viewRedactedPayload is exposed in the JSON page payload so adapters can decide whether to show redacted content affordances.
Replay Safety Defaults
Replay stays dry-run by default.
- Message details expose
defaultsToDryRun: true - The replay endpoint only performs a live replay when the request explicitly sends
live_replay=true - Live replay still requires
hookbox-ui.replay.allow_liveto be enabled
Out Of Scope
This repository is intentionally backend-only. It does not render Blade, Livewire, Inertia, Vue, Filament, or any other framework-specific interface.
Adapter packages are intentionally out of scope for this repository. Future UI packages should consume UI Core rather than reimplementing Hookbox inbox and replay business rules.