generated from MokoConsulting/Template-Joomla
55 lines
2.3 KiB
Markdown
55 lines
2.3 KiB
Markdown
# MokoSuiteInsight
|
|
|
|
Real-time dashboards, KPI monitoring, and alerting for Joomla 6. Chart.js 4 rendering, pluggable data sources.
|
|
|
|
## Quick Reference
|
|
|
|
| Field | Value |
|
|
|---|---|
|
|
| **Package** | `pkg_mokosuitesight` |
|
|
| **Layer** | Standalone (auto-detects installed modules) |
|
|
| **Language** | PHP 8.3+ / JavaScript (Chart.js 4) |
|
|
| **Branch** | develop on `dev`, merge to `main` (protected) |
|
|
| **Wiki** | [MokoSuiteInsight Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteInsight/wiki) |
|
|
|
|
## Architecture
|
|
|
|
Joomla **package** (`pkg_mokosuitesight`) — standalone module, auto-discovers installed MokoSuite data sources.
|
|
|
|
### Optional Integrations
|
|
- Any MokoSuite module — auto-detected via `class_exists()` for data source registration
|
|
- Built-in sources: `crm.contact_count`, `crm.deals_pipeline`, `crm.revenue_monthly`, `pos.daily_sales`, `hrm.headcount`
|
|
|
|
### Helpers (5)
|
|
- `DashboardHelper` — CRUD, widget management, user dashboards
|
|
- `DataSourceHelper` — pluggable metric connectors, query interface
|
|
- `AlertHelper` — threshold monitoring, fire/acknowledge, cooldown
|
|
- `WidgetHelper` — Chart.js data formatting (counter, line, bar, pie, gauge, table, sparkline, heatmap, funnel)
|
|
- `ExportHelper` — CSV from any widget, dashboard snapshot logging
|
|
|
|
### Key Patterns
|
|
- Data sources register themselves — each MokoSuite module provides a `DataSource` class
|
|
- AlertHelper skips non-scalar data sources (prevents false triggers on list-type sources)
|
|
- Widget rendering is server-side data + client-side Chart.js
|
|
|
|
## Source Directory
|
|
|
|
- `source/pkg_mokosuitesight.xml` — package manifest
|
|
- `source/packages/` — sub-extensions
|
|
|
|
## Rules
|
|
|
|
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js`
|
|
- **Attribution**: `Authored-by: Moko Consulting`
|
|
- **Workflow directory**: `.mokogitea/`
|
|
- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files
|
|
- **Standards**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki)
|
|
- **Changelog**: `[Unreleased]` only — release system assigns versions
|
|
|
|
## Coding Standards
|
|
|
|
- PHP 8.3+ / Joomla 6 patterns
|
|
- `$this->getDatabase()` in models, `Factory::getContainer()->get(DatabaseInterface::class)` in helpers
|
|
- `Factory::getApplication()->getIdentity()` for user
|
|
- Chart.js config passed as JSON from PHP — no inline JS in views
|