# hyprcrd plugin system — mindmap A complete architectural reference. Don't lose state on this — every detail here was learned the hard way during the canvas/tests/email plugin builds. ``` hyprcrd plugin system │ ├── Discovery (PHP) │ ├── src/PluginManager.php (singleton) │ │ ├── scan(dir) → reads each subdir's plugin.json │ │ ├── loadDisabled(stateFile) → reads data/plugins.json {disabled: [...]} │ │ ├── loadBackends() → require_once enabled backend.php files │ │ └── isEnabled(name) → checked by cssLinks/htmlFragments/scriptTags │ └── src/bootstrap.php (call order matters!) │ 1. config.php │ 2. Database.php │ 3. PluginManager.php │ 4. PluginManager::scan(public/plugins) │ 5. PluginManager::loadDisabled(dirname(DB_PATH).'/plugins.json') │ 6. PluginManager::loadBackends() ← AFTER loadDisabled, so disabled plugins skip backend.php too │ ├── plugin.json manifest format │ ├── name (string, unique) │ ├── version (string) │ ├── description (string) │ ├── frontend │ │ ├── js: [...] (loaded as │ ├── Then plugin entries: scriptTags() ?> │ ├── Then core ES module: