kirschbaum-development/nova-comments
A Laravel Nova package that adds comment threads to your resources, letting teams discuss records without leaving the admin panel. Configure which models accept comments and keep collaboration close to the data.
What this actually is. Not a service, not a subsystem — a Laravel Nova field package. The deliverable is a Vue component plus a trait (HasComments) and a polymorphic Comment model/migration. Judging it as infrastructure overstates it; judging it as a UI widget understates the fact that we end up owning the persistence layer.
Architecture fit.
comments table, plain Eloquent. That means the data outlives the UI. If we ever leave Nova, threads survive; the panel doesn't.Integration feasibility. Genuinely small: composer require, vendor:publish (config, migration, optionally the model), php artisan migrate, add the trait to a model, add Comments::make()->onlyOnDetail() to that model's Nova resource, then write authorization. Half a day including a create/edit/delete smoke test and a non-privileged-user denial check. The engineering cost is trivial; the decision cost is not — see key questions.
Technical risk.
composer update can change Nova-version code paths with no version bump to warn us. Pin explicitly and read composer.json constraints to establish whether Nova 4 remains supported or the floor was raised.canSee/canRun and policies. Assume read/write/delete are open until proven otherwise in vendor source.cascadeOnDelete, and morph-map drift (FQCN rows vs. alias rows) requiring a data migration if decided late.Key questions to resolve before committing capacity.
composer.json constrain?Relation::enforceMorphMap() on day one, or accept FQCNs forever?Stack fit. Laravel + Laravel Nova (v4/v5) + Eloquent polymorphic relations, with a Node toolchain required for asset build/publish. If our admin surface is not Nova, stop here — build a thin model + policy layer ourselves or evaluate a framework-agnostic option.
Migration path (the part we own). Publish by tag, never --force, and commit the published migration rather than relying on loadMigrationsFrom. Treat comments as our table from day one: extend the package Comment model, point config at our subclass, and add the columns we predict we'll need — deleted_at, edited_at, a visibility enum, team_id, and an author_name snapshot. Add the composite index on (commentable_type, commentable_id) ourselves if the shipped migration lacks it. Point the author FK at nullOnDelete so history reads "Jane Doe (deactivated)" years later instead of vanishing.
Compatibility checks to run in staging, not production.
composer.json.npm run build / nova:publish compiles under our Node version — the 4.0.3 dependency bumps touch the Node toolchain.vendor/ for what abilities it checks on create/destroy; the README is not the spec. The four files that define behavior are the migration, the Comment model, the config, and the field class.Sequencing.
Order or Ticket detail screen — with a real policy and an explicit denial test. Do not launch on a customer-facing or compliance-flavored use case; those are different products.viewComments / createComment on the target model (or a CommentPolicy), gate the field on $this->resource rather than a global role. One policy file, not a grep.deleting event, name snapshot.Comment::created dispatching a queued notification to everyone except the author, so the same behavior fires from console commands and imports.$order->comments()->with('author')->latest()->get() and a weekly digest query. This is the exit path and it kills the lock-in argument before anyone makes it.Upgrade posture. 4.0.3 is compatibility plus dependency hygiene — Nova 5 support, actions/cache 3→4, nanoid 3.3.4→3.3.8, no API churn, no migrations, no config changes. It absorbs into a routine dependency sprint at near-zero cost. If we're staying on Nova 4 for several quarters, upgrading to 4.0.3 is optional and non-zero risk; deferring is defensible but should be a stated decision, not drift.
Maintenance. Code surface is small; dependency ownership is not. Assign a named internal owner and treat this as a tracked dependency with a review cadence (quarterly version check, plus every Nova upgrade). Keep artifacts published and committed so upgrades are diffable; never patch vendor code. If the package goes quiet, the fallback is realistic — we already own the table, the model subclass, and the policies, so replacing the field with an in-house Nova component is a contained piece of work, not a migration project.
Support. No vendor, no SLA, no support contract. Effective support is us, at an estimated few hours per quarter plus smoke testing around Nova upgrades. Bus factor is one maintainer's attention span; plan accordingly. Transitive dependency bumps in 4.0.3 reduce supply-chain and vulnerability-scanner noise on the admin surface, which matters if the admin panel is in security-review scope.
Scaling. Comment volume is inherently low — a per-record thread on a detail screen. The scaling concerns are query-shaped, not volume-shaped:
author and don't fan out.Failure modes to instrument or check for.
vendor:publish --force, and the classic config:cache detour after config edits.Ramp-up. Developer ramp-up is near-zero: four edits and a policy. The real ramp is organizational, and it's PM work:
How can I help you explore Laravel packages today?