Swap to Vercel

Cinderblock ships on EC2 + Apache + PM2 by default. The Next.js + Supabase + Stripe stack runs unchanged on Vercel — only the deploy plumbing differs.

What needs to change

1. Deploy

Replace the npm run deploy + rsync flow with vercel deploy. The standalone Next.js build output is irrelevant on Vercel.

2. Audit writer

Vercel serverless functions don't support persistent connections. Cinderblock's direct cb_audit_writerconnection via postgres-js would either thrash connections or you'd hit the connection cap on Supabase's pooler.

Two options:

  • Swap the writer for the Edge Function audit extension — one HTTP round-trip per server action instead of a DB connection.
  • Use Supabase's connection pooler at the session port (:5432), not the transaction pooler — the audit writer needs set local semantics for the impersonation case.

3. Cookie domain

If you split marketing and app across two Vercel projects (one per subdomain), the parent-domain cookie pattern still works — configure NEXT_PUBLIC_COOKIE_DOMAIN on both.

4. Edge Functions vs. Vercel Edge Functions

Cinderblock's Supabase Edge Functions (invitations, Stripe webhook, impersonation OTP) run unchanged. They're hosted by Supabase, not by your Next.js host — Vercel doesn't need to know about them.

What stays the same

  • Every migration
  • Every pgtap test
  • Every Edge Function
  • RLS policies, helpers, the audit pattern
  • The hostile fixture

The stack is portable; the deploy plumbing is the only material delta.