# Overview

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

## What This Plugin Adds

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

Theme Business provides a Blade presentation for quote-led local services with emergency availability, before-and-after proof, pricing guidance, reviews, service areas, and quote steps.

Admins select Business through theme management and choose its light Business or dark After Hours preset. Public layouts use eight package-owned service-business widgets.

Evidence: [`src/BusinessThemeServiceProvider.php`](../src/BusinessThemeServiceProvider.php), [`src/Enums/WidgetComponentEnum.php`](../src/Enums/WidgetComponentEnum.php), [`tests/Feature/BusinessBespokeWidgetsTest.php`](../tests/Feature/BusinessBespokeWidgetsTest.php), [`capell.json`](../capell.json), [`src/Manifest/ThemeManagementPageContribution.php`](../src/Manifest/ThemeManagementPageContribution.php), [`tests/Unit/DefinitionTest.php`](../tests/Unit/DefinitionTest.php).

Status details:

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

## Why It Matters

**For developers:** The provider extends the Foundation default theme, registers layout-native widget renderables, and checks optional Blog, Bookings, and Form Builder integrations behind support classes.

**For teams:** Trades and local-service teams get a clear public path from service proof and availability to a quote request, while editors keep normal Capell content workflows.

Evidence: [`src/BusinessThemeServiceProvider.php`](../src/BusinessThemeServiceProvider.php), [`src/Support/BlogAvailability.php`](../src/Support/BlogAvailability.php), [`src/Support/BookingsAvailability.php`](../src/Support/BookingsAvailability.php), [`tests/Unit/OptionalIntegrationAvailabilityTest.php`](../tests/Unit/OptionalIntegrationAvailabilityTest.php), [`src/View/Components/QuoteRequestPath.php`](../src/View/Components/QuoteRequestPath.php), [`src/Support/Demo/BusinessDemoContent.php`](../src/Support/Demo/BusinessDemoContent.php), [`tests/Unit/PublicOutputSafetyTest.php`](../tests/Unit/PublicOutputSafetyTest.php).

## Screens And Workflow

Screenshot contract: `screenshots.json`.

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

- Business Homepage (frontend, required).
- Business Directory (frontend, required).
- Business Detail (frontend, required).
- Business Contact form (frontend, optional).
- Business Empty state (frontend, optional).
- Business 404 (frontend, optional).
- Business Get started (frontend, required).

## Technical Shape

- Service providers: `Capell\ThemeBusiness\BusinessThemeServiceProvider`.
- Actions: `InstallBusinessThemeDemoAction`.
- Command signatures: `capell:theme-business-demo`.
- Console command classes: `BusinessDemoCommand`.
- Manifest contributions: `admin-page: Capell\ThemeBusiness\Manifest\ThemeManagementPageContribution`.
- Health checks: `Capell\ThemeBusiness\Health\ThemeBusinessHealthCheck`.
- Blade views: `packages/theme-business/resources/views/components/blog-tips-rail.blade.php`, `packages/theme-business/resources/views/components/quote-request-path.blade.php`, `packages/theme-business/resources/views/widget/accreditation-insurance-strips.blade.php`, `packages/theme-business/resources/views/widget/before-after-comparison.blade.php`, `packages/theme-business/resources/views/widget/emergency-availability-banner.blade.php`, `packages/theme-business/resources/views/widget/pricing-guide-table.blade.php`, `packages/theme-business/resources/views/widget/quote-path-stepper.blade.php`, `packages/theme-business/resources/views/widget/review-proof-wall.blade.php`, `packages/theme-business/resources/views/widget/service-area-map-grid.blade.php`, `packages/theme-business/resources/views/widget/team-on-the-road-cards.blade.php`.
- Cache tags: `theme-business`.

## 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-business`.
- Commands: `capell:theme-business-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-business` 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-business`.
2. No package-specific setup command or migrations are declared.
3. Open the Business Homepage and confirm the public output renders without admin state.

## 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), [Blog](../../blog/README.md), [Bookings](../../bookings/README.md), [Form Builder](../../form-builder/README.md).
- Focused tests: `vendor/bin/pest packages/theme-business/tests --configuration=phpunit.xml`.

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