Setup a new gym
Try the demo first
Use Node.js 26 and npm. From the root: npm ci, then
npm run build --workspace sdk and npm run dev:demo.
No real names, phone numbers, secrets or hardware are needed.
The root lockfile covers all four workspaces. Run installs from the repository
root rather than maintaining separate lockfiles in each package. npm test
builds the SDK first and runs the SDK, database, hub and web checks;
npm run typecheck checks the hub and dashboard against the built SDK.
Create a fresh backend
- Create your own Supabase project. Protect its database password in a password manager; never put secrets in Git or chat.
- Enable
pg_cron. Turn off public Auth signups; keep email/password enabled. Set a suitable password policy and use a protected setup terminal. - Run
node supabase/scripts/bundle.mjs. Review the generated SQL and apply it once to an empty project. Do not rerun it on a populated database. - In your terminal set
SUPABASE_URLandSUPABASE_SERVICE_ROLE_KEYusing the project's privileged server key. It must never be used by the browser or hub. - Run
node supabase/scripts/setup.mjs owner "owner@example.com" "Owner". Record the printed password securely; the owner should change it in the app. - Create additional admins with
node supabase/scripts/setup.mjs user "admin@example.com" "Admin" admin. Setup creates accounts, not password recovery. Do not rerun blindly after a partial failure; inspect Auth and application associations first. - Configure Auth Site URL to your eventual dashboard origin. Close the setup terminal when finished and rotate any privileged key that was exposed.
Deploy the dashboard
Copy web/.env.example to web/.env.production.local, using your project URL
and publishable key. Run npm run build --workspace web. Host web/dist
on Cloudflare Pages or another static host at the domain root, with SPA fallback.
The publishable key is safe in the browser because permissions live in Postgres.
Set gym name/contact and other supported settings in the database, enter your plans/prices in the app, and create a tested backup/restore procedure. Keep customer data, exports and backups out of source control.
Add the terminal later
Follow hub setup and the hardware checklist. A running dashboard does not require hardware. Do not expose the terminal protocol to the public internet or assume untested commands are supported.