Package Screenshot Automation
Deployment can generate package screenshots from the committed screenshot manifests. Each package owns a packages/{package}/docs/screenshots.json file, and the aggregate manifest is package-screenshot-manifest.json.
How Deployment Should Use It
Section titled “How Deployment Should Use It”- Install the package and its declared dependencies from
capell.json. - If the screenshot manifest declares
composerRequires, Composer require every listed package before seeding demo data. This is required for cross-package screenshots such as frontend authoring, where the editable page depends on core, admin, frontend, a theme beacon, and the authoring package. - Run migrations and package setup/demo commands listed in
docs/overview.md. - Authenticate as an admin user with the required role or permission.
- Resolve
admin-surfacetargets through Filament resources or pages. - Resolve
frontend-urltargets through seeded demo routes or package route names. - Capture desktop and mobile screenshots. Use
scripts/capture-admin-screenshots.mjsfor admin surfaces when a manifest declares it, and keepSCREENSHOT_FULL_PAGE=trueso long admin form builders are captured in full. - Execute any
browserTestsdeclared by the package manifest. These tests must run against the installed browser surface, not only server-rendered Blade. - Write files to
public/docs/screenshots/packages/{package}.
Manifest Contract
Section titled “Manifest Contract”package: package slug.composerName: Composer package name where available.composerRequires: optional list of Composer packages the screenshot/demo environment must require before capture.outputDirectory: deployment output path.entries[].surface:adminorfrontend.entries[].targetType:admin-surfaceorfrontend-url.entries[].target: resource/page class name when known, otherwise deployment resolves from seeded content.entries[].docsPage: optional markdown page where the screenshot is referenced.entries[].output: optional concrete output file when the package commits a docs screenshot or requires a stable filename.browserTests: optional browser scenario contracts the deployment runner must execute after package installation.runner: optional screenshot runner path, such asscripts/capture-admin-screenshots.mjs.capture.fullPage: when true, the runner should capture the full scrollable page instead of only the viewport.
The package repo does not need to run a browser during docs generation. It commits the contract that the demo/docs deployment can consume after package installation.