refactor: remove module system integration from admin and CLI

Removes all module-related logic from the admin dashboard, CLI database
initialization, and AdminPages component:

- Drop `initModules` call from `db init` CLI command and simplify the
  completion message to only reflect core feature tables
- Remove `getModuleDashboardStats` and module page routing from admin
  stats actions and update usage documentation accordingly
- Simplify `AdminPagesClient` to remove module page loading, lazy
  components, and module-specific props (`moduleStats`, `modulePageInfo`,
  `routeInfo`, `enabledModules`)
This commit is contained in:
2026-04-14 19:26:48 -04:00
parent 242ea69664
commit 3131df2b71
9 changed files with 415 additions and 239 deletions
+4 -14
View File
@@ -1,16 +1,6 @@
/**
* Admin Navigation Builder (Server-Only)
*
* This file imports from the module registry and should ONLY be used on the server.
* It builds the complete navigation including dynamic module navigation.
*
* IMPORTANT: This file is NOT bundled to ensure it shares the same registry instance
* that was populated during module discovery.
*
* IMPORTANT: We import from '@zen/core' (main package) to use the same registry
* instance that was populated during initializeZen(). DO NOT import from
* '@zen/core/core/modules' as that's a separate bundle with its own registry.
*
*
* IMPORTANT: Navigation data must be serializable (no functions/components).
* Icons are passed as string names and resolved on the client.
*/
@@ -18,7 +8,7 @@
/**
* Build complete navigation sections
* @param {string} pathname - Current pathname
* @returns {Array} Complete navigation sections (serializable, icons as strings)
* @returns {Array} Navigation sections (serializable, icons as strings)
*/
export function buildNavigationSections(pathname) {
const coreNavigation = [
@@ -36,7 +26,7 @@ export function buildNavigationSections(pathname) {
]
}
];
const systemNavigation = [
{
id: 'users',
@@ -52,6 +42,6 @@ export function buildNavigationSections(pathname) {
]
}
];
return [...coreNavigation, ...systemNavigation];
}