All CollaboKeys behavior is controlled by a single file —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tinkerer9/collabokeys/llms.txt
Use this file to discover all available pages before exploring further.
src/config.json. The file is read once at server boot, so changes take effect on the next server start. No live reload or restart mid-session is required for most settings, since they are applied during initialization.
Default configuration
src/config.json
Admin Page (adminPage.*)
Enable the admin page. Set to
false to rely solely on the CLI console for server controls. When disabled, any WebSocket connection to the /admin namespace is immediately rejected and disconnected.Password required to authenticate on the admin page. An empty string (
"") means no password is required — any visitor to the admin page is granted access automatically. It is strongly recommended to set a password when the server is accessible to others on the network.Automatically authenticate connections that originate from localhost (
127.0.0.1 or ::1). When enabled, the host opening the admin page on their own machine is granted admin access without entering a password — even when a password is configured for remote users.Electron App (app.*)
These settings only apply when running CollaboKeys as an Electron app via
npm start. They are ignored when running the server headlessly with npm test.Prevents macOS from sleeping the display while CollaboKeys is open. Uses Electron’s
powerSaveBlocker API with the prevent-display-sleep mode. If the blocker fails to start, a warning is logged but the app continues normally.Minimum time in milliseconds that the splash screen is shown before the app switches to the admin dashboard. If the server starts faster than this value, the app waits for the remainder. If the server takes longer, the splash screen stays until the server is ready regardless of this setting.
Allows Chromium DevTools to be opened inside the Electron window. Not recommended for production use — enabling this exposes the full browser developer toolset to anyone with physical access to the host machine.
Console (console.*)
Enables CLI console commands in the terminal. When set to
false, the readline interface is still initialized but all input is ignored. Disable this if you want to prevent keyboard interaction with the running process without fully detaching stdin.Logging (logs.*)
Enables the
/logs, /logs/error, and /logs/warn HTTP endpoints. When enabled, anyone who can reach the server can view log output in their browser. Disable this if you want to restrict log access to the host machine only.An array of Winston transport names that determine which log files are created in the
logs/ directory. Each entry in the array becomes a separate log file (e.g., logs/combined.log, logs/error.log, logs/warn.log). These same names are used as URL paths under /logs/.Clears all files in the
logs/ directory each time the server starts. Useful for keeping disk usage low during repeated testing sessions. Set to false to preserve logs across restarts for post-session review.Player (player.*)
Minimum username length, inclusive. Players submitting a name shorter than this value receive an error and must choose a longer name before they can interact with the game.
Maximum username length, inclusive. Players submitting a name longer than this value receive an error and must shorten their name.
A regular expression pattern tested against a player’s submitted username. The name is accepted only if the pattern matches. The default pattern
[a-zA-Z0-9] ensures names contain at least one alphanumeric character, preventing blank or symbol-only names.When set to
true, newly connected players are automatically placed in the waiting room instead of joining the active session immediately. The admin must explicitly admit them using the waitingroom admit <id/all> command or the admin page controls.Maximum number of keys a single player can reserve. Once a player reaches this limit, additional keypresses will not claim new keys for them. Set to
0 to impose no limit, allowing each player to accumulate as many keys as they press.Server (server.*)
Port preference order for the HTTP server. CollaboKeys tries each port in sequence; if a port is already in use (
EADDRINUSE), it moves to the next. If all listed ports are unavailable, the server falls back to port 0, which asks the OS to assign a random available port.Global options
When
true, keydown and keyup events are emulated separately, allowing keys to be physically held down in the target game for as long as the player holds them in their browser. When false, every keypress is treated as a quick tap — a keydown followed immediately by a keyup — regardless of how long the player holds the key.Whether keyboard emulation is active when the server first starts. If set to
false, the server accepts keypresses from players but does not forward them to the OS until emulation is manually enabled via the enable emulation command or admin page.Whether automatic key reservation is active when the server starts. When
true, the first player to press an unclaimed key is assigned that key. When false, keypresses are processed but keys are not automatically reserved until reservation is manually enabled.Global rate limit for keypresses across all connected players per clock minute. Once the limit is reached, further keypresses are dropped until the next minute begins. Set to
0 to disable rate limiting entirely.Editing the config file
The configuration file is located atsrc/config.json relative to the project root. It can be edited with any text editor — VS Code, nano, vim, or any JSON-capable editor. After saving your changes, restart the server for them to take effect.