|
| 1 | +# --------------------------------------------------------------------------- |
| 2 | +# Calendars — example environment |
| 3 | +# Copy to .env and adjust. A bare clone runs with NOTHING set here: |
| 4 | +# SQLite file DB, log-only email, local dev auth. Zero infrastructure needed. |
| 5 | +# --------------------------------------------------------------------------- |
| 6 | + |
| 7 | +# --- Database ------------------------------------------------------------- |
| 8 | +# Unset -> SQLite at ./.data/dev.db (the default, zero-infra clone-and-run) |
| 9 | +# file:… -> SQLite file |
| 10 | +# A PostgreSQL connection URL selects Postgres in production. Keep credentials in `.env`. |
| 11 | +# DATABASE_URL=file:./.data/dev.db |
| 12 | +# DATABASE_URL= |
| 13 | + |
| 14 | +# --- API server ----------------------------------------------------------- |
| 15 | +# Port the NestJS API listens on (default 4000). |
| 16 | +API_PORT=4000 |
| 17 | +# Public base URL of the web app, used to build manage/booking links. |
| 18 | +PUBLIC_APP_URL=http://localhost:3000 |
| 19 | + |
| 20 | +# --- Web app -------------------------------------------------------------- |
| 21 | +# Where the web app reaches the API from the server (RSC fetch). Default: |
| 22 | +# http://localhost:4000 |
| 23 | +NEXT_PUBLIC_API_URL=http://localhost:4000 |
| 24 | + |
| 25 | +# The web mirrors the API's AUTH_PROVIDER to pick the right login UX (email form |
| 26 | +# vs WorkOS redirect). Same values as the API's AUTH_PROVIDER. Unset -> local. |
| 27 | +# AUTH_PROVIDER=local |
| 28 | +# |
| 29 | +# Signs/verifies the httpOnly `slate_session` cookie (server-only — never |
| 30 | +# NEXT_PUBLIC_*). Unset in a bare fork = unsigned dev cookie; SET it for any |
| 31 | +# real deployment so the session can't be forged. |
| 32 | +# WEB_SESSION_SECRET=replace-with-a-long-random-string |
| 33 | +# |
| 34 | +# WorkOS provider only: base URL of the upstream IAM identity service that fronts |
| 35 | +# WorkOS AuthKit and mints the platform JWT. The web calls it for the login URL, |
| 36 | +# and redirects through its logout. Server-only; never a secret itself. |
| 37 | +# IAM_BASE_URL=https://iam.example.internal |
| 38 | + |
| 39 | +# --- Growth loop / branding (public pages) --------------------------------- |
| 40 | +# When a signup destination is configured, public pages carry a discreet |
| 41 | +# "Made with Dapta Calendars" footer badge and a secondary signup line on the |
| 42 | +# booking-confirmed screen. Open-core: unset (the bare-fork default) renders |
| 43 | +# neither — no upstream branding is forced on forks; the upstream cloud |
| 44 | +# deployment sets its own signup URL. |
| 45 | +# NEXT_PUBLIC_SIGNUP_URL=https://app.your-cloud.example |
| 46 | +# |
| 47 | +# Every badge/CTA link carries the UTM scheme |
| 48 | +# utm_source=dapta-calendars |
| 49 | +# utm_medium=badge | confirmation (which surface was clicked) |
| 50 | +# utm_campaign=made-with-dapta |
| 51 | +# utm_content=<accountCode> (attribution only — already public in the page URL) |
| 52 | +# |
| 53 | +# Set to hide badge + CTA even when a signup URL is configured (1|true|yes). |
| 54 | +# NEXT_PUBLIC_HIDE_BADGE=1 |
| 55 | + |
| 56 | +# --- Email / notifications ------------------------------------------------ |
| 57 | +# Provider selector. Unset or "log-only" -> emails are logged, not sent |
| 58 | +# (a bare fork still runs booking flows end-to-end). |
| 59 | +# log-only | noop | smtp | http |
| 60 | +EMAIL_PROVIDER=log-only |
| 61 | +MAIL_FROM_EMAIL=bookings@example.com |
| 62 | +MAIL_FROM_NAME=Calendars |
| 63 | + |
| 64 | +# SMTP adapter (EMAIL_PROVIDER=smtp) |
| 65 | +# SMTP_HOST=smtp.example.com |
| 66 | +# SMTP_PORT=587 |
| 67 | +# SMTP_SECURE=false |
| 68 | +# SMTP_USER= |
| 69 | +# SMTP_PASS= |
| 70 | + |
| 71 | +# HTTP mailer adapter (EMAIL_PROVIDER=http) — POSTs each message to an external |
| 72 | +# email service. Wire it to any send endpoint; no provider is hardcoded. |
| 73 | +# EMAIL_HTTP_ENDPOINT=https://email.example.com/api/send |
| 74 | +# |
| 75 | +# Wire/profile: |
| 76 | +# generic — provider-agnostic JSON body + optional Bearer auth (default) |
| 77 | +# transactional-v1 — managed transactional contract + HMAC service auth |
| 78 | +# EMAIL_HTTP_PROFILE=generic |
| 79 | +# transactional-v1 requires the endpoint path `/api/internal/email/send`. |
| 80 | +# |
| 81 | +# generic profile: Bearer token. |
| 82 | +# EMAIL_HTTP_TOKEN= |
| 83 | +# |
| 84 | +# transactional-v1 profile: a stable client id plus a server-only signing |
| 85 | +# secret loaded from the deployment secret manager. The secret is never sent. |
| 86 | +# EMAIL_HTTP_CLIENT_ID=calendars |
| 87 | +# EMAIL_HTTP_SIGNING_SECRET= |
| 88 | +# EMAIL_HTTP_CATEGORY=lifecycle |
| 89 | + |
| 90 | +# --- Auth (dashboard only; public booking pages are always open) ---------- |
| 91 | +# Unset -> local dev auth stub (a fork logs in without any external provider). |
| 92 | +# AUTH_PROVIDER=local |
| 93 | +# |
| 94 | +# DEV ONLY: with AUTH_PROVIDER=local, log in as a specific email instead of the |
| 95 | +# first seeded demo account. The stub resolves the member with this email and |
| 96 | +# JIT-creates a fresh account+member if none exists. (A request may also carry |
| 97 | +# `x-slate-email`, which overrides this.) Ignored in production. |
| 98 | +# DEV_LOGIN_EMAIL=you@example.com |
| 99 | +# |
| 100 | +# DEV ONLY: strict local auth. When true, a request with no identity (no |
| 101 | +# impersonation headers, no x-slate-email) returns 401 instead of falling back |
| 102 | +# to the seeded account — giving local dev a real "logged out" state so the web |
| 103 | +# login/logout flow can bounce to sign-in. Default false = always logged in. |
| 104 | +# AUTH_LOCAL_STRICT=false |
| 105 | +# |
| 106 | +# AUTH_PROVIDER=workos validates a host session token minted by an upstream |
| 107 | +# identity service: an HS256 JWT (claims: sub, account_id, email, name) signed |
| 108 | +# with a shared secret. The SAME validation runs in local dev and remote because |
| 109 | +# the secret is symmetric — nothing environment-specific to fetch. Selecting |
| 110 | +# `workos` without JWT_SECRET fails loud (never falls back to the insecure stub). |
| 111 | +# JWT_ISSUER / JWT_AUDIENCE are enforced only when set. |
| 112 | +# AUTH_PROVIDER=workos |
| 113 | +# JWT_SECRET=replace-with-your-shared-signing-secret |
| 114 | +# JWT_ISSUER=your-identity-issuer |
| 115 | +# JWT_AUDIENCE=your-platform-audience |
| 116 | +# |
| 117 | +# Offline dev: mint a token that this provider will accept (no identity server): |
| 118 | +# pnpm --filter @slate/api auth:mint -- --account acct_dev --sub user_dev |
| 119 | +# then call the API with `Authorization: Bearer <token>`. |
| 120 | + |
| 121 | +# --- Calendar (external free-busy + event write-out) ---------------------- |
| 122 | +# disabled (default) -> no external calendar: slots subtract only local busy and |
| 123 | +# no events are written out (clone-and-run needs nothing here). `external` |
| 124 | +# selects the generic-HTTP ExternalCalendarProvider. |
| 125 | +# CALENDAR_PROVIDER=disabled |
| 126 | +# |
| 127 | +# external needs a backend. Two ways: |
| 128 | +# (a) Self-host / any REST calendar service implementing the /v1 contract: |
| 129 | +# set the base URL + a static bearer; the committed GenericRestWire is used. |
| 130 | +# CALENDAR_PROVIDER=external |
| 131 | +# CALENDAR_API_BASE_URL=https://your-calendar-service.example |
| 132 | +# CALENDAR_API_TOKEN=replace-with-a-bearer-token |
| 133 | +# (b) A real integration platform: point at a PRIVATE overlay module (gitignored, |
| 134 | +# e.g. under deploy/) that supplies the JWT authority + vendor request mapping. |
| 135 | +# The base URL / signing secret stay in this .env or deploy config — never here. |
| 136 | +# CALENDAR_PROVIDER=external |
| 137 | +# CALENDAR_BACKEND_MODULE=/abs/path/to/deploy/calendar/backend.js |
| 138 | +# CALENDAR_HTTP_TIMEOUT_MS=30000 |
0 commit comments