silber/client-templates
Laravel package for defining client-side templates with Blade, letting you reuse server-authored markup in browser-rendered interfaces. It helps keep JavaScript-driven UI templates consistent with your Laravel views without duplicating HTML.
Architecture fit. silber/client-templates is a small, single-purpose Laravel package: a service provider (and likely a published config file) that exposes a Blade directive for inlining client-side templates — Handlebars, Mustache, Underscore/Knockout, Alpine x-template, or raw <script type="text/x-template"> blocks — from separate files into a server-rendered view. Architecturally it sits entirely at the view composition layer: no models, no persistence, no HTTP surface, no background work. That makes it trivially composable with any Laravel app whose rendering strategy already depends on Blade, and irrelevant to apps that render templates client-side via a bundler (Vue SFCs, Svelte, React) or via API/JSON endpoints.
Integration feasibility. High in principle, low in confidence. The install path is the standard composer require + auto-discovery (or manual provider registration) + optional config publish, and the operational footprint is one directive. There is no middleware, queue, cache driver, or migration involved. The realistic integration cost is measured in hours, not sprints — provided the package loads at all on the target Laravel version.
Technical risk. This is the dominant concern and it is concentrated in one place: lifecycle. 13 stars and 0 dependents indicates essentially no production usage signal; the repo is almost certainly unmaintained and likely targets Laravel 5.x-era APIs (Blade directive registration, view.finder, possibly Illuminate\Support\Str helpers removed or changed since). Concrete risks:
Key questions to resolve before committing.
laravel/framework and php constraints does composer.json declare, and does composer require resolve cleanly on our target version?{{> partial}} semantics), or only flat inlining?php artisan view:cache and view:clear in a deploy pipeline?Stack fit. Good for: server-rendered Laravel apps that deliberately embed client templates (legacy Knockout/Backbone/Handlebars front ends, Alpine.js x-template patterns, progressively-enhanced pages that need templates available before the JS bundle parses). Poor for: Inertia/Vue/React SPAs, Livewire-heavy apps (Livewire owns the client-rendering story), and anything with a build step that can import .hbs directly. If the team's front-end already uses a bundler with a template loader, this package adds a second, divergent source of truth for templates and should be rejected on those grounds alone.
Migration path. Do not migrate to this package. Two realistic paths:
app/Support/ (or a first-party packages/ directory), retain the MIT header, register the directive in a service provider we own, and treat it as internal code. This eliminates the abandoned-dependency problem, makes the Blade-cache behavior ours to fix, and costs less than a procurement review of an unmaintained package.<x-client-template name="..."/>) in well under a day, with explicit cache-busting via a template-file hash in the component's rendered output. This is the option I would recommend for any team on Laravel 9+.Compatibility and sequencing. Verify in this order: (1) composer require resolves on the pinned Laravel version in a scratch branch; (2) the directive renders in a single non-critical view; (3) the template survives view:cache → edit template → view:cache in a staging pipeline, confirming invalidation behavior; (4) only then rollout to remaining views. Treat step 3 as a gate — if invalidation is broken, do not proceed to broader use without a workaround (template hash in the filename, or a deploy step that always clears views).
Maintenance. Effectively zero upstream maintenance. No security patching, no Laravel-upgrade compatibility work, no issue triage. Every hour of maintenance is our hour. The good news is the blast radius is small and the code is likely short enough to fully audit; the bad news is that "small enough to audit" is also "small enough to own," which argues for vendoring.
Support. Community support is nil — no meaningful issue history at 13 stars, no Stack Overflow corpus, no dependents to compare notes with. Internal documentation must be written by whoever integrates it, particularly around the cache-invalidation behavior and the template directory convention.
Scaling. Runtime cost is negligible: a file read and string inclusion, once per Blade compilation if the directive is compile-time, and the compiled PHP output is served from OPcache like any other view. This will not be a bottleneck at any realistic scale. The scaling risk is organizational, not technical: template count and nesting depth grow, and with no partial-resolution or namespacing story the flat inlining approach becomes unwieldy past a few dozen templates.
Failure modes to plan for.
view:clear or content-hashed template names.text/x-* script blocks, not HTML to be rendered server-side.Ramp-up. For a Laravel developer, near-zero: the concept is one directive and one directory. The genuine ramp-up burden is institutional — the team must absorb the knowledge that upstream is dead, that the cache behavior is subtle, and that fixes belong to us. Budget half a day for the integration spike plus a short ADR recording the vendor-vs-depend decision. Given the score (0.095), the star count, and the absence of dependents, the defensible TPM recommendation is: do not take a dependency; reimplement as a first-party Blade component with explicit cache invalidation, and only reconsider if the source review reveals functionality meaningfully richer than the description implies.
How can I help you explore Laravel packages today?