# mekkumar/module-store-health architecture

> Architecture diagram of the GitHub repository mekkumar/module-store-health, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mekkumar/module-store-health
- Repository: https://github.com/mekkumar/module-store-health

## Overview

StoreHealth AI is a Magento Admin health dashboard. An administrator opens the dashboard, then its check endpoint invokes HealthChecker and returns JSON containing store checks, a score, attention items, and opportunities. The sampled checker implements product, category, cache, indexer, and cron signals. The README also describes the business-facing dashboard capabilities; unsampled presentation wiring and any AI or external analytics integrations are not mapped as implemented.

Main entry points: [`Model/Health/HealthChecker.php`](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php) (Health checker), [`Controller/Adminhtml/Dashboard/Check.php`](https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Check.php) (Health check endpoint), [`view/adminhtml/templates/dashboard.phtml`](https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/templates/dashboard.phtml) (Dashboard view), [`Controller/Adminhtml/Dashboard/Index.php`](https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Index.php) (Dashboard page action)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin dashboard"]
  node_dashboard_index["Dashboard page action<br/>[Index.php]"]
  node_dashboard_block["Dashboard block<br/>[Dashboard.php]"]
  node_dashboard_view["Dashboard view<br/>[dashboard.phtml]"]
  node_dashboard_js["Dashboard JavaScript<br/>[dashboard.js]"]
  node_dashboard_css["Dashboard styles<br/>[dashboard.css]"]
  node_check_endpoint["Health check endpoint<br/>[Check.php]"]
end

subgraph group_checks["Health analysis"]
  node_checker["Health checker<br/>[HealthChecker.php]"]
  node_product_health["Product health<br/>[HealthChecker.php]"]
  node_category_health["Category health<br/>[HealthChecker.php]"]
  node_cache_health["Cache health<br/>[HealthChecker.php]"]
  node_indexer_health["Indexer health<br/>[HealthChecker.php]"]
  node_cron_health["Cron health<br/>[HealthChecker.php]"]
  node_score_attention["Score and insights<br/>[HealthChecker.php]"]
end

subgraph group_magento["Magento signals"]
  node_product_catalog[("Magento products")]
  node_category_catalog[("Magento categories")]
  node_cache_manager["Magento cache manager"]
  node_indexer_service[("Magento indexers")]
  node_cron_schedule[("Magento cron schedule")]
end

node_administrator(("Administrator"))

node_administrator -->|"opens"| node_dashboard_index
node_dashboard_index -.->|"renders dashboard"| node_dashboard_block
node_dashboard_block -->|"provides check URL"| node_check_endpoint
node_dashboard_view -.->|"initializes"| node_dashboard_js
node_dashboard_view -.->|"uses styles"| node_dashboard_css
node_check_endpoint -->|"runs checks"| node_checker
node_checker -->|"computes"| node_product_health
node_checker -->|"computes"| node_category_health
node_checker -->|"computes"| node_cache_health
node_checker -->|"computes"| node_indexer_health
node_checker -->|"computes"| node_cron_health
node_checker -->|"builds insights"| node_score_attention
node_product_health -->|"queries"| node_product_catalog
node_category_health -->|"counts"| node_category_catalog
node_cache_health -->|"reads status"| node_cache_manager
node_indexer_health -->|"checks states"| node_indexer_service
node_cron_health -->|"counts jobs"| node_cron_schedule
node_check_endpoint -->|"returns JSON"| node_administrator

click node_dashboard_index "https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Index.php"
click node_dashboard_block "https://github.com/mekkumar/module-store-health/blob/main/Block/Adminhtml/Dashboard.php"
click node_dashboard_view "https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/templates/dashboard.phtml"
click node_dashboard_js "https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/web/js/dashboard.js"
click node_dashboard_css "https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/web/css/dashboard.css"
click node_check_endpoint "https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Check.php"
click node_checker "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_product_health "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_category_health "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_cache_health "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_indexer_health "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_cron_health "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"
click node_score_attention "https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard_index,node_dashboard_block,node_dashboard_view,node_dashboard_js,node_dashboard_css,node_check_endpoint toneBlue
class node_checker,node_product_health,node_category_health,node_cache_health,node_indexer_health,node_cron_health,node_score_attention toneAmber
class node_product_catalog,node_category_catalog,node_cache_manager,node_indexer_service,node_cron_schedule toneMint
class node_administrator toneIndigo
```

## Components

### Admin dashboard

- [Dashboard page action](https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Index.php): `Controller/Adminhtml/Dashboard/Index.php`
- [Dashboard block](https://github.com/mekkumar/module-store-health/blob/main/Block/Adminhtml/Dashboard.php): `Block/Adminhtml/Dashboard.php`
- [Dashboard view](https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/templates/dashboard.phtml): `view/adminhtml/templates/dashboard.phtml`
- [Dashboard JavaScript](https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/web/js/dashboard.js): `view/adminhtml/web/js/dashboard.js`
- [Dashboard styles](https://github.com/mekkumar/module-store-health/blob/main/view/adminhtml/web/css/dashboard.css): `view/adminhtml/web/css/dashboard.css`
- [Health check endpoint](https://github.com/mekkumar/module-store-health/blob/main/Controller/Adminhtml/Dashboard/Check.php): `Controller/Adminhtml/Dashboard/Check.php`

### Health analysis

- [Health checker](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Product health](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Category health](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Cache health](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Indexer health](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Cron health](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`
- [Score and insights](https://github.com/mekkumar/module-store-health/blob/main/Model/Health/HealthChecker.php): `Model/Health/HealthChecker.php`

### Magento signals

- **Magento products**
- **Magento categories**
- **Magento cache manager**
- **Magento indexers**
- **Magento cron schedule**

### Other components

- **Administrator**

## Connections

- Administrator → Dashboard page action: opens (evidence: `README.md`)
- Dashboard page action → Dashboard block: renders dashboard (evidence: `Controller/Adminhtml/Dashboard/Index.php`)
- Dashboard block → Health check endpoint: provides check URL (evidence: `Block/Adminhtml/Dashboard.php`)
- Dashboard view → Dashboard JavaScript: initializes
- Dashboard view → Dashboard styles: uses styles
- Health check endpoint → Health checker: runs checks (evidence: `Controller/Adminhtml/Dashboard/Check.php`)
- Health checker → Product health: computes (evidence: `Model/Health/HealthChecker.php`)
- Health checker → Category health: computes (evidence: `Model/Health/HealthChecker.php`)
- Health checker → Cache health: computes (evidence: `Model/Health/HealthChecker.php`)
- Health checker → Indexer health: computes (evidence: `Model/Health/HealthChecker.php`)
- Health checker → Cron health: computes (evidence: `Model/Health/HealthChecker.php`)
- Health checker → Score and insights: builds insights (evidence: `Model/Health/HealthChecker.php`)
- Product health → Magento products: queries (evidence: `Model/Health/HealthChecker.php`)
- Category health → Magento categories: counts (evidence: `Model/Health/HealthChecker.php`)
- Cache health → Magento cache manager: reads status (evidence: `Model/Health/HealthChecker.php`)
- Indexer health → Magento indexers: checks states (evidence: `Model/Health/HealthChecker.php`)
- Cron health → Magento cron schedule: counts jobs (evidence: `Model/Health/HealthChecker.php`)
- Health check endpoint → Administrator: returns JSON (evidence: `Controller/Adminhtml/Dashboard/Check.php`)
