Deploy
Compass deploys as a web frontend plus a Node backend.
Runtime Requirements
To support Google sign-in and sync in non-local environments, you need:
- an HTTPS-accessible web origin
- an HTTPS-accessible API origin
- matching Google OAuth redirect/origin configuration
- backend env files for the target environment
For staging or production:
- Put runtime values in
packages/backend/.env.stagingorpackages/backend/.env.production. - Set
FRONTEND_URLto the public web app URL. - Set
BASEURLto the public API base URL, including/api. - Set
CORSto the comma-separated list of allowed origins for the backend. - Ensure Google Cloud OAuth settings include the deployed web origin and redirect URIs.
Web
Build command:
bun run build:web
Bun bundles static assets to build/web. Serve those assets from any static host or reverse proxy setup that can serve the app and version.json.
Backend (API)
Build command:
bun run build:backend --environment staging
The backend build uses Bun.build() to produce a single bundled file at build/backend/app.js,
alongside a .env file copied from the selected environment and a minimal node_modules/
containing only required native modules such as saslprep.
Runtime entrypoint:
cd build/backend && bun app.js
Bun loads .env from the working directory, so cd into the build dir before running.
Deployment notes:
- backend requires MongoDB and SuperTokens; Google credentials are optional and only needed for Google auth and Google Calendar sync
- if you run behind a reverse proxy, configure buffering/timeouts for long-lived
text/event-streamresponses (SSE) - Google Calendar webhook notifications require
BASEURLto be a public HTTPS API URL