yajra/cms-themes
Laravel package for managing CMS themes with theme discovery, activation, Blade view and asset publishing, and a simple API for registering theme paths, helping developers build customizable content-driven sites with swappable front-end themes.
What this package actually is. yajra/cms-themes is not a general-purpose theming library — it is the themes module carved out of YajraCMS, a first-party Laravel CMS. That provenance is the whole evaluation. It assumes a Blade-based, server-rendered Laravel application and likely assumes its parent CMS's conventions for theme directories, admin routes, and theme records. Its genuine value to a TPM is as a scoping instrument and reference implementation, not as a dependency to plan a roadmap around.
Architecture fit. Narrow and honest. It fits teams already inside the YajraCMS ecosystem, or teams that need a concrete working pattern for the four mechanics that define simple theming: theme discovery, runtime activation, Blade view precedence with fallback, and per-theme asset publishing. It does not fit SPA or API-first stacks, where theming is a client concern. It does not address visual page builders, theme marketplaces, or per-tenant design systems — if the roadmap says "white-label branding for enterprise tenants," this package gets you a folder-based Blade theme and nothing beyond it.
Integration feasibility. Mechanically trivial — MIT-licensed, Composer-installable, service provider, config and asset publishing, installable in an afternoon. The friction is entirely evidentiary: 7 stars, 0 dependents, a 0.095 composite score, and single-author history. There is no installed base proving it survives contact with a real application, no issue history showing bugs get fixed, and no documentation beyond source. Feasibility is "spikeable this week, unprovable in production until spiked."
Technical risk, ranked.
illuminate/* ceilings are the first hard gate. A cap can force the product onto an unsupported framework — that's a security and hiring problem, not an inconvenience.resources/ or public/. Unguarded extraction is a code-execution vector (zip-slip, PHP landing in a public asset directory). Gate this hardest.yajra/cms core or sibling modules pulls an entire CMS in behind a theming feature.Key questions to close before committing engineering time. What are the exact PHP and Illuminate constraints, and does it install cleanly on our target Laravel version? Does it require yajra/cms core, or work standalone — what does composer why report? Does it own theme storage (models, migrations) or only resolution (view namespaces, asset paths)? Is there an upload/extraction path, and is it reachable from non-admin routes? Is there a test suite, a recent commit, any issue acknowledging modern Laravel? And critically: what is the theme contract — manifest format, required files, fallback behavior — and is it documented anywhere other than source?
Stack fit. Blade with a conventional server-rendered view pipeline, or no fit at all. On Blade the core idea is sound and worth borrowing even when the code isn't worth depending on.
Migration path — fork-and-own, not adopt. The recommended posture is to vendor the package under our namespace or a private Composer repo, strip CMS-specific coupling, and place it behind a thin internal interface — ThemeResolver::active() / ThemeResolver::activate($slug) — so application code never imports vendor classes. That preserves an exit ramp: if the fork dies or is replaced, only the adapter changes. Frame the decision internally as "we own this code," never "we depend on this package."
Compatibility gates. Two. First, the Illuminate ceiling versus our framework version — non-negotiable, and failure ends the evaluation. Second, collisions: publish tags, config keys, view namespaces, and any globally autoloaded helpers.php. Global function collisions are the classic failure mode for packages of this vintage.
Sequencing.
Price the in-house alternative in parallel with the spike — it's small, conventional Laravel work and it removes the dependency risk outright.
Maintenance. Assume unmaintained and budget a named owner from day one. MIT makes forking legal and cheap; the recurring cost is upgrade cadence, not licensing — realistically 1–2 engineer-days per Laravel major plus incident time. Acceptable if it's scheduled; painful if it's discovered mid-upgrade.
Support. No vendor, no SLA, no commercial backing. Support is GitHub issues on a 7-star repo, which in practice is no channel at all. Internal ownership is the only viable model, and the compensating control is small surface area — a few hundred lines behind an interface that one engineer can absorb.
Scaling. Theme resolution should run once per request at boot or in middleware, so load impact is negligible. Confirm it does no per-request filesystem scan or glob() across theme and asset directories. Under horizontal scaling, public/ asset publishing must happen in the deploy or build step, not at runtime, or the filesystem drifts across containers. Verify config:cache and route:cache friendliness — packages that touch the DB or filesystem at service-provider boot break the deploy pipeline, which is a pipeline problem long before it's a theming problem.
Failure modes, highest to lowest.
public/.Mitigations: pin the fork version, disable upload UI unless explicitly required and reviewed, wrap resolution in try/catch with a safe default theme, and smoke-test theme switching in CI.
Ramp-up. Low on code, moderate on tacit knowledge. One engineer reads the package end to end in half a day. The real learning is the theme contract — manifest fields, directory structure, asset conventions — which is almost certainly undocumented and must be reverse-engineered from source. Treat that document as an explicit deliverable: it is the difference between a maintainable fork and a black box, and it outlives whichever decision we make.
TPM recommendation. Conditional, biased toward building. Use the package to make theming scope concrete and estimate effort, then fork it behind an internal interface — or, if the framework gate fails or an unguarded extraction path exists, stop and build the small in-house equivalent. Either way, put an owner, an upgrade cadence, and an internal theme-contract spec on the roadmap before the first theme ships.
How can I help you explore Laravel packages today?