2026-06-01infra

Cloudflare deployment path added for the Next.js app

  • Change: Added Cloudflare Workers deployment scaffolding using the OpenNext adapter (open-next.config.ts and wrangler.jsonc), new preview/deploy scripts, and a database URL fallback so the PostgreSQL client can read either DATABASE_URL or POSTGRES_URL.
  • Why: The app is moving off Vercel while keeping the Next.js App Router, Drizzle schema, and Better Auth setup intact; this gives the project a Cloudflare deploy path without a database rewrite.
  • Affected Modules: package.json, open-next.config.ts, wrangler.jsonc, lib/db.ts, drizzle.config.ts
  • Trade-offs:
    • Pro: Minimal refactor path; the current app structure can deploy on Cloudflare Workers with only adapter/config changes.
    • Con: The database still relies on PostgreSQL connectivity, so Cloudflare deployment remains dependent on the external database setup and the correct runtime connection string.