Skip to content

Module Structure

The admin dashboard is split into two main Composer packages, consisting of three Magento modules. Hyvä also ships a number of additional dashboard-related packages for additional widget types.

Composer package Magento module Purpose
hyva-themes/commerce-module-admin-dashboard-api Hyva_AdminDashboardApi Widget contract: interfaces, WidgetContext, XSD, constants.
hyva-themes/commerce-module-admin-dashboard Hyva_AdminDashboardFramework + Hyva_AdminDashboardWidgets Runtime + built-in widgets.
hyva-themes/commerce-module-admin-dashboard-cms-widgets Hyva_AdminDashboardCmsWidgets Optional CMS-focused widgets, including Hyvä CMS integration.
hyva-themes/commerce-module-admin-dashboard-google-crux-history-widget Hyva_AdminDashboardGoogleCruxHistoryWidget Optional Google CrUX History widget.

Hyva_AdminDashboardApi

The Hyva_AdminDashboardApi module is the stable contract package for Hyvä Admin Dashboard widgets. It ships only PHP interfaces, the default WidgetContext value object, the widget XSD, and the ConfigurationKeys / WidgetOptions constants - no controllers, no templates, no runtime.

Modules that expose widgets depend on this package; bin/magento setup:di:compile works for them without the dashboard runtime installed. The package is released under the OSL-3.0 license.

See the dedicated Dashboard API page for the full interface listing.

Hyva_AdminDashboardFramework

The Hyva_AdminDashboardFramework module is the dashboard runtime. It contains the controllers, repositories, database schema, setup patches, system configuration, view models, layout XML, base templates, and the JS chart infrastructure.

Widget invocations from the runtime go through Hyva\AdminDashboardFramework\Model\WidgetType\WidgetTypeDispatcher, which checks at runtime whether each widget implements the new Hyva\AdminDashboardApi\Api\V1\WidgetTypeInterface contract or the legacy inheritance-based contract, and dispatches accordingly. This lets legacy and new widgets coexist on the same dashboard. This module also owns the Dashboard Views & Roles feature.

Hyva_AdminDashboardWidgets

The Hyva_AdminDashboardWidgets module ships the default catalog of widget types. See Available Widget Types for the complete widget reference.

Advanced Widgets

In this context, the term "Advanced" or "Custom" widgets refers to the Hyvä-published widget types that ship in their own standalone modules. This is typically done when there are dependencies on other third parties (including ourselves), the widget needs to be optional, or the implementation is sufficiently complex to warrant the separation.

  • Hyva_AdminDashboardCmsWidgets - Hyvä CMS-focused widgets
  • Hyva_AdminDashboardGoogleCruxHistoryWidget - Historic Core Web Vitals data