FIG. 01
Boot sequence
plugins_loaded → providersflowchart TD WP([WordPress core]):::wp -->|plugins_loaded| ENTRY["wp-plugin-matrix-starter.php
constants · autoload · (de)activation"]:::life ENTRY --> BS["app/bootstrap.php"]:::core BS --> APP["Core/Application — Container
+ Facade (Asset · Cache · Config)"]:::core BS --> ASP["AppServiceProvider"]:::prov BS --> ADP["AdminServiceProvider"]:::prov ASP -->|"include routes.php + hooks.php"| WIRE["Router (REST + AJAX) · Hook · InitHook
+ Localized Routes (window.wppmRoutes)"]:::http ADP -->|register pages| ADMIN["AdminPage / ListPage
AdminMenu · SettingsListPage · wppmListPages"]:::admin ADMIN -.->|auto 5 REST routes| WIRE classDef wp fill:#ddd5c2,stroke:#8b8676,stroke-width:1.4px,color:#17150f; classDef core fill:#e9e2d0,stroke:#17150f,stroke-width:1.4px,color:#17150f; classDef prov fill:#ece4dc,stroke:#6b5b7a,stroke-width:1.4px,color:#17150f; classDef http fill:#e6e8df,stroke:#3f6f5e,stroke-width:1.4px,color:#17150f; classDef admin fill:#efe6d4,stroke:#9a6a2e,stroke-width:1.4px,color:#17150f; classDef life fill:#e8e3d6,stroke:#6b6b6b,stroke-width:1.4px,color:#17150f;
FIG. 02
Request & data flow
runtime · nonce → wpdbflowchart LR JS["Admin JS
reads window.wppmRoutes"]:::http -->|REST / AJAX| ROUTER["Core/Router"]:::http ROUTER -->|nonce · method · capability| CTRL["Http/Controllers/*"]:::http CTRL -->|fill| MODEL["Model/BaseModel
fill · validate · save · paginate"]:::data MODEL --> VALID["Core/Validator
(Rules)"]:::data MODEL --> WPDB[("wpdb tables")]:::data classDef http fill:#e6e8df,stroke:#3f6f5e,stroke-width:1.4px,color:#17150f; classDef data fill:#f0e3d8,stroke:#8a5a3c,stroke-width:1.4px,color:#17150f;
FIG. 03
Lifecycle & migrations
activation → uninstallflowchart LR ACT["register_activation_hook"]:::life --> LC["Core/Lifecycle::onActivate"]:::life LC --> MIG["Migrator::run()
scan database/migrations/"]:::data MIG --> WPDB[("wpdb")]:::data LC --> SEED["do_action
wppm/lifecycle/seed_defaults"]:::life LC --> CRON["filter
wppm/lifecycle/cron_events"]:::life CRON --> SCHED["wp_schedule_event"]:::life LC --> EVT["do_action wppm/activated"]:::life UNINSTALL["uninstall.php"]:::life --> UNI["Lifecycle::onUninstall
(gated: wppm/uninstall_destructive)"]:::life classDef life fill:#e8e3d6,stroke:#6b6b6b,stroke-width:1.4px,color:#17150f; classDef data fill:#f0e3d8,stroke:#8a5a3c,stroke-width:1.4px,color:#17150f;
FIG. 04
Demo overlay — Task kitchen-sink
prunable via wp matrix:clean
flowchart TD
subgraph DEMO["Demo — wp matrix:clean removes all of this"]
TMODEL["Model/Task + CreateTasksTable migration"]:::demo
TLIST["Admin/TasksListPage (ListPage → 5 REST routes)"]:::demo
TCTRL["Http/Controllers/TasksController
[wppm-tasks] shortcode · tasks.stats (Cache)"]:::demo
TCPT["Hooks/TaskCptHandler — 'task' CPT"]:::demo
TCRON["Hooks/TaskCronHandler — cron via lifecycle filter"]:::demo
TSEED["Hooks/TaskSeedHandler — seed + Notice (Config-gated)"]:::demo
CLEAN["Cli/CleanCommand — manifest + preflight"]:::demo
end
PERM["AppServiceProvider: Config/Cache bindings
(PERMANENT — survives clean)"]:::prov
TCTRL -.->|uses| PERM
CLEAN -.->|does NOT touch| PERM
classDef demo fill:#f3ddd4,stroke:#cf3b22,stroke-width:1.5px,color:#17150f;
classDef prov fill:#ece4dc,stroke:#6b5b7a,stroke-width:1.4px,color:#17150f;
FIG. 05
Module tree
app/flowchart LR ROOT["app/"]:::core ROOT --> CORE["Core/ — Application, Container, Router, Hook,
AdminPage, ListPage, Lifecycle, Asset, Cache, Config, Validator, Facade"]:::core ROOT --> PROVD["Providers/ — App · Admin"]:::prov ROOT --> HTTPD["Http/Controllers/"]:::http ROOT --> HOOKD["Hooks/Handlers/"]:::core ROOT --> MODELD["Model/ — BaseModel, Settings"]:::data ROOT --> ADMIND["Admin/ — AdminMenu, SettingsListPage"]:::admin ROOT --> DBD["Database/Migrations/ — Migrator + base"]:::data ROOT --> FACD["Facades/ — Asset, Cache, Config"]:::core ROOT --> HELPD["Helpers/ — SettingsPage, Notice, CPT, Cron"]:::core ROOT --> CLID["Cli/ — make:* generators + CleanCommand"]:::demo DBFILES["database/migrations/ (root) — Migration FILES"]:::data classDef core fill:#e9e2d0,stroke:#17150f,stroke-width:1.4px,color:#17150f; classDef prov fill:#ece4dc,stroke:#6b5b7a,stroke-width:1.4px,color:#17150f; classDef http fill:#e6e8df,stroke:#3f6f5e,stroke-width:1.4px,color:#17150f; classDef admin fill:#efe6d4,stroke:#9a6a2e,stroke-width:1.4px,color:#17150f; classDef data fill:#f0e3d8,stroke:#8a5a3c,stroke-width:1.4px,color:#17150f; classDef demo fill:#f3ddd4,stroke:#cf3b22,stroke-width:1.4px,color:#17150f;