nexus-cms/filament

This package is abandoned and no longer maintained. The author suggests using the nexus-cms/laravel package instead.

Headless Laravel content store for Nexus CMS: REST API, edit-mode tokens, versioning, and force-update. No Filament dependency.

Maintainers

Package info

github.com/forged-tools/backend

Homepage

Documentation

pkg:composer/nexus-cms/filament

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-08-09 13:54 UTC

This package is auto-updated.

Last update: 2026-08-09 14:03:01 UTC


README

Headless Laravel content store for Nexus CMS.

It is the content store, the REST API the Next.js client talks to, the edit-mode token mint, and it manages versions and force-update.

Visual editing happens in the in-context overlay on the frontend. This package has no Filament dependency — drop it into any Laravel app and wire your own auth for token minting.

Docs: https://nexus.mkiteg.com/docs/laravel
Frontend packages: npm install nexus-cms

Migration: nexus-cms/filament is deprecated. Use nexus-cms/laravel.

Install

composer require nexus-cms/laravel
php artisan vendor:publish --tag="nexus-cms-migrations"
php artisan migrate
php artisan vendor:publish --tag="nexus-cms-config"

The service provider auto-registers. Import the schema produced by nexus generate:

php artisan nexus:import-schema .nexus/cms-schema.json

REST API

Mounted at config('nexus-cms.route_prefix') (default api/nexus):

Method Path Auth Purpose
GET /schema public The cms-schema.json
GET /content/{page} public (published) / token (draft) Content document
POST /tokens host-app auth (token_middleware) Mint edit-mode token (+ optional redirect)
PUT /content/{page}/override Nexus token Save one region override
DELETE /content/{page}/override Nexus token Revert one region (?regionId=)
PUT /content/{page}/overrides Nexus token Replace full override map
PUT /content/{page}/seo Nexus token Save draft SEO
POST /content/{page}/publish Nexus token Publish draft, create version, force-update
GET /content/{page}/versions public Version history
GET /content/{page}/versions/{id} public A version snapshot
POST /content/{page}/versions/{id}/restore Nexus token Roll back (?publish=0 = draft only)
POST /media Nexus token Upload an image
GET /media public Media library

{page} is the encoded route: /_root, /a/ba~b (matches the Next.js client).

Mint an edit token

curl -X POST "$API/api/nexus/tokens" \
  -H "Authorization: Bearer $SANCTUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"page":"/"}'

Response:

{
  "token": "",
  "editUrl": "https://yoursite.com/api/nexus/edit?token=…&to=/",
  "expiresAt": "",
  "page": "/"
}

Pass "redirect": true to redirect the browser into editUrl instead of JSON. Configure mint auth with NEXUS_TOKEN_MIDDLEWARE (default auth:sanctum).

Handshake + force update

  • Open editor — your admin calls POST /tokens, then sends the user to editUrl (or opens it). The Next app exchanges the Nexus token with createHttpAdapter.
  • Publish / Force update — POSTs to FRONTEND_URL/api/nexus/revalidate with the webhook secret so the page is revalidated instantly.

Key env

NEXUS_FRONTEND_URL=https://yoursite.com
NEXUS_WEBHOOK_SECRET=change-me
NEXUS_SCHEMA_PATH=/path/to/.nexus/cms-schema.json
NEXUS_MEDIA_DISK=public
NEXUS_TOKEN_MIDDLEWARE=auth:sanctum

Development

composer install
./vendor/bin/phpunit