panjinamjaelf/kaguya
Kaguya is a lightweight Laravel package that provides a simple, configurable way to add its functionality to PHP applications. It follows Laravel conventions, keeps installation minimal, and offers a straightforward API for common development tasks.
Architecture fit. Kaguya targets a well-understood gap: runtime-mutable application settings for Laravel that should not live in version-controlled config files. Architecturally this is a thin persistence-plus-accessor layer over Laravel's service container, config repository, and cache. It fits the standard Laravel request lifecycle without introducing new infrastructure — no queues, no external services, no sidecar. That is the package's strongest attribute: it is a leaf dependency, not a platform. For teams already on Laravel 9/10/11 with an Eloquent-backed stack, the conceptual footprint is small.
Integration feasibility. High on paper. A settings package typically requires a migration, a model, a facade or helper, and a service provider registration. The real feasibility question is not "can we install it" but "does its access pattern compose with our existing config usage." If the codebase reads config('app.foo') in hundreds of places, a settings package only helps where settings are genuinely dynamic. Scoping that boundary is the actual integration work.
Technical risk. Material, and concentrated in three places:
Key questions.
toArray/bulk-read path or does each accessor hit the cache/database?Stack fit. Best fit is a mid-size Laravel monolith or a small multi-tenant SaaS where admins need to toggle features or adjust thresholds without a deploy. Poor fit for a microservices estate, for stateless API-only services, or for any product where settings are already modeled as first-class domain entities — in those cases a bespoke settings table with explicit columns is clearer than a generic key/value store.
Migration path. Adopt behind an interface. Define an internal SettingsRepository contract in the application layer, bind it to Kaguya in a service provider, and resolve settings only through that contract. This costs roughly a day of work and buys two things: the ability to swap to spatie/laravel-settings or a homegrown implementation without touching call sites, and a clean seam for testing. Do not let Kaguya's facade leak into domain code.
Compatibility. Verify against the exact Laravel and PHP versions in our matrix before anything else. Because the package is small and lightly starred, assume it is tested only against the versions the maintainer uses. If our fleet spans Laravel 9 through 11, budget time for a compatibility shim or accept a narrower rollout. Check the composer constraints rather than the README — illuminate/* ranges are the honest signal.
Sequencing.
Maintenance. Low ongoing labor if the package is stable, but the burden is contingent: with a single maintainer and 10 stars, we should plan to own the code eventually. Practically, that means treating the fork as the baseline assumption rather than the contingency. The source is small, which makes internal ownership tractable — this is the main reason the low star count is survivable here in a way it would not be for, say, an auth or queue package.
Support. No vendor, no SLA, no paid tier. Support is "read the source" and "read the issues." For a settings layer this is acceptable; for anything on the critical request path with regulatory exposure it is not. Keep the blast radius small.
Scaling. Generic key/value settings tables are read-heavy and cache-friendly, so they scale well horizontally — provided the package actually caches. The scaling risk is write-side: every settings write must invalidate cache across all nodes. If invalidation is per-process or relies on config:cache regeneration, multi-node deployments will serve stale values. Validate this explicitly before relying on it in a load-balanced environment.
Failure modes.
config:cache/route:cache in deploy pipelines. Test the full deploy sequence, not just the dev loop."false" being truthy.Ramp-up. Genuinely fast for a Laravel developer — likely half a day to first productive use, one to two days to a hardened, wrapped integration. The dominant ramp-up cost is not learning Kaguya but drawing the boundary between static config and dynamic settings across an existing codebase, which is codebase-dependent and unrelated to the package choice. Budget that scoping work explicitly; it will exceed the package evaluation effort.
Recommendation. Proceed to a time-boxed spike, not a commitment. The package clears the bar for a low-risk, non-critical settings surface behind an internal interface, and the MIT license plus small codebase makes fork-and-own a realistic fallback. It does not clear the bar for anything on the critical path, anything requiring a support contract, or any surface where a stale read causes financial or compliance damage. The opportunity score of 6.1 reads correctly: real utility, thin evidence, cheap to trial, cheap to abandon.
How can I help you explore Laravel packages today?