CollaboKeys can be run directly from source for development or packaged into a distributable macOSDocumentation 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.
.app bundle and .dmg installer using electron-builder. Both paths require compiling a small C helper that performs the low-level keyboard emulation through the macOS ApplicationServices framework.
Prerequisites
Before building, make sure the following are available on your system:- Node.js — provides
npmand the JavaScript runtime that runs both the server and the Electron app - Xcode Command Line Tools — required for
clangto compile the C keyboard helper; install with: - macOS — the host-side server and packaged app target darwin only; the client webpage runs in any browser on any platform
Clone and install
Install dependencies
package.json:| Package | Type | Purpose |
|---|---|---|
socket.io | Runtime | Real-time WebSocket communication between server and players |
winston | Runtime | Structured logging to files and the admin page |
electron | Dev | Wraps the Node.js server in a desktop app window |
electron-builder | Dev | Packages the Electron app into a .app bundle and .dmg |
Compile the C keyboard helper
clang command directly from package.json:arm64) and Intel (x86_64) Macs. The compiled binary is written to src/emulate/helper and is used at runtime to forward keypress events to the active application.You must recompile the helper any time
src/emulate/helper.c changes. The npm run build script runs compile automatically before packaging, so a manual compile step is only needed for local development with npm start or npm test.Run modes
CollaboKeys supports three modes depending on your goal:| Command | Entry point | Use case |
|---|---|---|
npm start | electron . → src/main.js | Local development or hosting a session with the full desktop UI |
npm test | node src/server.js | Headless testing or running on a machine without a display |
npm run build | npm run compile && electron-builder | Producing a distributable for others to download |
npm run release | npm run compile && electron-builder --publish always | Building and publishing the app directly to GitHub Releases |
npm test runs the server via Node.js directly, bypassing Electron entirely. The app.* settings in src/config.json (splash screen time, display sleep prevention, DevTools) are ignored in this mode.Packaging details
Theelectron-builder.yml file at the project root controls how the app is packaged. The key configuration values are:
electron-builder.yml
- The build target is
dmg, producing both a.appbundle and a.dmgdisk image in thedist/folder - The compiled C helper at
src/emulate/helperis copied into the app bundle as an extra resource under the namehelper - README files, markdown, and source map files inside
node_modulesare excluded to keep the bundle size down - The
identity: nullfield means the app is not code-signed through Apple’s Developer Program - The
"os": ["darwin"]field inpackage.jsondeclares macOS as the only supported build target
Contributing
Before opening a pull request, discuss the change you want to make via a GitHub Issue or another channel with the repository owners. Then follow these steps to keep the repository clean:- Remove build artifacts — delete the
dist/folder before committing; generated binaries and installers should not be checked into source control - Update the README — document any interface changes, including new configuration options, new CLI commands, new exposed ports, or changed file locations
- Increment the version — bump the
versionfield inpackage.jsonfollowing semver to reflect the scope of changes in the pull request