Installation
system-x installs into an existing Laravel app as a single Composer package. It ships a pre-built client bundle (JS, CSS and fonts, with the websocket client included), served by the package itself. There's no npm install and no frontend build on your side. You require the package, migrate, and wire one route.
Prerequisites
Two things the package can't set up for you:
- Auth. A
userstable and a workingauthguard. system-x is a library, not an auth system; you own login. Every desktop is keyed to a signed-in user. - Broadcasting. A running Reverb (or Pusher) server with
BROADCAST_CONNECTION=reverband theREVERB_*env values set. Rendered trees come down over the websocket, so without it the desktop paints once and then never updates. That failure mode is quiet and confusing, so if clicks don't repaint, check Reverb first.
One Reverb gotcha worth knowing up front: when self-hosting, Reverb only accepts websocket connections from origins it recognises. system-x defaults the allowed origin to the host in your APP_URL, which usually just works. If your page is served from a different host, set REVERB_ALLOWED_ORIGINS (comma separated) to the page host or the handshake fails silently.
Also: don't route the package's system-x.css through your own Tailwind or PostCSS pipeline. It's pre-built and served as is.
Require the package
composer require system-x/coreThe service provider auto-discovers. No manual registration.
Migrate
php artisan migrateThe package loads its own migrations, which create the tables for per-user state, open windows, preferences and the audit trail. Nothing to copy or publish.
Wire the desktop route
Desktop::render() returns a complete page, assets and runtime config included. One route behind auth is the whole integration:
use Illuminate\Http\Request;
use SystemX\Core\Support\Desktop;
Route::get('/', fn (Request $request, Desktop $desktop) => $desktop->render($request))
->middleware('auth');No layout work needed for the basic case. The served bundle reads your Reverb connection from config('broadcasting.connections.reverb') at runtime, so as long as your broadcasting config is right, the client dials the right place.
Optional publishes
php artisan vendor:publish --tag=system-x-config
php artisan vendor:publish --tag=system-x-views
php artisan vendor:publish --tag=system-x-assetsConfig gives you config/system-x.php (the logout URL). Views let you fork the desktop and greeter blades. Assets let you serve the client bundle from your own webserver or CDN instead of through the package route.
For a themed login screen, render the system-x::greeter view and wire your own login POST underneath it. The greeter remembers a returning user's theme and email through a cosmetic cookie that carries no credential.
Verify it
Log in and hit the desktop route. You should get the X11-style desktop: the panel, the launcher, and the seeded Hello and Notes windows on first boot.
Then confirm the live path: click the button in the Hello window. The counter should update without a reload, because the new count arrives over the websocket rather than in the click's HTTP response. If the desktop renders but the count never moves, broadcasting isn't wired up; go back to the prerequisites.
From here, build your first app.