Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nova Bouncer Laravel Package

yadahan/nova-bouncer

Provides Laravel Nova resources for Bouncer, the roles and permissions package. Manage roles, abilities, and entity assignments directly from Nova with a clean, searchable interface, letting admins grant or revoke access without touching code.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Nova presentation layer that reads and writes Bouncer's role/ability tables — not an authorization engine, and it must never be scoped as one. The value is confined to the narrow intersection of two deliberate stack choices: a licensed Laravel Nova install and Bouncer wired into models via the HasRolesAndAbilities trait. If the team is on spatie/laravel-permission (the dominant choice) there is no adapter and no path — stop evaluating. If there is no Nova license, the prerequisite cost dominates and the package delivers nothing. Treat those two prerequisites as hard gates before any estimate is produced.

Integration feasibility. Low technical effort, high prerequisite friction. composer require, publish provider assets, register the tool in NovaServiceProvider::tools(), gate it with canSee. The source is small enough to read in an afternoon, which matters because the repo publishes no compatibility matrix — composer.json constraints in the package are the real matrix. Frontend assets under resources/js/ are where Nova major upgrades break third-party tools, and that is the only part the package truly owns.

Technical risk. Concentrated and predictable:

  • Maintainer risk is the headline. 26 stars, 0 dependents, single maintainer, last release December 2024. There is effectively no ecosystem validation — no community patches, no shared upgrade path. The steady state should be planned as "we maintain a fork." MIT makes forking legally trivial and operationally permanent; that is an acceptable trade for 2–5 days of saved CRUD work, but it must be a conscious decision made now, not a surprise during an incident.
  • Feature coverage will be partial. Bouncer supports wildcards, ownership (toOwn), entity-scoped abilities, and multiple guards. A generic CRUD UI is unlikely to expose all of it. Anything the UI cannot express becomes out-of-band database work, which quietly defeats the delegation rationale.
  • No audit trail exists. Nothing records who changed what. "Who granted edit-users on a Friday afternoon" is unanswerable without observers you write yourself.
  • Cache staleness is a silent correctness bug. Bouncer caches abilities per user; writes through the UI must call Bouncer::refresh() / refreshFor($user) or admins will "fix" a permission and see nothing change.
  • Lockout is a real outage class. Deleting the ability your superadmin path depends on can lock every admin out of Nova, including out of the screen needed to fix it.

Key questions for the spike.

  1. Are we licensed for Nova and already on Bouncer — both, not either?
  2. What is our exact Nova / Laravel / PHP / Bouncer combination, and does it postdate the December 2024 release?
  3. Do we depend on wildcards, ownership, or multi-guard? If yes, verify the UI can express them or scope those to engineering permanently.
  4. Is audit, approval, or separation-of-duties on the compliance roadmap? If yes, this package closes none of it and the buy argument largely evaporates.
  5. Multi-tenant? Decide explicitly whether the tool renders within Bouncer::scope() or globally — a UI showing global roles to a tenant admin is a cross-tenant privilege escalation.
  6. Who owns the fork, and what is the trigger to exercise it?

Integration Approach

Stack fit. Internal admin panels, SaaS back-offices where account owners assign roles inside their tenant, agency-delivered client admin UIs, and Nova-based internal tooling. Poor fit for API-only products, spatie shops, or anything needing vendor support.

Migration path — seeder-first, UI-second. The UI is an operational surface, not a schema tool. Structural roles and abilities belong in idempotent seeders so staging refreshes and migrate:fresh reproduce production authorization state. Admins use the UI for the volatile part — who holds a role. Keep what a role means in code review. This is also the incremental adoption story: Bouncer's API can be introduced without a data migration, replacing hand-rolled is_admin flags over time.

Compatibility. Pin the package in composer.json to an exact tag or 1.x. Spike in staging on the exact Nova/Laravel/PHP combination intended for production. Set an explicit review trigger: if a Nova upgrade breaks it, or upstream goes six months without a release, we fork. Budget that outcome now rather than funding it out of an incident.

Sequencing.

  1. Verify prerequisites (Nova license, Bouncer, no spatie).
  2. Read composer.json, src/, routes/, and resources/js/ — confirm the tool's own routes are authorized and what save does.
  3. Seed structural roles and abilities; adopt an ability-naming convention (resource.action, e.g. posts.publish) in an enum shared by seeders and policies.
  4. Install the tool and gate it immediately with canSee — never ship the menu entry ungated, and never use a global Gate::before that returns true unconditionally or false instead of null.
  5. Prove the end-to-end loop: create one role in the UI, attach three abilities, assign to a test user, confirm the outcome in application code — not in the UI.
  6. Register model observers that write the audit log and invalidate the Bouncer cache in the same place so the two cannot drift.
  7. Add a break-glass artisan command that grants a superadmin role via Bouncer directly, plus a documented rollback.
  8. Roll out to ops leads; keep authorization enforcement in policies and Gate::allows() so the tool is never on the request path.

Rollback story. Removal is clean: drop it from tools() and composer remove; Bouncer's tables and data survive untouched. Write that down before rollout so nobody reaches for migrate:fresh.

Operational Impact

Maintenance. Assume fork ownership from day one. Pin the version, run a staging spike on every Nova major, and hold a standing review trigger. Keep changes to the tool itself in a fork with our own tests rather than patching vendor code in place.

Support. MIT, no SLA, single maintainer, no dependents, no shared upgrade path. Treat it as auditable sample code we may inherit, not a supported product. The buy case rests entirely on 2–5 days of saved CRUD work — an acceptable trade, but only if the fork outcome is pre-funded.

Scaling. Large role/ability or entity datasets degrade the UI; confirm pagination, search, and eager loading against production-scale data in the spike. Bulk changes belong in artisan commands, not a browser. Cache staleness does not necessarily clear across already-warm queue workers or Octane processes — restart workers on deploy, or invalidate inside the job boundary and accept staleness by design.

Failure modes and their blast radius.

  • Broken admin screen → degrades to "engineers change roles manually." Acceptable, and the design goal. Keep enforcement out of the tool's path so this stays the worst case.
  • Ungated tool → privilege escalation; anyone who can reach the menu can grant themselves abilities.
  • Cache not refreshed → permission changes appear to do nothing; correctness bug presenting as a UI bug.
  • Lockout → superadmin ability deleted; every admin loses Nova, including the fixing screen. Mitigate with break-glass command and a backup of roles, abilities, and pivots before bulk edits.
  • Drifted ability strings → hand-typed abilities in the UI are silent no-ops in production because no policy understands them. Enforce the naming convention in review.
  • Cross-tenant leak → global-scope roles rendered to a tenant admin. Decide and document scoping before multi-tenant rollout.

Ramp-up. Ops leads, support managers, and account owners can drive the screen with minimal training — that is the product win: converting a steady stream of permission-change tickets into a shipped admin screen. Engineer ramp-up is the cost: roughly an afternoon reading source plus spike time. Debugging follows a fixed order that separates a UI bug from an authorization bug in about two minutes: (1) tool registered and not filtered by canSee, (2) assets built/published for the Nova version, (3) write landed in roles/abilities/pivots, (4) cache refreshed, (5) the policy returns the expected result.

What this should and should not drive. It accelerates build-vs-buy for RBAC back-office screens, pulls "let ops manage roles themselves" forward cheaply, and supports migrating off ad-hoc is_admin flags. It must not drive the authorization model itself, tenancy strategy, or audit/compliance posture — those are Bouncer and application-code decisions, and audit trails and approval chains are out of scope entirely.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox