mrpowerup/filament-sql-field
A Filament form field that adds a SQL query editor with syntax highlighting and validation, letting admins write and run raw SQL directly inside your admin panel. Note: filenames and code strings are omitted from this summary.
Architecture fit. This is a UI accelerator, not a SQL platform. mrpowerup/filament-sql-field is a Filament form field that wraps CodeMirror 5 to provide a syntax-highlighted, line-numbered SQL input with keyword/table/column autocomplete, light/dark theming matching the panel, read-only/disabled states, and standard Filament form lifecycle and validation hooks. It sits strictly in the presentation tier of an internal admin surface: saved-query libraries, ad-hoc ops/support consoles, report and metric authoring, data-quality check configuration, ETL/transformation step definitions, and SQL-backed alert rules. It provides no execution, no dialect awareness, no parameter binding, no authorization, no auditing, and no query safety. Treat it as "the text box" — every security-relevant control is a separate deliverable owned by the integrating team.
Integration feasibility. Low engineering cost for a team already on Filament: Composer install, register the field, drop it into a form schema. Release 2.0.2 explicitly claims Filament 5 support, which removes the most common near-term compatibility objection for teams standardizing on the current Filament major. The real effort is server-side and unchanged by the package: authenticating the actor, authorizing SQL actions, validating statements, executing against an approved connection, enforcing statement timeouts and row caps, tenant/row scoping, and logging every execution. A TPM should sequence the field as the last deliverable in the feature, gated behind that query service.
Technical risk. Product risk is high and sits entirely outside the package: raw SQL in an admin panel enables destructive statements, data exfiltration, runaway queries, lock contention on production primaries, and cross-tenant leakage if scoping is weak. Community risk is moderate-to-high — 18 stars, zero dependents, a single maintainer, no vendor, no SLA. The February 2026 2.0.2 release is a genuine positive maintenance signal but does not change the structural bus-factor picture. CodeMirror 5 is a legacy major version, so an eventual editor migration (CodeMirror 6 or Monaco) should be assumed and kept cheap behind the same form-field contract. Accessibility and mobile/browser-support posture of the embedded editor are unverified. Release notes are thin ("Support Filament 5," "Improving existing resources"), which is not sufficient rigor to treat as a documented upgrade path — read the diff before pinning.
Key questions.
Stack fit. Strong for Laravel + Filament admin panels, and materially better for teams on Filament 5 given the 2.0.2 claim. The intended composition is: SqlField as the editor inside a custom Filament page or resource form, plus a run action, a results table, saved-query persistence, and export controls. Pair it by default with a read-only database connection (replica), role-gated visibility, an approval flow for any write-capable path, statement timeouts, row caps, and audit logging on every execution. If the org is on an earlier Filament major, confirm support before standardizing rather than assuming it.
Migration path. Start non-production. Install and pin 2.0.2, render the field inside an actual Filament form — including inside modals and actions, where asset and lifecycle issues tend to surface — verify assets load under the real deployment model and CSP, then build a thin query service (statement validation, allow/deny lists, timeout and row-limit enforcement, connection selection, execution logging) as a separate, editor-agnostic layer. Pilot with one internal team against a read replica. Because the query service owns the contract, replacing the editor later with Monaco or CodeMirror 6 is a contained, low-risk refactor rather than a rewrite. Treat the 2.0.2 upgrade as a compatibility change to test, not as a substitute for the gateway.
Compatibility. Filament 5 support is explicitly claimed; verify the exact matrix rather than trusting the release note — PHP/Laravel constraints, Livewire version, Alpine compatibility, asset pipeline, CSP directives, and browser support. Confirm whether Filament 4 remains supported and whether existing 1.x installations can upgrade without code changes (a major bump often signals a dropped-version policy). Check that CodeMirror 5 does not collide with editor or frontend dependencies already in the admin bundle, and that read-only and disabled states behave correctly under Filament form validation and inside repeater/relationship contexts.
Sequencing.
SqlField 2.0.2 in a throwaway branch to validate compatibility, asset registration under Vite/CSP, and behavior in modals. Timebox it; escalate the key questions above if the diff is unclear.Maintenance. The component surface is small and MIT-licensed, so the downside case is vendoring or forking — a governance decision, not a technical emergency. With one maintainer and zero dependents there is no community backstop, so pin the exact version, commit the lockfile, and keep a written fork plan. Budget a small recurring allowance to track upstream releases and to read the diff on each major bump. The standing liability is CodeMirror 5: assume an editor migration is on the roadmap and size it as a bounded front-end task behind the existing form contract.
Support. No SLA, no vendor relationship, no support channel beyond GitHub issues. Tier-1 support questions will not be about the editor — they will be about query results, permissions, and timeouts, which are ours to own. Establish an internal owner (likely the platform/admin-tooling team) and an escalation path to whoever owns the query service. Document explicitly that the package renders text and does not execute, validate, or sandbox SQL, so support staff do not attribute execution failures to it.
Scaling. The field itself is a client-side editor and does not scale-dimension the system. The scaling risk is downstream and entirely ours: concurrent ad-hoc queries against the same database, unbounded result sets, long-running scans, and lock contention on shared tables. Enforce statement timeouts, row caps, and per-user concurrency limits in the query service, and point the default connection at a read replica. If usage grows, the constraint will be database capacity and the audit log's write volume — not the editor.
Failure modes.
Ramp-up. Engineering ramp is a day or two for anyone who knows Filament forms; there is essentially no learning curve on the package itself. The organizational ramp is where the time goes: reviewers of the security boundary (read-only credentials, tenant scoping, audit retention), legal/compliance sign-off on raw SQL access to production-derived data, and the internal comms that set expectations that this is an admin-only tool for technical users — not a self-serve analytics product for customers. Plan for the governance conversation to run in parallel with the engineering spike so the field is not sitting idle waiting on approvals.
How can I help you explore Laravel packages today?