Filament backend
The Laravel/Filament content store and REST API.
The nexus-cms/filament package is the MVP backend: a content store, the REST
API the Next.js client talks to, the edit-mode handshake entry point, versions
and the force-update webhook.
Install
composer require nexus-cms/filament
php artisan vendor:publish --tag="nexus-cms-migrations"
php artisan migrate
php artisan vendor:publish --tag="nexus-cms-config"Register the plugin in your panel provider:
use NexusCms\Filament\NexusCmsPlugin;
$panel->plugin(NexusCmsPlugin::make());Import the schema produced by nexus generate:
php artisan nexus:import-schema .nexus/cms-schema.jsonREST API
Mounted at config('nexus-cms.route_prefix') (default api/nexus):
| Method | Path | Purpose |
|---|---|---|
| GET | /schema | The schema |
| GET | /content/{page} | Content document (published, or draft with a token) |
| PUT | /content/{page}/override | Save one region override |
| DELETE | /content/{page}/override?regionId= | Revert one region to code default |
| PUT | /content/{page}/overrides | Replace the full override map |
| PUT | /content/{page}/seo | Save draft SEO (title, ogImage, …) |
| POST | /content/{page}/publish | Publish + snapshot + force-update |
| GET | /content/{page}/versions | History |
| POST | /content/{page}/versions/{id}/restore | Roll back (?publish=0 = draft only) |
| POST | /media | Upload an image (OG images use this too) |
{page} is the encoded route: / → _root, /a/b → a~b.
Management
In Filament you get a Pages resource (open the editor, force update) and a read-only Versions resource (restore any snapshot). The heavy editing happens in the in-context overlay on the frontend; Filament is the management layer and access point.