Axora
Axora delivers transient, named events from Laravel to browser sessions over Server-Sent Events. It is designed for UI signals such as toasts, progress updates, and notifications that tell the browser to refresh durable application state.
axora()->send('toast', [ 'type' => 'success', 'message' => 'The document was saved.',]);import { axora, initializeAxora } from "@artisan-toolbox/axora";
axora.on("toast", ({ type, message }) => { showToast(type, message);});
initializeAxora();The browser holds one native EventSource connection. A standalone asynchronous PHP daemon owns that connection, while ordinary Laravel requests publish through Redis and return immediately. Axora never keeps a PHP-FPM worker occupied by a browser stream.
Deliberately small architecture
Section titled “Deliberately small architecture”An Axora event contains only:
- a validated event name such as
toastordocument.loaded; - a JSON-serializable payload;
- the Laravel session ID that should receive it.
The complete path is:
- A normal Laravel page establishes its encrypted session cookie.
- The browser connects to the proxied Axora endpoint with that cookie.
- The daemon decrypts the cookie and indexes the connection by session ID.
axora()->send()publishes the event to Redis.- Every Axora daemon receives the publication. A daemon writes it to its connected target session or briefly retains it when no local recipient exists.
There is no separate Axora token, authentication route, WebSocket protocol, durable queue, or FPM streaming route. The daemon does not load the Laravel session store for browser connections.
Requirements
Section titled “Requirements”- PHP 8.5 or later
- Laravel 13
- Redis reachable by both Laravel and the Axora daemon
- A long-running process supervisor for
php artisan axora:start - A same-origin reverse proxy from
/_axora/connectto the private daemon - A browser with native
EventSourcesupport
Vue 3.5 or later is optional and required only for the @artisan-toolbox/axora/vue composable.
Install
Section titled “Install”Install the Composer package:
composer require artisan-toolbox/axoraRegister the Composer-installed frontend client as a local dependency in the application’s package.json:
{ "dependencies": { "@artisan-toolbox/axora": "file:vendor/artisan-toolbox/axora" }}Install frontend dependencies after Composer has populated vendor:
npm installFinally, proxy the public SSE endpoint and run the daemon:
php artisan axora:startContinue with:
- Laravel usage for sending to the current session or users;
- Browser client for TypeScript, autocomplete, and Vue;
- Configuration for every environment option;
- Server and deployment for Nginx and process supervisors;
- Troubleshooting when a connection opens but events do not arrive.
Delivery guarantees
Section titled “Delivery guarantees”Axora uses Redis Pub/Sub and native SSE, so delivery is intentionally ephemeral:
- each daemon keeps an event with no local recipient in a bounded, process-local buffer for 10 seconds by default;
- the first matching connection consumes that pending copy;
- an event is lost after its window expires, when the oldest entry is evicted for capacity, or when the daemon restarts;
send()reports target sessions published to Redis, not browser acknowledgements;- Redis does not persist or replay Axora events.
This small grace window covers the common race where send() runs milliseconds before the browser opens its stream. It is not a durable delivery guarantee. In a multi-daemon deployment, more than one process may briefly retain the same publication; the official browser client suppresses recently repeated event identifiers during its lifetime.
Keep authoritative state in the database, object storage, queues, or another durable system. Use Axora as the small real-time nudge that tells the UI something changed.
Stability
Section titled “Stability”Axora is pre-release software. Its API may change before 1.0. Review the changelog when upgrading.

