media24si/nova-youtube-field
A Laravel Nova field for attaching YouTube videos to your resources. It offers a searchable picker for YouTube URLs or video IDs, displays a thumbnail preview in the form, and saves the selected video so you can easily embed it in your application's frontend.
Architecture fit. This is a Laravel Nova field package: a PHP Field subclass plus a compiled Vue component that renders inside Nova's admin SPA. Its blast radius is therefore limited to the Nova control panel — it has no place in public-facing request paths, APIs, or queue workers. Fit is only positive if the target application already runs Nova (a paid add-on) and editors need to capture YouTube references. It is not a media-processing library; it stores and displays a reference, nothing more.
Integration feasibility. Installation is the standard composer require + register-the-field-in-a-Resource flow, but that is where the simplicity ends. The last release is September 2018, which places it in the Nova 1.x/2.x and Vue 2 era. Nova 4 moved to Vue 3 and changed component/asset registration; Nova 5 tightened tooling further. The PHP side (URL parsing, validation, thumbnail URL construction) is version-agnostic and will almost certainly still run; the Vue side is the likely break point. Expect a "works in principle, fails at asset compile or field boot" outcome.
Technical risk. Ranked: (1) version incompatibility with the installed Nova major — high probability, cheap to detect in a spike; (2) archived status — no fixes, no CVE response, no upstream PRs, so every defect becomes ours; (3) bus factor of one, with 24 stars indicating a near-single-tenant package (media24si is the publisher's own tooling); (4) minor privacy/CSP considerations if the field renders an embedded iframe rather than just a thumbnail, which can leak editor traffic to Google or be blocked by a strict frame-src policy. Security surface is otherwise near-zero — it is an admin-only form widget with no elevated privileges. MIT licensing removes all legal friction and makes forking or inlining explicitly permissible.
Key questions. Which Nova major version is actually deployed? Does the field persist the raw URL, the extracted video ID, or both — and does the consuming application need the ID programmatically? Is the preview a thumbnail image or a live embed (CSP/consent implications)? Can we accept "we own the code forever" as the operating model? Is the field's value ever read outside Nova (API responses, front-end templates) in which case normalization matters more than the widget?
Stack fit. The package targets Laravel ~5.7 with Nova 1.x/2.x and a Vue 2 asset pipeline. Against a modern Laravel 10/11 + Nova 4/5 stack it is effectively a different runtime. Treat the PHP logic as reusable reference material and the front-end as non-transferable.
Migration path. Two viable routes, in ascending cost:
Text field for the URL, plus a Rule for YouTube URL validation, an accessor/mutator to normalize to a canonical video ID, and a computed thumbnail attribute surfaced via ->displayUsing() or a small Stack field. This eliminates all Vue compilation, all asset publishing, and all Nova-major coupling — roughly a day of work for a mid-level Laravel developer.Compatibility. Validate five axes before any code is written: Nova major, Laravel major, PHP version, Node/npm version for the front-end build, and whether the app publishes Nova assets at deploy time or serves them from a CDN. Any mismatch on the first or fifth axis invalidates the package as shipped.
Sequencing. (1) Time-boxed spike on a branch confirming whether the field boots on the target Nova version; (2) decide reimplement vs. fork on that evidence; (3) implement with tests around URL parsing and ID normalization — the only genuinely testable logic; (4) ship behind a feature flag to a single Resource for one release cycle; (5) roll out to remaining Resources once editors confirm parity.
Maintenance. Adoption equals ownership. Archived repositories receive no dependency bumps, no Nova-version compatibility work, and no security triage. Budget the fork or reimplementation as a first-class deliverable, not a follow-up. Reimplementation materially reduces this: plain Nova fields track the framework automatically.
Support. Effectively none. GitHub issues are unattended; there is no commercial backing. Internal Laravel developers become the support channel, which is acceptable given the small surface area but should be stated explicitly to stakeholders.
Scaling. Negligible. The field executes only on Nova resource index and detail screens, adds one small compiled asset, and performs no per-request network calls beyond a thumbnail URL. It does not affect application throughput, queue depth, or database load. The scaling constraint is editor count against Nova's own licensing and performance model, not this package.
Failure modes. Most likely: silent breakage on the next Nova upgrade (component fails to register, field renders blank, editors lose input without error). Also: asset not republished after deploy leaving a stale or missing bundle; URL stored un-normalized so downstream consumers see inconsistent formats; preview broken by CSP or by the source video being removed or made private; iframe-based previews degrading page performance or triggering consent requirements in regulated markets.
Ramp-up. Low for anyone fluent in Laravel and Nova — under an hour to read the source end-to-end, half a day to port the PHP logic, one to two days for a clean reimplementation including tests. Developers unfamiliar with Nova's field/asset model should budget roughly double, since the friction is in Nova's build conventions rather than in this package's logic.
How can I help you explore Laravel packages today?