Plugins
A plugin is a JavaScript module KALLH loads at startup, listed in
KALLH_PLUGINS (comma-separated paths or package names). It runs before
KALLH serves anything, and can:
- Register an add-on (
registerAddoninserver/src/addons.ts): an integration that mounts its own API routes and starts its own background jobs (a sync with another booking system, for example). Add-ons can also hook into KALLH’s own flow where it offers a hook, such as before a Stage One run (server/src/stageOneHooks.ts). - Install a host (
installHostinserver/src/host.ts): change how KALLH is hosted: where its events and errors go, an operator’s sign-in into the club, the host’s own routes and startup work. A hosting service uses this to run each club in its own container.
Plugins import KALLH’s modules from its compiled server (server/dist/), so
they share one database pool, one club and one host with the app they
extend. A self-hosted club needs none.