Configuration Reference

Complete reference for environment variables, Wrangler configuration, and SvelteKit config.

Environment Variables

Authentication

# Auth.js secret for session encryption
AUTH_SECRET=random-string-32-chars

# Google OAuth
AUTH_GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
AUTH_GOOGLE_CLIENT_SECRET=GOCSPX-xxx

# Microsoft Entra ID
AUTH_MICROSOFT_ENTRA_ID_ID=xxx
AUTH_MICROSOFT_ENTRA_ID_SECRET=xxx

Database

# Write database (Neon primary region)
WRITE_DATABASE_URL=postgres://user:[email protected]/neondb

# Read database (for queries)
READ_DATABASE_URL=postgres://user:[email protected]/neondb

# Read replicas for migrations (JSON)
READ_DATABASE_MIGRATION_ONLY_URLS={"EU":"postgres://...","APAC":"postgres://..."}

JWT Keys

Analytics

Cloudflare (Deployment)

Wrangler Configuration

File: wrangler.toml

The Wrangler configuration defines Worker settings, build commands, placement mode, R2 bindings, and environment-specific overrides. Key configurations:

  • Placement Mode: Smart (intelligent routing)

  • Compatibility: Node.js compatibility enabled

  • R2 Bindings: IMAGES_BUCKET for file storage

For deployment strategies and smart placement details, see Architecture: Cloudflare Deployment.

SvelteKit Configuration

File: svelte.config.js

Vite Configuration

File: vite.config.ts

Drizzle Configuration

File: drizzle.config.ts

TypeScript Configuration

File: tsconfig.json


Last updated: October 2025

Last updated