digital-creative/nova-json-wrapper
A Laravel Nova field wrapper for editing and displaying JSON columns with familiar Nova form fields, making structured or nested JSON data easier to manage directly from the admin panel.
Architecture fit
The package is a Nova field composition wrapper: it nests child Nova fields and, instead of persisting each to its own column, serializes their values into a single JSON attribute on the parent model. Architecturally it hooks the Nova Field lifecycle (fill, resolve, hydrate, fillAttributeFromRequest) and proxies the inner fields' state.
WHERE, ORDER BY, aggregates, unique constraints, foreign keys, or Nova filtering/sorting. Once a field is inside the wrapper it becomes opaque to the query builder and to Nova's searchable/sortable field traits.Integration feasibility
composer require + register the field in a Nova resource. No service provider gymnastics, no infra change.Technical risk (ranked)
rules(), required, and sometimes to inner fields, you get a silent validation bypass on writes. This is the highest-severity issue because it fails open.PATCH. Partial updates can null out sibling keys or clobber concurrent edits.dependsOn conditionals inside the wrapper are where composition wrappers historically break.Key questions to answer before committing
rules()/required/nullable to child fields? Prove it with a failing-request test.File, BelongsTo, and dependsOn children handled?Stack fit Assumes Laravel + a licensed Nova install. It is a pure admin-panel concern — it does not change API shape, model events, or queue behavior, which keeps blast radius small. That is the main argument in its favor: the failure modes are confined to Nova CRUD.
Migration path
json column; do not drop legacy columns in the same deploy.*Beta resource.Compatibility
composer.json; add a CI check that a Nova/Laravel bump cannot silently upgrade it.jsonb with GIN indexes is materially better than MySQL JSON here, which needs generated columns for any indexed access.Sequencing (roughly 3–4 weeks, one developer)
Decision recommendation: adopt only for a bounded, low-cardinality document on a non-critical admin surface, and only with a forked copy. Do not use it for anything the business reports on, and do not use it as a shortcut to avoid schema design — that debt compounds at the reporting layer, not in Nova.
Maintenance Treat as unmaintained. Last release 2021-02-11, 12 stars, 0 dependents, no evidence of a maintainer response SLA. Plan for: annual review against Nova majors, a named internal owner, and a fork you can patch in hours rather than waiting on upstream. Cost is low but non-zero and permanent — budget it explicitly or the first Nova upgrade becomes an unplanned outage.
Support No vendor, no meaningful community mass, no issue-tracker signal you can rely on. Support is entirely internal: runbook, owner, and a documented fork diff so future maintainers know what was changed and why.
Scaling
JSON needs generated columns plus indexes for any filtered path — meaning the "flexible schema" benefit evaporates the moment you need to query it. PostgreSQL jsonb + GIN is the viable path.updated_at check) or you will silently lose data.Failure modes to monitor
File child is removed inside the wrapper.Ramp-up Low for anyone fluent in Nova (a few hours to a working field). The genuinely non-obvious part is the field lifecycle and the fork-ownership model — budget 2–3 days for one engineer to become the internal authority, and write it down. Broader team onboarding is a half-day with a working example.
Net TPM read: small blast radius, trivially reversible, but a dead upstream and a validation story that must be proven rather than assumed. Approve as a scoped, forked, feature-flagged experiment on a non-reporting admin surface; reject as a general-purpose schema-shortcut across core entities.
How can I help you explore Laravel packages today?