Names of modules that live under modules/default/. Populated during start().
Ensures every client listed in config has a configs/<name>/ folder and an entry JS file.
Clients without a folder are removed from config.clientConfigs so the rest of startup
doesn't have to handle missing directories.
Builds the full module map from the DB — keyed by client name. Each entry contains the unauthenticated default modules and every assigned user's config. Clients missing a DB record are skipped with an error log.
Deduplicates all module names referenced across every client and user config.
Loads, wires, and starts a helper on demand — called when a mirror requests a module that wasn't active at startup. No-op if the helper is already running.
Merges a flat module list with any modules embedded in a layout. Layout modules are appended only when not already present in the flat list, so an explicit flat entry always wins over the layout default.
Resolves each user's module config for a specific mirror.
Falls back from client-specific row → global row (clientName "") → empty module list.
Security gate for third-party helpers — reads and validates module.json.
Returns null (blocking the helper from loading) if the manifest is missing,
malformed, or declares any permission not in the known allowlist.
PrivateloadLoads helpers for all modules referenced in any client config at startup.
Does NOT wire Express/Socket.IO yet — that happens in start() after the server is ready.
PrivatemodulePrivatewire
Application kernel — owns configuration, module lifecycle, and the HTTP/Socket server.
Startup order:
new Core(rootDir)→start(). Everything else (DB, server, helpers) is initialised insidestart().