darvis/livewire-flux-editor-filemanager
A Livewire Flux editor file manager package for Laravel. Browse, upload, and manage files through a clean interface, and integrate file selection into Flux-powered editors. A simple way to add media handling to Livewire applications.
Architecture fit. This is not an editor — it is a composition layer that wires Laravel Filemanager into the Flux Pro flux:editor toolbar and registers a small set of Tiptap extensions (Image and Link, extended with class/style/data-align, plus Flux's bundled table extensions). That means the package only pays off inside a three-party coupling: Laravel + Livewire, Flux Pro (commercial, minimum 2.15.1 for the table toolbar), and Laravel Filemanager as the media backend. If the application is not on Flux Pro, or is unwilling to adopt Filemanager's folder/permission/retention model, this package delivers nothing. That is a platform gate, not a technical detail.
Integration feasibility. Low install cost, real verification cost. Three commands (composer require, flux-filemanager:install, flux-filemanager:check) get a working editor, and the install command doubles as a codemod that patches the existing app.js setup block. The credible claim from the product assessment — 1–2 weeks as an alternative to roughly a quarter of custom glue work — holds only if we budget the verification work: round-trip smoke test (insert → style → save → reload → getHTML()), sanitizer review, and per-preset extension audits. The check command and the mirrored checklist page are the durable reason to adopt over copy-pasting Flux docs.
Technical risk. The dominant risk is not code quality; it is dependency surface.
| Risk | Severity | Mitigation |
|---|---|---|
| Single maintainer, 4 stars, 0 dependents | Medium | MIT + small readable surface keeps exit cost low; adopt on non-critical surface first; document the vendored JS/CSS contract in-house |
| Hard Flux Pro 2.15.1 floor for tables | High | De facto compatibility break inside a minor release; treat "do we track Flux Pro releases?" as an explicit roadmap line item |
app.js setup block is a live contract |
High | Namespace import plus ?. calls are deliberate degradation; forbid "tidying" into named imports; version the block |
Installer is a codemod on our app.js |
Medium | Review the diff on every run; let check arbitrate; assume duplicate lines on heavily customized files |
Chained CSS (tiptap-table.css imported by tiptap-image.css) |
Medium | Never override or skip the image stylesheet; scope-check table rules so they don't leak onto app <table>s |
| HTML source modal drops unregistered tags/attributes | High (data integrity) | Write "what survives edit-and-save" as a requirement; audit colspan/rowspan/style/class; regression tests on any ingestion path |
| Default base64 image path | Medium | Set drag_drop.method = upload for anything persisted |
| Table authoring gaps (cell backgrounds, column widths, reorder, alignment, Word/Sheets paste) | Medium | Treat as explicit out-of-scope or funded custom work |
Key questions for the team before committing.
full preset and the 2.15.1 floor), or is minimal bold/link sufficient for the first surface?Stack fit gate. Confirm all of: Laravel, Livewire, Flux Pro (version recorded), and flux:editor already used in forms. Outside that stack, stop. If Filemanager is not already present, sequence the Filemanager decision as its own approval — it brings folders, permissions, upload limits, and retention into scope and will be reviewed as a platform decision regardless of this package.
Migration path. There is no data migration in the package itself; the migration is content-model and configuration. Two configuration decisions must be made once, per editor instance, and written down:
upload for persisted content, base64 only for prototypes (base64 bloats both the DB column and the HTML source).full for CMS and marketing pages. Tables ship in full only. One codebase, several flux:editor configurations — but verifying each preset's extension set becomes our job.Sequencing. Keep each step its own PR so failures are attributable:
composer require + flux-filemanager:install, with the app.js diff reviewed line by line.flux-filemanager:check clean; add it to CI so a missing extension can't ship as a silently disabled button.?type=Images → window.SetUrl → <img class="tiptap-image"> → resize/alt → save → reload → confirm getHTML() fidelity.full preset to CMS/marketing; author enablement and the debug runbook.Compatibility notes to carry forward.
document, keyed off the closest ui-editor's editor property. If buttons die after a Livewire update, suspect extension re-registration on the new instance, not the listener vanishing.hr, code-block, or table-* in app.js. Flux's own toolbar handler owns those clicks; a second handler runs every command twice.resize_presets, published translations, package views) rather than editing command handling.Effort and ownership (indicative).
| Workstream | Effort | Owner |
|---|---|---|
Flux bump + package install + app.js patch |
1–2 days | Laravel dev |
| Round-trip + sanitizer verification, CI gate | 3–5 days | Laravel dev + QA |
| Filemanager policy review (if newly adopted) | Platform review cycle | Platform/security |
| Localization | 1–2 days per locale | Dev + content |
| Runbook + author enablement | 1 day | TPM + support |
Maintenance. The recurring cost is not the package code; it is tracking Flux Pro releases against a hard 2.15.1 floor, and re-running flux-filemanager:check after every Flux or package upgrade. Two artifacts must live in-house and be treated as versioned interfaces: the vendored app.js/CSS import contract (namespace import, optional chaining preserved, CSS chain intact) and the installer's expected app.js diff. Budget this as a standing roadmap line item with a named owner — an unowned upgrade cadence is how this integration silently degrades.
Support. The package's weakest operational trait is that a disabled table button explains itself only in the browser console. Content editors will not open DevTools; they will file "the table button is broken." If table authoring matters, surface the missing-extension state in our own admin UI, and publish the debug sequence as the first-line support script:
flux-filemanager:check → checklist page → app.js import/registration → browser console (extension names, explicit table message) → editor.getHTML()
That ordering resolves nearly every "button does nothing" ticket without an engineering escalation.
Scaling and cost. Media growth is governed by Filemanager, not this package: disk choice, upload limits, resize_presets, and cleanup policy are the levers. Two scaling traps to close early — base64 images inflating a content column, and unmanaged Filemanager storage with no retention policy. Image optimization/CDN delivery is out of scope and should be assumed as separate work if the CMS surface grows traffic.
Failure modes and first response.
| Symptom | Likely cause | First check |
|---|---|---|
| Toolbar button does nothing | app.js listener/registration missing or patched incorrectly |
flux-filemanager:check, then the setup block |
| Table button disabled | Flux Pro below 2.15.1, or table extensions not enabled | Flux version; console message |
| Table styling disappears (cell margins return, headers centre) | Image stylesheet skipped or overridden, breaking the chained CSS import | Import chain in app.js |
| A command fires twice | Our own handler added for hr, code-block, or table-* |
app.js for duplicate handlers |
| Content lost after an HTML-source edit | Tag/attribute has no registered extension and was dropped | The modal's drop list; sanitizer tests |
| Buttons die after a Livewire update | Element no longer resolves to an editor, or extensions not re-registered |
Delegation target and instance state |
| DB column or HTML payload bloat | drag_drop.method still base64 |
Config |
Ramp-up. A Laravel developer is productive on day one; the learning curve is the contract, not the API. Onboarding should cover: the four files to read in order (app.js, the checklist page, config/flux-filemanager.php, lang/), the preset tiers, the image strategy decision, and the rule that HTML is stored verbatim and every path touching it is a round-trip risk. Treat adoption as an upgrade plus a validation step rather than an engineering project — and keep the package off the critical path to any release until it has survived at least one Flux Pro upgrade cycle in production.
How can I help you explore Laravel packages today?