square1-io/nova-metrics
A Laravel Nova package offering reusable metric cards and dashboard widgets for visualizing key application data, with configurable queries, value formats, and trend displays.
Architecture fit. square1-io/nova-metrics is a single-purpose Nova extension: a Laravel package (composer-installed, service-provider registered, no migrations, no queues, no external services) that bridges Nova's resource filters onto metric cards. That's a narrow, well-defined seam. It fits cleanly if — and only if — Nova is already the system of record for your admin/analytics surface and users are already fluent in the resource-filter vocabulary (date pickers, status selects, tenant filters). It contributes no new abstraction and no data model; it just closes a specific gap between two Nova features that don't talk to each other natively. Value outside Nova is zero.
Integration feasibility. Installation is trivial; adoption is a per-metric-card trait or card-class swap plus a declaration of which resource's filters should surface. The whole source is readable in an hour by a mid-level Laravel developer. The real integration work is not wiring — it's validating that each filter behaves on a card exactly as it does on the resource index.
Technical risk. Ranked:
RequestFilter), conditional-visibility (canSee), multi-select, and date ranges. Only a subset is likely to translate cleanly, and the package description doesn't enumerate which.Key questions to resolve before committing:
composer.json, and is Nova 5 supported?canSee/authorizedToSee on filters, or render everything regardless of viewer policy?calculate() — the native $request->filters contract, or a package-specific mechanism?RequestFilter filters, or only simple ones?Stack fit. Laravel + Nova only. Strong fit when product and ops users already filter resource indexes and reasonably expect the same controls on the metric cards sitting beside them. Poor fit if metrics are served from scheduled aggregates rather than query-time computation — filtering at read time is the wrong model there.
Migration path. Additive, zero-blast-radius. No schema changes, no backfill, no data migration. Adoption is per-card, so you can pilot on one metric and leave the rest on native metric filters indefinitely. Rollback is removing a trait reference; the package can remain installed and unused.
Compatibility. Gate on the composer constraint matrix for PHP, Laravel, and Nova against your exact Nova minor. Then run a filter inventory of the app: enumerate every resource filter and classify as (a) simple column compare, (b) query-builder closure, (c) request-dependent, (d) conditional-visibility. Classes (c) and (d) are the likely failure set and should be explicitly excluded from the supported list until proven.
Sequencing.
Maintenance. Low steady-state: nothing to run, monitor, or back up. The cost is upgrade-coupled — every Nova major, and some minors, warrants a regression pass on filter application plus a dashboard smoke test. Budget roughly half a day per Nova upgrade. Treat the upstream repo's release cadence and Nova version support as the leading indicator of abandonment.
Support. At 27 stars, the community answer pool is effectively you. Plan to read source rather than search issues. Pin a version or maintain an internal fork so your upgrade cadence isn't hostage to the maintainer's.
Scaling. Infrastructure cost is negligible; query cost is not. Every filter change re-executes the metric query, and Trend/Partition metrics multiply that per data point. A filter combination that's cheap on an index page can be expensive across a 90-day trend on a large table. Validate on production-sized data, not seeds. Separately: if metric results are cached, filter state must be in the cache key or you will serve one user's filtered number to another.
Failure modes, by cost.
canSee should hide them rendered to unauthorized viewers, or filter semantics revealing data outside a policy scope.Ramp-up. Shallow. A mid-level Laravel developer needs under a day to install, read the source, and wire a card; the only prerequisite is Nova's mental model (calculate() plus NovaRequest::filters()). The non-obvious work — the fidelity audit and the reconciliation harness — should sit with whoever owns dashboard trust, not with whoever did the install. Document the supported-filter matrix in-repo so the next maintainer doesn't rediscover it under pressure.
Bottom line. Worth a 1–2 day spike if resource-filter parity on metric cards is a genuine user ask. Technical risk is contained by the package's small footprint; the deciding factor is correctness risk, since the failure mode is quietly wrong executive numbers. The low opportunity score suggests the gap is narrow enough that an in-house implementation remains a credible alternative.
How can I help you explore Laravel packages today?