wotz/filament-live-preview
Filament Live Preview brings real-time previewing to Filament forms and resources, letting editors see changes as they type before saving. Easy to install and configure, it helps content teams catch layout and copy issues early, cutting down on publish-time surprises.
Architecture fit. The package targets the Filament plugin contract: a service provider registered against a panel, plus a Livewire-facing action that captures the current form state and hands it to a preview renderer. That is a good structural fit only when the public site is rendered by the same Laravel application that hosts the panel and the previewable content is an Eloquent model bound to a Filament Resource. It is a poor fit for decoupled/headless front ends (Next.js, Nuxt, a separate API consumer), for content whose rendering depends on more than the form exposes (page-builder blocks stored relationally, search-index-backed listings, computed aggregates), or for panels where editors work on drafts that go through a separate editorial workflow.
Integration feasibility. The plugin itself is likely a small surface area — register, add an action, expose a preview route. The real work sits in the host application: making front-end templates tolerate draft state (nulls where the published record always has values, unpublished media, missing relations, draft-only slugs), and securing the preview transport. Feasible in a sprint for one resource; the effort scales with the number of templates and the fragility of the front end, not with the plugin.
Technical risk. High, and concentrated in two places. First, maturity: zero stars, zero dependents, a single maintainer, no production evidence — you would be the first real user, which means you absorb the discovery cost. Second, coupling: any plugin that serializes Filament/Livewire form state is bound to internals that shift across Filament majors (v3→v4 was not a trivial upgrade) and Livewire majors. A preview feature is also a security surface — unsaved field data crosses a request boundary, so the transport must be signed, time-boxed, and authorization-checked against the editing user, and the preview route must be noindex and excluded from caches and CDNs. Unsaved file uploads are a known sharp edge: they live in livewire-tmp and are garbage-collected, so preview images can 404 or, worse, be publicly reachable.
Key questions.
composer.json constraints?Stack fit. Laravel 10–12, PHP 8.1+, Filament v3/v4, Livewire 3, with a Blade or Livewire-rendered public front end in the same codebase. Confirm each constraint before committing; do not assume v4 support from the README alone.
Migration path. Purely additive: no schema changes, no data migration, no backfill. The only persistent artefact is a preview route and its middleware. That makes the rollback story cheap — remove the plugin registration and the route, and the panel returns to its prior behaviour.
Compatibility. Two checks beyond versions: (1) whether the plugin overrides Filament views or assets in a way that collides with other panel plugins already installed, and (2) whether the preview route's URI pattern can be shadowed by, or shadow, existing wildcard/slug routes. Run it against a copy of the real panel, not a fresh install.
Sequencing.
noindex, cache-control headers, exclusion from CDN rules.Maintenance. Assume you will vendor or fork within a year. Budget roughly one to two days per Filament major upgrade to re-verify form-state serialization, and treat every Filament minor as a candidate for silent breakage. Pin the plugin version explicitly.
Support. Effectively none. A solo maintainer with zero dependents means no community answers, no Stack Overflow corpus, and no SLA. Internal ownership must be named before adoption; if no one will own it, don't take the dependency.
Scaling. Preview traffic is editor-scale, not visitor-scale — a handful of concurrent requests. The constraint is weight per request: full page renders that bypass caches. Rate-limit the preview route, keep it off the CDN, and ensure preview responses never enter a shared cache. Cost is negligible; the risk is cache pollution, not load.
Failure modes. Leaked or guessed preview URLs exposing unpublished content; stale previews after a related model changes; broken media from expired temporary uploads; route collisions; preview responses cached and served to anonymous visitors; preview URLs indexed by search engines. Each maps to a concrete mitigation above — signing with TTL, noindex, cache-control, route ordering, and a pre-flight checklist.
Ramp-up. Hours for a Laravel developer to wire up the happy path; days to make the front end genuinely draft-safe. The learning curve is in your own templates, not in the package. Document the preview route and its security posture in the runbook so it survives staff turnover.
How can I help you explore Laravel packages today?