librelad 2eaa5857a1 feat(webui): phase 0a — feature-module kernel scaffold (passive)
Adds the foundation of the feature-module architecture
(docs/frontend-modularization.md) as inert, additive code:
- kernel/feature-registry.js: window.LP.features — runtime register(),
  manifest loader, route-table + nav builders.
- features/manifest.dev.json: hand-committed manifest mirroring spa.js
  setupRoutes() exactly (route -> handler + navId).
- index.html loads the kernel before spa.js.

Zero behaviour change: nothing consults the registry yet. Phase 0b flips
routing to be registry-driven with the spa.js Map as fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-29 22:28:19 +01:00

66 lines
1.9 KiB
JSON

{
"version": 1,
"note": "Phase-0 hand-committed manifest. Mirrors spa.js setupRoutes() exactly. Will be replaced by the generated /data/webui/generated/features.json once the scan generator lands (see docs/frontend-modularization.md). 'handler' names the LibrePortalSPAClean method that still does the rendering during the strangler migration; 'navId' is the existing topbar element id for active-state highlighting.",
"features": [
{
"id": "dashboard",
"routes": ["/", "/dashboard"],
"handler": "handleDashboard",
"navId": "nav-dashboard",
"nav": { "label": "Dashboard", "order": 10 }
},
{
"id": "apps",
"routes": ["/apps", "/apps*"],
"handler": "handleApps",
"navId": "nav-app-center",
"nav": { "label": "App Center", "order": 20 }
},
{
"id": "app-detail",
"routes": ["/app", "/app*"],
"handler": "handleAppDetail",
"navId": "nav-app-center"
},
{
"id": "admin",
"routes": ["/admin", "/admin*"],
"handler": "handleAdmin",
"navId": "nav-config",
"nav": { "label": "Admin", "order": 40 }
},
{
"id": "config-redirect",
"routes": ["/config", "/config*"],
"handler": "handleConfigRedirect",
"navId": "nav-config"
},
{
"id": "tasks",
"routes": ["/tasks", "/tasks*"],
"handler": "handleTasks",
"navId": "nav-tasks",
"nav": { "label": "Tasks", "order": 60 }
},
{
"id": "backup",
"routes": ["/backup", "/backup*"],
"handler": "handleBackup",
"navId": "nav-backup",
"nav": { "label": "Backups", "order": 50 }
},
{
"id": "peers",
"routes": ["/peers", "/peers*"],
"handler": "handlePeers",
"navId": "nav-config"
},
{
"id": "ssh",
"routes": ["/ssh", "/ssh*"],
"handler": "handleSsh",
"navId": "nav-config"
}
]
}