capell-app/frontend
Public rendering package for Capell CMS that resolves core page, site, language, layout, and theme records into Laravel responses. It provides frontend page routing, rendering hooks, Livewire integration, extension points for themes and add-ons, and a built-in default Blade theme fallback.

capell-app/frontend is the public rendering package for Capell CMS. It resolves Core page, site, language, layout, and theme records into Laravel responses and exposes the frontend extension points used by themes and frontend add-ons.
Use this package when a Capell install needs public page routing. It owns the minimal built-in default theme fallback, but richer visual themes and in-page authoring remain optional add-ons.
Frontend owns:
default Blade theme fallback and its static navigation, content, listing, CTA, and footer viewsFrontend does not own:
Frontend depends on capell-app/core and is optional — omit it for headless setups. The recommended path is the installer (composer require capell-app/installer → php artisan capell:install), which adds Frontend when you select it. To add it manually to an existing Capell app:
composer require capell-app/frontend
php artisan capell:frontend-install
php artisan capell:frontend-after-install
For Vite development builds, both install commands accept --dev.
On existing apps, use:
php artisan capell:frontend-upgrade
Public routing depends on the host app's web server sending unmatched public page requests to Laravel. See the server configuration docs before debugging route fall-through issues.
Capell\Frontend\Providers\FrontendServiceProviderconfig/capell-frontend.phproutes/web.phpCapell\Frontend\Http\Controllers\PageControllerfrontend.resolve, frontend.etag, frontend.asset-optimization, frontend.anonymous_cacheable_render, frontend.rendering_strategy, frontend.maintenance, workspace.contextcapell:frontend-install, capell:frontend-after-install, capell:frontend-upgrade, capell:generate-htmlRenderHookRegistry, FrontendResourceRegistry, CacheInvalidationRegistry, ReservedFrontendPathRegistry, FrontendRouteMiddlewareRegistry, FrontendComponentRegistry, FrontendRuleConditionRegistry, FrontendResponseRendererRegistry, TailwindAssetsRegistryThe package always registers index.php and a fallback page route. / is only registered when CAPELL_FRONTEND_REGISTER_HOME_ROUTE=true. Reserved paths prevent internal or package-owned routes from falling through to public theme rendering.
Public frontend responses must not expose admin/editor implementation details. Blade views, cached HTML, theme output, and public assets should not include authoring JavaScript, editable markers, model IDs, field paths, package names, signed editor URLs, or permission hints.
Frontend authoring must be a post-load admin feature. The public page loads as ordinary HTML; only an authenticated admin beacon response may add edit controls.
When changing public rendering, cache behavior, themes, or beacon integration, keep or add tests that prove anonymous and non-admin responses contain no authoring surface.
Editor-authored rich text must cross a SafeHtml boundary before Blade renders it. Build the value with SafeHtml::sanitize($html, $sanitizer) (or use RenderHtmlContentAction) and output it with normal escaped Blade braces: {{ $safeHtml }}. The constructor is private so an arbitrary string cannot be mislabeled as safe HTML.
Frontend reads Core records and owns frontend settings. Its main persistence impact is settings state; generated page cache files are owned by optional cache/static packages.
The capell:generate-html command writes static artifact metadata to storage/framework/capell-static-artifacts by default. Set CAPELL_FRONTEND_STATIC_ARTIFACTS_PATH when a deployment needs those artifacts written to a separate writable directory.
Cache invalidation is model-event aware and can run through queues depending on package configuration. If async invalidation is enabled, a queue worker must be running.
Tailwind source/import generation depends on installed packages declaring their frontend sources. Missing package sources usually show up as incomplete generated CSS, not as PHP exceptions.
From the split repository root, with development dependencies installed, run package tests after changing frontend routing, render actions, cache invalidation, or public safety checks:
vendor/bin/pest tests
For public output changes, include the safety-focused tests:
vendor/bin/pest tests/Feature/StaticBladeRenderingTest.php tests/Feature/MediaComponentMetadataTest.php --configuration=phpunit.xml
| Surface | Supported versions |
|---|---|
| PHP | ^8.4 |
| Laravel | ^13.0 |
| Livewire | ^3.0 or ^4.0 |
| Core | The same release as this package |
Each Capell 1.x minor receives security fixes for 24 months from its release date, and the latest 1.x minor is always supported. Upgrade all installed Capell foundation packages together to the same supported release before requesting a fix. See the Capell security policy for vulnerability reporting.
Support covers the dependency ranges above. When an upstream release reaches its own end of life earlier, upgrading that dependency may be required to receive a safe fix.
/ does not resolve, check CAPELL_FRONTEND_REGISTER_HOME_ROUTE; the package does not register the home route by default.Package development and coordinated verification happen in the capell-app/capell monorepo. Split package repositories are release mirrors; use docs.capell.app for cross-package guidance. See the contribution guide, security policy, and licence.
| Page | Covers |
|---|---|
| Frontend overview | Frontend responsibilities and the package docs index. |
| Page and site loading | Site, page, language, theme, and layout resolution. |
| Security | Package-specific public rendering safety notes. |
| Server configuration | Static-cache fallback and web server routing rules. |
| Tailwind assets | Package Tailwind source and import registration. |
| Render hooks | Public render hook registration. |
| Testing frontend | Frontend package test patterns. |
The complete frontend and public-output safety guides are published at docs.capell.app.
How can I help you explore Laravel packages today?