# Overview

<!-- prettier-ignore-start -->

## What This Plugin Adds

Theme Folio: Bound Editions is an **Available**, **No schema impact** Capell theme in the **Capell Themes** product group. It ships as `capell-app/theme-folio` and extends these surfaces: frontend.

A premium, layout-native theme that turns finite publications into server-numbered, progressively enhanced bound editions.

After install, admins can select the theme through the core theme management surface. Editors keep using normal Capell content workflows while the package controls public presentation.

Status details:

- Status: Available
- Tier: premium
- Bundle: themes
- Composer package: `capell-app/theme-folio`
- Namespace: `Capell\ThemeFolio`
- Theme key: `folio`

## Why It Matters

**For developers:** The package gives developers package-owned service providers, Actions, Data objects, and Blade views instead of pushing this behaviour into core or application code.

**For teams:** A website that reads like a bound annual report, prospectus, or catalogue raisonné.

## Screens And Workflow

Screenshot contract: `screenshots.json`.

Desktop, tablet, and mobile variants remain defined in the screenshot contract; this list groups them by workflow.

- Folio: Bound Editions Homepage (frontend, optional).
- Folio: Bound Editions Directory (frontend, optional).
- Folio: Bound Editions Detail (frontend, optional).
- Folio: Bound Editions Contact (frontend, optional).
- Folio: Bound Editions Empty state (frontend, optional).
- Folio: Bound Editions Not found (frontend, optional).
- Folio: Bound Editions Call to action (frontend, optional).

## Technical Shape

- Service providers: `Capell\ThemeFolio\FolioThemeServiceProvider`.
- Actions: `BuildFolioBookDataAction`, `InstallFolioThemeDemoAction`, `ResolveFolioSectionDataAction`.
- Data objects: `FolioBookData`, `FolioSectionData`, `FolioSpreadData`, `FolioThemePresetData`.
- Command signatures: `capell:theme-folio-demo`.
- Console command classes: `FolioDemoCommand`.
- Manifest contributions: `admin-page: Capell\ThemeFolio\Manifest\ThemeManagementPageContribution`.
- Health checks: `Capell\ThemeFolio\Health\ThemeFolioHealthCheck`.
- Blade views: `packages/theme-folio/resources/views/components/folio-book.blade.php`, `packages/theme-folio/resources/views/components/folio-spread.blade.php`, `packages/theme-folio/resources/views/components/integrations/chronicle-journal.blade.php`, `packages/theme-folio/resources/views/components/integrations/chronicle-static.blade.php`, `packages/theme-folio/resources/views/components/integrations/enquiry-bookings.blade.php`, `packages/theme-folio/resources/views/components/integrations/enquiry-form.blade.php`, `packages/theme-folio/resources/views/components/integrations/enquiry-mailto.blade.php`, `packages/theme-folio/resources/views/components/integrations/figure-chart.blade.php`, `packages/theme-folio/resources/views/components/integrations/figure-table-only.blade.php`, `packages/theme-folio/resources/views/components/integrations/index-anchors.blade.php`, `packages/theme-folio/resources/views/components/integrations/index-search.blade.php`, `packages/theme-folio/resources/views/components/integrations/notice.blade.php`, `and 21 more`.
- Cache tags: `theme-folio`.

## Data Model

This theme has no schema impact. It relies on core Capell site, page, locale, and theme records instead of declaring package-owned tables.

## Install Impact

- Required packages: `capell-app/core`, `capell-app/theme-foundation`, `capell-app/frontend`, `capell-app/layout-builder`.
- Admin navigation: declares `admin-page: ThemeManagementPageContribution`; each Filament page or resource controls its own navigation visibility.
- Admin/editor extensions: none declared.
- Permissions: none declared in `capell.json`.
- Public routes: none declared.
- Database changes: no package migrations declared.
- Config: no package config files.
- Settings: no package settings declared.
- Queues or schedules: none declared.
- Cache tags: `theme-folio`.
- Commands: `capell:theme-folio-demo`.

## Common Pitfalls

- Keep required Capell packages on compatible v4 releases: `capell-app/core`, `capell-app/theme-foundation`, `capell-app/frontend`, `capell-app/layout-builder`.
- 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 `theme-folio` cache tags.

## 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 |
| 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

1. Install the package: `composer require capell-app/theme-folio`.
2. No package-specific setup command or migrations are declared.
3. Run `php artisan list` and verify the package command signatures are registered.

## Next Steps

- [Package docs index](README.md)
- [Developer troubleshooting](../README.md#troubleshooting)
- [Screenshot contract](screenshots.json)
- [Marketplace assets](assets/marketplace/)
- [Capell content language plan](../../../docs/CONTENT_LANGUAGE_PLAN.md)
- [Capell documentation design system](../../../docs/DESIGN_SYSTEM.md)
- [Capell and package ERD notes](../../../docs/erd/capell-and-package-erds.md)
- Related packages: [Theme Foundation](../../theme-foundation/README.md), [Layout Builder](../../layout-builder/README.md), [Bookings](../../bookings/README.md), [Form Builder](../../form-builder/README.md), [Search](../../search/README.md), [Widget Data Chart](../../widget-data-chart/README.md), [Blog](../../blog/README.md), [Widget Countdown](../../widget-countdown/README.md).
- Focused tests: `vendor/bin/pest packages/theme-folio/tests --configuration=phpunit.xml`.

<!-- prettier-ignore-end -->