Frontend Optimizer
Package docs status
Section titled “Package docs status”This page is generated from package source documentation in the Capell packages repository and the checked-in manifest. Source documentation is not distribution status. Before running a Composer command, verify that the exact package and compatible 1.x release are available through public Packagist or the authenticated marketplace account.
| Field | Value |
|---|---|
| Composer package | capell-app/frontend-optimizer |
| Package slug | frontend-optimizer |
| Product group | Capell Operations |
| Tier | premium |
| Bundle | operations |
| Runtime contexts | admin, console, frontend |
| Capell version | ^1.0 |
| Catalogue role | extension |
| Release channel | Beta |
| Source repository | capell-app/packages |
| Source path | packages/frontend-optimizer |
| Docs source | packages/frontend-optimizer/docs |
| Manifest | capell.json |
What This Plugin Adds
Section titled “What This Plugin Adds”Frontend Optimizer is an Available, Schema-owning Capell package in the Capell Operations product group. It ships as capell-app/frontend-optimizer and extends these surfaces: admin, console, frontend.
Frontend Optimizer builds deterministic render profiles and generates critical CSS artifacts for published pages, with inherited site, layout, and page scope controls.
Developers configure optimization defaults and scope overrides through existing settings and content schemas. Public pages receive profile assets and verified critical CSS without exposing optimization or authoring metadata.
Evidence: capell.json, src/Models/FrontendRenderProfile.php, src/Models/FrontendCriticalCssArtifact.php, src/Actions/GenerateCriticalCssArtifactsAction.php, docs/screenshots.json, src/Filament/Settings/FrontendOptimizerSettingsSchema.php, src/Filament/Extenders/FrontendOptimizerPageSchemaExtender.php, tests/Unit/Support/RenderProfileAssetRendererTest.php.
Status details:
- Status: Available
- Tier: premium
- Bundle: operations
- Composer package:
capell-app/frontend-optimizer - Namespace:
Capell\FrontendOptimizer - Theme key: not applicable
Why It Matters
Section titled “Why It Matters”For developers: Actions separate scope resolution, profile persistence, asset rendering, critical CSS generation, and retention, while the full stylesheet remains blocking until a fresh artifact exists.
For teams: Teams start with a safe page-URL default, can opt into broader layout or site scopes where appropriate, and regenerate or prune artifacts after frontend changes.
Evidence: src/Actions/ResolveOptimizationScopeAction.php, src/Actions/PersistRenderProfileAction.php, src/Actions/RenderProfileAssetsAction.php, tests/Unit/Actions/GenerateCriticalCssArtifactsActionTest.php, docs/admin-guide.md, src/Filament/Extenders/FrontendOptimizerSiteSchemaExtender.php, src/Actions/PruneRenderProfilesAction.php, tests/Unit/Filament/FrontendOptimizerPageTypeConfiguratorTest.php.
Screens And Workflow
Section titled “Screens And Workflow”Screenshot contract: docs/screenshots.json.
- Frontend Optimizer Critical CSS page settings (admin, required authentic evidence).
- Frontend Optimizer profile asset output (frontend, required evidence).
- Illustrative frontend optimizer critical CSS output preview (frontend, required evidence).
- Frontend Optimizer settings (frontend, supplementary evidence).
- Frontend Optimizer render profile detail (frontend, supplementary evidence).
- Frontend Optimizer prune command output (frontend, supplementary evidence).
Technical Shape
Section titled “Technical Shape”- Service providers:
Capell\FrontendOptimizer\Providers\FrontendOptimizerServiceProvider. - Config files:
packages/frontend-optimizer/config/capell-frontend-optimizer.php. - Migrations:
packages/frontend-optimizer/database/migrations/2026_05_10_190851_01_create_frontend_optimizer_tables.php,packages/frontend-optimizer/database/migrations/2026_07_10_000002_encrypt_frontend_optimizer_run_messages.php,packages/frontend-optimizer/database/migrations/2026_07_13_000001_create_frontend_critical_css_artifacts_table.php,packages/frontend-optimizer/database/migrations/2026_07_22_000001_add_recovery_state_to_frontend_critical_css_artifacts.php,packages/frontend-optimizer/database/migrations/2026_07_26_000001_add_recovery_generator_fingerprint_to_frontend_critical_css_artifacts.php. - Settings migrations:
packages/frontend-optimizer/database/settings/2026_05_24_000001_add_frontend_optimizer_settings.php,packages/frontend-optimizer/database/settings/2026_07_13_000001_use_site_critical_css_scope.php,packages/frontend-optimizer/database/settings/2026_07_14_000001_use_page_url_generated_critical_css.php,packages/frontend-optimizer/database/settings/2026_07_14_000002_add_tablet_critical_css_viewport.php. - Settings classes:
FrontendOptimizerSettings. - Models:
FrontendCriticalCssArtifact,FrontendOptimizationRun,FrontendRenderProfile. - Filament classes:
FrontendOptimizerPageTypeConfigurator,FrontendOptimizerLayoutSchemaExtender,FrontendOptimizerPageSchemaExtender,FrontendOptimizerSiteSchemaExtender,FrontendOptimizerSettingsSchema,CriticalCssScopeFields. - Extension contracts:
CriticalCssGenerator,OptimizingFrontendResourcePlanRenderer,RouteRenderShapeProvider. - Listeners:
CaptureCriticalCssPageTypeOptOut. - Actions:
AuditCssDebtAction,BuildFrontendBundleReportAction,BuildOptimizedImageMarkupAction,ClaimCriticalCssGenerationAction,GenerateCriticalCssAction,GenerateCriticalCssArtifactsAction,InvalidateGeneratedCriticalCssCacheAction,PersistCriticalCssArtifactAction,PersistRenderProfileAction,PrepareRenderProfileAction,PruneRenderProfilesAction,PruneStaleRouteRenderProfilesAction,and 12 more. - Data objects:
CriticalCssArtifactData,CriticalCssArtifactStateData,CriticalCssCoverageData,CriticalCssUrlStatusData,FrontendAssetDefinitionData,FrontendResourceHintData,GenerateCriticalCssArtifactsResultData,PruneRenderProfilesResultData,RenderProfileData,RouteRenderShapeData. - Jobs:
GenerateCriticalCssJob. - Command signatures:
capell:frontend-optimizer:generate-critical-css,capell:frontend-optimizer:prune-profiles,capell:frontend-optimizer:status. - Scheduled commands:
capell:frontend-optimizer:prune-profiles (daily; manifest declared),capell:frontend-optimizer:status --repair (everyFiveMinutes; manifest declared). - Console command classes:
GenerateCriticalCssArtifactsCommand,PruneRenderProfilesCommand,StatusCriticalCssArtifactsCommand. - Manifest contributions:
configurator: Capell\FrontendOptimizer\Manifest\FrontendOptimizerConfiguratorContribution,console-command: Capell\FrontendOptimizer\Manifest\FrontendOptimizerConsoleCommandsContribution,health-check: Capell\FrontendOptimizer\Manifest\FrontendOptimizerHealthContribution,migration: Capell\FrontendOptimizer\Manifest\FrontendOptimizerMigrationsContribution,model: Capell\FrontendOptimizer\Manifest\FrontendOptimizerModelsContribution,scheduled-job: Capell\FrontendOptimizer\Manifest\FrontendOptimizerRecoveryScheduleContribution,scheduled-job: Capell\FrontendOptimizer\Manifest\FrontendOptimizerRetentionScheduleContribution,schema-extender: Capell\FrontendOptimizer\Manifest\FrontendOptimizerSchemaExtendersContribution,setting: Capell\FrontendOptimizer\Manifest\FrontendOptimizerSettingsContribution. - Health checks:
Capell\FrontendOptimizer\Health\FrontendOptimizerHealthCheck. - Cache tags:
frontend-optimizer.
Data Model
Section titled “Data Model”- Required tables:
frontend_critical_css_artifacts,frontend_render_profiles,frontend_optimization_runs. - Models:
FrontendCriticalCssArtifact,FrontendOptimizationRun,FrontendRenderProfile. - Migration files:
2026_05_10_190851_01_create_frontend_optimizer_tables.php,2026_07_10_000002_encrypt_frontend_optimizer_run_messages.php,2026_07_13_000001_create_frontend_critical_css_artifacts_table.php,2026_07_22_000001_add_recovery_state_to_frontend_critical_css_artifacts.php,2026_07_26_000001_add_recovery_generator_fingerprint_to_frontend_critical_css_artifacts.php. - Migration impact: run host migrations through the package install flow before opening package surfaces.
- Deletion/retention behaviour: migrations declare cascade-on-delete relationships and null-on-delete relationships; retention is scheduled through
capell:frontend-optimizer:prune-profiles(daily; declared in the manifest).
Install Impact
Section titled “Install Impact”- Required packages:
capell-app/admin,capell-app/core,capell-app/frontend. - Admin navigation: no admin page or resource contribution is declared.
- Admin/editor extensions:
configurator: FrontendOptimizerConfiguratorContribution,schema-extender: FrontendOptimizerSchemaExtendersContribution. - Permissions: none declared in
capell.json. - Public routes: none declared.
- Database changes: package migrations are declared.
- Config:
config/capell-frontend-optimizer.php. - Settings:
Capell\FrontendOptimizer\Settings\FrontendOptimizerSettings. - Queues or schedules: scheduled commands
capell:frontend-optimizer:prune-profiles (daily; manifest declared),capell:frontend-optimizer:status --repair (everyFiveMinutes; manifest declared); queue jobsGenerateCriticalCssJob. - Cache tags:
frontend-optimizer. - Commands:
capell:frontend-optimizer:generate-critical-css,capell:frontend-optimizer:prune-profiles,capell:frontend-optimizer:status.
Common Pitfalls
Section titled “Common Pitfalls”- Keep required Capell packages on compatible v4 releases:
capell-app/admin,capell-app/core,capell-app/frontend. - Run migrations before opening package resources or public routes.
- Review package configuration before production-like verification:
config/capell-frontend-optimizer.php,Capell\FrontendOptimizer\Settings\FrontendOptimizerSettings. - Keep the host Laravel scheduler running so package-registered schedules can execute:
capell:frontend-optimizer:prune-profiles (daily; manifest declared),capell:frontend-optimizer:status --repair (everyFiveMinutes; manifest declared). - Keep public Blade and cached HTML free of authoring markers, model IDs, permissions, signed editor URLs, and lazy database queries.
- Custom write integrations must preserve invalidation for
frontend-optimizercache tags.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Package surface is missing after install | Provider or manifest is not loaded | Confirm capell.json, package composer.json, and provider registration |
Reinstall the package, refresh Composer autoload, and clear host caches |
| Admin screen or command fails on missing table | Package migrations have not run | Check the tables listed in Data Model |
Run host migrations and rerun the focused package test |
| Background work does not run | Queue worker or declared schedule is not active | Check the jobs and scheduled commands listed in Technical Shape |
Start the queue worker or host scheduler, then run the focused command or package test |
| Public output leaks unexpected state | Render data, cache variation, or authoring boundary has regressed | Check public Blade, cache tags, and public-output safety tests | Move data loading out of Blade and rerun the package public-output tests |
Quick Start
Section titled “Quick Start”- Install the package:
composer require capell-app/frontend-optimizer. - Run the required setup:
php artisan migrate. - Open the package admin surface at
/pages/{first-record}/editand confirm Frontend Optimizer is available.
Next Steps
Section titled “Next Steps”- Package docs
- Overview
- Admin guide
- Configuration files:
config/capell-frontend-optimizer.php. - Troubleshooting
- Screenshot contract
- Marketplace assets
- Capell content language plan
- Capell documentation design system
- Capell and package ERD notes
- Related packages: Media Library.
- Focused tests:
vendor/bin/pest packages/frontend-optimizer/tests --configuration=phpunit.xml.