yukazakiri/laravel-shadebridge
ShadeBridge is a lightweight Laravel package that simplifies integrating Shade into PHP applications. It offers sensible configuration, service bindings, and Blade-friendly helpers, letting you connect Shade features with minimal setup while keeping your code clean and maintainable.
Architecture fit. Shadebridge is a server-side theme control plane for Laravel applications whose frontend uses shadcn/Tailwind. It centralizes theme ingestion (theme:add, theme:import), persistence (CSS + metadata), removal, and a build-time default (theme:default) behind artisan commands, then exposes the resolved theme to React/Vue via a pre-hydration initializer. This is a clean fit for teams already standardized on shadcn-style design tokens who want theme selection managed as application configuration rather than hardcoded CSS. It is not a general-purpose theming layer — apps without shadcn/Tweakcn-shaped tokens will get limited value.
Integration feasibility. Moderate-to-low effort. The package is Composer-installable, ships artisan commands, and the frontend surface is a thin hook plus an inline initializer. The 0.2.0 release formalizes a shared importer behind theme:add and theme:import, which reduces the number of distinct code paths we must validate. TLS verification on remote JSON imports is now enabled by default — correct from a security standpoint, but a hard blocker in environments with intercepting proxies or missing CA bundles; plan for that.
Technical risk. Elevated, driven by maturity rather than design:
Key questions.
theme:default overwrite existing published files, and is it reversible?Stack fit. Requires PHP 8.2–8.4 and Laravel 12–13 per the CI matrix. Laravel 13 coverage is forward-looking; treat Laravel 12 as the only battle-tested target today and pin accordingly. Frontend must be React or Vue with a Vite (or equivalent) build step, since theme changes require asset regeneration.
Migration path. Existing adopters must do a coordinated upgrade:
composer.json.use statements and service-provider/config references to Yukazakiri\Shadebridge.npm run build) — mandatory, not optional.theme:import/theme:add against the shared importer to force a clean CSS/metadata refresh.Because steps 1–2 are hard breaks at boot time, this cannot be a rolling deploy across a heterogeneous fleet. Sequence it as an atomic change within a single release.
Compatibility. Audit for: environments behind TLS-inspecting proxies (remote imports will now fail closed), pinned frontend toolchains older than the hook's expectations, and any place in our codebase that referenced the old namespace reflectively (config strings, container bindings, cached discovery).
Sequencing.
theme:add / theme:import / theme:default behavior and removal semantics.Maintenance. Expect ongoing churn. A 0.x package that renames its namespace in a minor release will likely do so again before 1.0. Budget a recurring "upgrade tax" per minor version and pin to exact versions (0.2.0, not ^0.2) so upgrades are deliberate. Track upstream releases; do not enable automated dependency bots on this package without a human gate.
Support. Effectively single-maintainer, community-supported with no visible SLA or LTS track. Internal ownership must be assigned — a named engineer who can read the importer and initializer source. Do not depend on upstream responsiveness for incident triage.
Scaling. Runtime cost should be negligible if themes resolve at build time; the risk is I/O on every request if themes are read from disk without caching. Verify and, if needed, wrap resolution in Laravel's cache. Serve compiled CSS through the standard asset pipeline/CDN. Multi-tenant theming is unproven — if that is a near-term requirement, treat it as a blocking investigation rather than an assumption.
Failure modes.
theme:default writing build-time system defaults may clobber customized files; confirm reversibility before using in production.Ramp-up. Low for a Laravel-fluent engineer — a config file, three or four artisan commands, and one frontend hook is a half-day to competency. The real ramp-up cost sits with frontend engineers who must understand the hook contract and the pre-hydration script, and with whoever owns the deploy pipeline and must internalize the "theme change implies asset rebuild" rule. Recommend a short internal runbook covering the upgrade procedure, the rebuild requirement, and the TLS/egress prerequisite before broad adoption.
How can I help you explore Laravel packages today?