Environment
One set of keys feeds every app.
Locally the values come from the Infisical dev environment, loaded by the root scripts (see secrets). A .env at the repo root is optional and git-ignored. packages/env validates every value with zod, so a bad one fails at start with a clear message. .env.example lists every key with its default.
Urls
| Key | What it is |
|---|---|
API_URL | how the Next servers reach the api, an internal address on docker |
API_PUBLIC_URL | the api url the browser can reach |
WEB_URL | the landing page |
WHATSAPP_CONTACT_NUMBER | the landing page WhatsApp button: country code and number, a leading + and spaces are ignored. Empty hides the button |
DASHBOARD_URL | the dashboard |
DOCS_URL | this site; apps/web reads it through packages/env for the Docs links on the landing page |
Database and auth
| Key | What it is |
|---|---|
DATABASE_URL | postgres connection string |
POSTGRES_PORT | host port of the local docker postgres |
POSTGRES_USER, POSTGRES_DB | role and database of the docker postgres, default ritorno (staging and production keep le_hoetel, see deploy runbook) |
SEED | demo fills an empty database with demo data, none never seeds. Defaults to demo in the api (local, previews, staging deploys set it), none in the compose files. Ignored with a warning when DEPLOY_ENV=production, or when DEPLOY_ENV is unset or local and the database is on another machine |
DEMO_PASSWORD | password of the seeded demo accounts, default demo-ritorno-2026. The default is public: previews and docker-compose.deploy.yml (staging) get their own value. Read only while seeding an empty database |
DEMO_VIEWER_PASSWORD | password of the view only sales viewer, its own and never DEMO_PASSWORD. Unset on a deployed env (DEPLOY_ENV other than local) means the account is not created; locally it defaults to demo-ritorno-2026. Read only while seeding an empty database |
BETTER_AUTH_SECRET | openssl rand -base64 32 |
ADMIN_EMAIL, ADMIN_PASSWORD | the first admin, created or reset on every api start |
LEADS_NOTIFY_EMAIL | who is emailed when a hotel requests a demo on the landing page, defaults to ADMIN_EMAIL |
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | optional github sign-in |
GITHUB_REPO, GITHUB_TOKEN | repo for the landing page stars and the feedback widget, and a token with Issues: write on it |
Messaging
| Key | What it is |
|---|---|
MESSAGING_LIVE | true lets email and whatsapp really send, default false |
RESEND_API_KEY, EMAIL_FROM, RESEND_WEBHOOK_SECRET | email through Resend, and its bounce and complaint webhook |
KAPSO_API_KEY, WHATSAPP_PHONE_NUMBER_ID, KAPSO_WEBHOOK_SECRET | whatsapp through Kapso, and its status webhook |
WHATSAPP_BUSINESS_NUMBER | the shared number behind that phone id, digits only: the QR page's Continue on WhatsApp button. Empty hides it |
Messages only leave the server when NODE_ENV=production and MESSAGING_LIVE=true. Everywhere else (local, tests, previews, staging) every channel logs message not sent, log-only provider with the channel and template name, never the recipient or the text. Only the production deploy sets MESSAGING_LIVE=true, so a preview can never message a real guest even with real keys in its env.
Keys for modules you left out of the project are not in .env.example. Adding a key means adding it to the zod schema in packages/env first.