Production foundation

Connect KOLLEGE safely

Protected pages and APIs stay closed until authentication and persistence are configured. No demo identity or in-memory production fallback is enabled.

ClerkRequired
Postgres + HyperdriveRequired
StripeRequired for Premium
Cloudflare R2Configured
AI GatewayRequired for AI tools
Job runnerConfigured

Environment variables

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYPublic Clerk browser key
CLERK_SECRET_KEYPrivate Clerk server key
DATABASE_URLPostgreSQL origin used by Hyperdrive and migration scripts
STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRET / STRIPE_PREMIUM_PRICE_IDPremium billing and verified subscription events
HYPERDRIVE + DATABASE_URLPostgreSQL through Cloudflare Hyperdrive
KOLLEGE_MEDIA + CLOUDFLARE_R2_PUBLIC_URLPrivate drafts and approved public R2 media
KOLLEGE_JOBS + CRON_SECRETCloudflare Queue dispatch with scheduled fallback
CLOUDFLARE_AI_GATEWAY_BASE_URL / TOKENCloudflare model routing for plans, drafts, and tutor chat
NEXT_PUBLIC_APP_URL / KOLLEGE_PUBLIC_URLCanonical learner origin
KOLLEGE_ADMIN_URLCourse Studio and private backend origin
Apply the generated Drizzle migration before opening authenticated flows. Staff roles are stored in KOLLEGE Postgres, not trusted from browser input.