Skip to content

Dashboard Reports Overview

Dashboard Reports adds reusable admin dashboard widgets for Capell sites that need editorial health and publishing activity surfaced in one place.

Use it when a project needs a package-owned reporting layer, but does not need a bespoke analytics package. The package stays admin-only and reads existing Capell page state instead of creating new content records.

  • Content health reporting for scheduled pages, expired pages, pages without URLs, and stale published pages.
  • Publishing trend reporting across common date windows.
  • Dashboard widgets registered into the main Capell admin dashboard.
  • A ContentHealthDataProvider implementation that can replace the admin package’s null provider when the package is installed.
  • Dashboard settings contribution for report visibility.

Dashboard Reports registers these widgets through CapellAdmin::registerDashboardWidget(...):

WidgetPurpose
ContentHealthWidgetShows content issues that need editorial attention.
PublishingTrendChartWidgetShows published and scheduled page activity over time.

ContentHealthWidget is only visible when the resolved content health provider returns at least one issue. Its data is computed and cached by Livewire for 300 seconds.

Dashboard Reports is admin-only. It does not register public frontend routes, public Blade renders, render hooks, or frontend assets in the current implementation.

The screenshot contract is stored in screenshots.json. Final capture should seed enough page state to show both the publishing trend chart and content health widget on the admin dashboard.

The package reads Capell core Page records through SiteScope::applyForCurrentActor(...), so editors only see counts for sites they can access.

ReportSource
Scheduled pagesPage::pending()
Expired pagesPage::expired()
Pages without URLsPages without related page URL records
Stale pagesPublished pages older than the configured stale-day threshold
Publishing trendPublished and scheduled page counts bucketed across the selected date range

Dashboard Reports does not create reporting tables. It computes the current dashboard state from the installed site’s page records.

If a project needs different content health rules, bind Capell\Admin\Contracts\Dashboard\ContentHealthDataProvider before the Dashboard Reports admin provider boots. The package only replaces the admin null provider; it will not override a real provider already registered by the host app or another package.

Put new report calculations in src/Actions/Dashboard/ and keep Filament widgets thin. Tests should target the Action output first, then widget visibility where needed.

Install the package in a host Capell app:

Terminal window
composer require capell-app/dashboard-reports

Then verify the package in this repository with:

Terminal window
vendor/bin/pest packages/dashboard-reports/tests --configuration=phpunit.xml