PHPackages                             n-ramos/celebrimbor-filament-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. n-ramos/celebrimbor-filament-plugin

ActiveLibrary[Admin Panels](/categories/admin)

n-ramos/celebrimbor-filament-plugin
===================================

Filament 5 plugin connecting an Eloquent resource to the Celebrimbor visual page builder, with interface contracts enforcing what the model/resource must expose.

v0.1.0(yesterday)06↑2400%MITPHPPHP ^8.2

Since Jun 8Pushed yesterdayCompare

[ Source](https://github.com/n-ramos/celebrimbor-filament-plugin)[ Packagist](https://packagist.org/packages/n-ramos/celebrimbor-filament-plugin)[ RSS](/packages/n-ramos-celebrimbor-filament-plugin/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

Filament Page Builder
=====================

[](#filament-page-builder)

`n-ramos/celebrimbor-filament-plugin`

A [Filament 5](https://filamentphp.com/docs/5.x/plugins/building-a-panel-plugin)plugin that plugs the [`@n-ramos/celebrimbor`](../Celebrimbor) visual page builder into any Eloquent resource.

It follows the page builder's integration philosophy to the letter:

- blocks stay **TypeScript-only** — PHP never redefines them;
- Laravel only **stores and transports JSON**;
- the editor is the **web component**, two-way bound to Livewire.

What this package adds on top is **enforcement**: interface contracts that make the compiler/runtime refuse to mount the field unless the model exposes exactly what the editor needs.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Filament 5

No front-end build step. The plugin ships a self-contained editor bundle (vendored from [`@n-ramos/celebrimbor-embed`](https://www.npmjs.com/package/@n-ramos/celebrimbor-embed)) that defines the `` web component with the basic block library.

Installation
------------

[](#installation)

```
composer require n-ramos/celebrimbor-filament-plugin
php artisan filament:assets
```

That's it — the editor works out of the box. `filament:assets` publishes the bundled JS/CSS (versioned with the package) into `public/`.

Publish the config (optional):

```
php artisan vendor:publish --tag="celebrimbor-config"
```

### Register the plugin on your panel

[](#register-the-plugin-on-your-panel)

```
use NRamos\CelebrimborFilament\PageBuilderPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(
            PageBuilderPlugin::make()
                ->defaultPreset('marketing')
                ->assetEndpoint('/admin/page-builder/assets/pick'),
        );
}
```

### (Advanced) Bring your own bundle

[](#advanced-bring-your-own-bundle)

The default bundle ships the **basic** block library. To register custom blocks or fields, set `celebrimbor.serve_bundle` to `false` and provide your own bundle that defines `` — exactly as in the Celebrimbor docs:

```
import "@n-ramos/celebrimbor-editor-element/styles.css";
import { createBlockRegistry } from "@n-ramos/celebrimbor-core";
import { registerBasicBlocks } from "@n-ramos/celebrimbor-blocks-basic";
import { definePageBuilderElement } from "@n-ramos/celebrimbor-editor-element";

const registry = registerBasicBlocks(createBlockRegistry());

definePageBuilderElement({ registry }); // defines
```

The plugin's Livewire glue binds to whatever `` you register.

The contracts (what gets enforced)
----------------------------------

[](#the-contracts-what-gets-enforced)

### 1. The model must implement `HasPageBuilderContent`

[](#1-the-model-must-implement-haspagebuildercontent)

This is the hard requirement. The field throws `MissingPageBuilderContract` at mount time if the bound model does not implement it. The `InteractsWithPageBuilderContent` trait gives you a zero-boilerplate implementation (and auto-casts the column to `array`).

```
use NRamos\CelebrimborFilament\Concerns\InteractsWithPageBuilderContent;
use NRamos\CelebrimborFilament\Contracts\HasPageBuilderContent;
use NRamos\CelebrimborFilament\Enums\PageBuilderFormat;
use Illuminate\Database\Eloquent\Model;

class Page extends Model implements HasPageBuilderContent
{
    use InteractsWithPageBuilderContent;

    protected $fillable = ['title', 'slug', 'status', 'document'];

    // Optional overrides (these are the defaults):
    protected string $pageBuilderColumn = 'document';
    protected string $pageBuilderFormat = PageBuilderFormat::Portable->value;
}
```

Migration:

```
Schema::create('pages', function (Blueprint $table) {
    $table->id();
    $table->string('title');
    $table->string('slug')->unique();
    $table->string('status')->default('draft');
    $table->json('document');
    $table->timestamps();
});
```

### 2. (Optional) declare your blocks with `ProvidesPageBuilderBlocks`

[](#2-optional-declare-your-blocks-with-providespagebuilderblocks)

Implement it on the **model or the resource** to bind the editor to a specific preset/element without configuring the field every time:

```
use NRamos\CelebrimborFilament\Contracts\ProvidesPageBuilderBlocks;

class Page extends Model implements HasPageBuilderContent, ProvidesPageBuilderBlocks
{
    use InteractsWithPageBuilderContent;

    public function pageBuilderPreset(): string
    {
        return 'marketing';
    }

    public function pageBuilderEditorElement(): string
    {
        return 'my-page-builder';
    }
}
```

Usage in a resource form
------------------------

[](#usage-in-a-resource-form)

```
use NRamos\CelebrimborFilament\Forms\Components\PageBuilderField;
use Filament\Forms;

public static function form(Schema $schema): Schema
{
    return $schema->components([
        Forms\Components\TextInput::make('title')->required(),
        Forms\Components\TextInput::make('slug')->required(),

        PageBuilderField::make('document')
            ->columnSpanFull(),
    ]);
}
```

Per-field overrides are available when you need them:

```
PageBuilderField::make('document')
    ->format(PageBuilderFormat::Document)
    ->blocksPreset('landing')
    ->editorElement('my-page-builder')
    ->assetEndpoint('/admin/page-builder/assets/pick')
    ->assetHeaders(['X-CSRF-TOKEN' => csrf_token()])
    ->minHeight('800px')
    ->columnSpanFull();
```

Resolution order for every option: **explicit field setter → model/resource contract → panel plugin default → config file**.

How it fits together
--------------------

[](#how-it-fits-together)

```
Filament form
  └─ PageBuilderField (celebrimbor::field)
       └─
            └─    ← provided by the bundled editor (or your own)
                 ├─ emits my-page-builder:change  → updates Livewire state
                 └─ value property               ← seeded from Livewire state

```

- The field validates the **model contract** before rendering.
- `format`/`preset`/`editorElement` are resolved from the contracts/config.
- The JSON is persisted by Filament like any other `array`-cast column.
- Rendering the final page is the host front-end's job (Celebrimbor stays the single source of truth for blocks).

Asset picker
------------

[](#asset-picker)

Point `assetEndpoint` at a route returning a Celebrimbor-compatible payload:

```
{ "id": "1", "url": "https://cdn/img.jpg", "alt": "…", "width": 1200, "height": 800 }
```

Documentation
-------------

[](#documentation)

- [Installation](docs/01-installation.md)
- [Contracts](docs/02-contracts.md)
- [Configuration](docs/03-configuration.md)
- [Front-end &amp; rendering](docs/04-frontend.md)
- [Testing](docs/05-testing.md)
- [Rendering (preview &amp; public, host-owned)](docs/06-rendering.md)
- [Declaring a new block (end to end)](docs/07-blocks.md)
- [Releasing (maintainers — the npm → Composer bridge)](docs/08-releasing.md)
- [Local Laravel test (copy-paste scaffolding)](examples/laravel/README.md)

Testing
-------

[](#testing)

```
composer install
composer test
```

A Pest + Testbench suite covers the enum, the trait, the exception, the plugin config, and the field's contract enforcement and option-resolution priority. See [docs/05-testing.md](docs/05-testing.md).

License
-------

[](#license)

MIT — see [LICENSE.md](LICENSE.md).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/073baf600fe8a476ff667b4fccd359a79c0944c94c7809323a19f8e50d4a8c3e?d=identicon)[nramos](/maintainers/nramos)

---

Tags

laravelfilamentfilament-pluginpage buildercelebrimbor

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/n-ramos-celebrimbor-filament-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/n-ramos-celebrimbor-filament-plugin/health.svg)](https://phpackages.com/packages/n-ramos-celebrimbor-filament-plugin)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[spatie/laravel-health

Monitor the health of a Laravel application

87311.3M149](/packages/spatie-laravel-health)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

264298.4k8](/packages/croustibat-filament-jobs-monitor)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2210.5k](/packages/mradder-filament-logger)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17758.9k2](/packages/stephenjude-filament-jetstream)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

324.9k1](/packages/caresome-filament-neobrutalism-theme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
