Skip to main content
Admin Modules

Module Manager

Admin page for enabling and disabling Arcturus-Prime modules, with KV-backed state persistence and sidebar filtering

February 27, 2026

Module Manager

The Module Manager provides a single admin page for toggling Arcturus-Prime modules on and off. Located at /admin/modules. Admin-only.

Core modules (security, module-manager) cannot be disabled. All other modules can be toggled, and the sidebar updates server-side to hide disabled modules.

Module Inventory

27 modules across 6 categories:

CategoryCountModules
infra9proxmox, network-discovery, pentest, cloudflare, homelab, health-monitor, jobs, build-swarm, servers
ai6ollama, email, openclaw, chat, workbench, elevenlabs
content4linkedin-studio, content, public-docs-security, docs-hub
tools3sandbox, argonaut, twilio
system3module-manager, security, api-dashboard
dev2deployments, git

Page UI

  • Card grid showing all registered modules with name, description, version, icon, and enable/disable toggle
  • Core modules display a locked badge; toggle is disabled
  • Summary bar: Total / Enabled / Disabled counts
  • Modules grouped by category
  • Dependency warnings appear when disabling a module that other enabled modules depend on

State Storage

  • KV key: data:module-states
  • Format: { version: 1, states: { [moduleId]: boolean } }
  • Missing entries default to enabled (backward compatible)
  • 30-second in-memory cache (same pattern as dashboard-profiles)
  • Core modules (manifest.core === true) always return enabled regardless of stored state

AdminSidebar.astro reads module states at SSR time via getModuleStates(). For each disabled module, all routes listed in its manifest.pages array are added to a disabledRoutes set. Nav items whose href matches a disabled route are filtered out before rendering.

This happens server-side — no client JS involved. The sidebar re-evaluates module states on every page load (subject to the 30s cache).

API

GET /api/admin/modules

Returns all module manifests with current enabled/disabled state. Requires admin auth.

Response:

{
  "modules": [
    {
      "id": "module-manager",
      "name": "Module Manager",
      "description": "...",
      "version": "1.0.0",
      "icon": "fa-cubes",
      "category": "system",
      "pages": ["/admin/modules"],
      "apiRoutes": ["/api/admin/modules"],
      "dependencies": [],
      "core": true,
      "enabled": true
    }
  ],
  "summary": { "total": 27, "enabled": 27, "disabled": 0 }
}

POST /api/admin/modules

Toggle a single module. Requires admin auth.

Request body: { "id": "string", "enabled": boolean }

Responses:

StatusCondition
200{ ok: true, id, enabled, warnings }
400Missing id or enabled field
403Attempted to disable a core module
404Module ID not found
503KV unavailable

The warnings array contains dependency messages when disabling a module that other enabled modules depend on (e.g., "Module X depends on Module Y").

Source Files

FilePurpose
src/pages/admin/modules.astroModule Manager page
src/pages/api/admin/modules.tsGET list + POST toggle API
src/lib/module-states.tsKV read/write, cache, isModuleEnabled()
src/config/modules/module-manager.tsModule manifest + nav item
src/config/module-registry.tsmoduleManifests, coreModuleIds exports
src/components/admin/AdminSidebar.astroSidebar filtering logic

Security

API endpoint requires Cloudflare Access admin authentication via validateAdmin(). The page is served under /admin/ which is blocked by middleware for non-Arcturus-Prime.com hosts and protected by Cloudflare Access in production.

adminmodulessystemmodule-manager