shipfastlabs/grant
Grant is a lightweight Laravel package from ShipFastLabs for adding credits to your app. It provides a simple, expressive API to grant, spend, and track user credits, with seamless Eloquent integration and minimal setup.
Architecture fit
shipfastlabs/grant is a Laravel authorization package that hooks into the framework's Gate abstraction (the release notes reference a "stale Gate memo," which implies it registers or memoizes abilities through Laravel's Gate). The move to "model-backed writes" indicates permissions/grants are persisted via Eloquent rather than being defined purely in code or config, making it a fit for applications that need runtime-editable authorization (admin UI, tenant-scoped roles) layered on top of Laravel's native Gate::allows / policy checks. It is not a standalone service and assumes an Eloquent-backed Laravel app.
Integration feasibility
Feasible for a greenfield Laravel service: composer install, publish config (PR #2 explicitly isolates "published files," so config/asset publishing exists), run migrations for the model-backed store, and continue calling Gate as normal. The package appears to be a thin layer rather than a framework replacement, which keeps blast radius small. v0.0.1 is the first tagged release, so integration cost is low but verification cost is high.
Technical risk
0.0.1 carries no backwards-compatibility guarantee; the API may change without a major bump. Treat as experimental.Key questions
composer.json constraint?Gate/Policies — and can it coexist with existing policy classes?Gate::allows call (query per check vs. cached)?spatie/laravel-permission or hand-rolled role tables?Stack fit
Assumes Laravel with Eloquent and the default Gate/AuthServiceProvider wiring. Natural fit where authorization is already expressed as abilities and policies; poor fit for apps using a non-Eloquent or external authorization service.
Migration path
Greenfield or additive only. There is no evidence of an importer or compatibility shim for existing role/permission packages, so assume a parallel-run period: keep current authorization as source of truth, mirror into grant, and diff decisions before cutover. Avoid a big-bang migration on a 0.0.x dependency.
Compatibility
Pin the exact version (0.0.1) rather than a caret range, and vendor-lock via composer.lock. Because config is publishable, treat the published config file as deployable state: diff it on every upgrade and validate on boot (PR #1 added config validation, which we should exercise deliberately with a bad config in CI).
Sequencing
Maintenance Pre-1.0 with a single maintainer means we own upgrade risk. Budget recurring effort per Laravel major upgrade and per package minor bump. Maintain an internal fork/patched-copy contingency; the package is small enough that forking is a credible fallback.
Support No maturity signal in the release notes beyond the changelog — no docs, no support policy, no LTS statement. Assume self-support. Assign one engineer as internal owner and record answers to the key questions above in our own docs.
Scaling
Model-backed writes shift load to the database. The scaling question is the read path: if each Gate check queries, hot endpoints will multiply DB round-trips. Require a caching layer or per-request memo with a short, explicit TTL, and load-test a permission-heavy endpoint before broad rollout. For multi-tenant deployments, confirm tenant scoping is enforced in the query, not in application code.
Failure modes
Gate deny or fall through? Must be fail-closed for privileged actions.Ramp-up
Low for any Laravel developer — the mental model is standard Gate usage, and the package is additive. Moderate for whoever owns the invalidation semantics, since that requires understanding worker lifetimes and cache behavior. Plan a short internal walkthrough plus a written runbook for "permission changed but not taking effect."
How can I help you explore Laravel packages today?