Environment Config
Environment Config
Section titled “Environment Config”This page consolidates config for local and production Bookmarks deployments.
Worker: workers/bookmarks-api-worker
Section titled “Worker: workers/bookmarks-api-worker”Required bindings
Section titled “Required bindings”DB(D1): Bookmarks database (bookmarks)AUTH_SERVICE(service binding):cosmos-auth-workerDISCUSSION_ROOM(Durable Object): realtime room classBOOKMARKS_MEDIA(R2): media bucket (bookmarks-media)
Required variables
Section titled “Required variables”| Variable | Local default | Production |
|---|---|---|
AUTH_MODE | dev | service |
Notes:
AUTH_MODE=devenables local/dev auth behavior.AUTH_MODE=serviceexpects first-party auth viaAUTH_SERVICE.
Flutter app: apps/bookmarks_app
Section titled “Flutter app: apps/bookmarks_app”Primary runtime define used in local/dev:
API_BASE_URL(for examplehttp://127.0.0.1:8787locally, worker domain in prod)
Marketing site: apps/bookmarks_site
Section titled “Marketing site: apps/bookmarks_site”| Variable | Purpose |
|---|---|
PUBLIC_BOOKMARKS_APP_URL | URL used by /auth/open-app redirect to app shell |
PUBLIC_APP_LOGIN_URL | Optional override for login CTA target |
Auth worker prerequisites (external dependency)
Section titled “Auth worker prerequisites (external dependency)”The API worker relies on cosmos-auth-worker being correctly configured.
Minimum expected production configuration:
APP_URLpoints to deployed Bookmarks app URL.MAIL_SERVICEbinding is healthy for verification/reset emails.JWT_SECRETconfigured.ENCRYPTION_KEYconfigured.
Quick validation checklist
Section titled “Quick validation checklist”GET /healthreturnsok: truefrom bookmarks API worker.- Login/register/refresh proxies succeed.
- Authenticated
/v1/mereturns user context. - Club stream websocket connects for a club member.