Developer migrates live SaaS from Vercel and Supabase to a single Cloudflare Worker
A developer running ReddTrends, a small SaaS platform with a few hundred users, migrated the entire application from Next.js on Vercel and Supabase to a single Cloudflare Worker without downtime. The stack swap replaced Supabase Postgres with Cloudflare D1 (SQLite), Supabase Auth with Better Auth, and GitHub Actions cron jobs with Cloudflare Cron Triggers and Workflows. One of the trickiest challenges was handling 938 existing bcrypt password hashes from GoTrue, which the developer resolved by writing a compatibility verification function that checks hash format at login rather than forcing a mass password reset. Migrating data to D1 required a four-step pipeline — export, transform, import, and verify — to handle SQLite's lack of native booleans, timestamps, and JSON types, while also working around D1's 100,000-byte SQL statement limit. The developer noted that rebuilding on a TanStack Start boilerplate targeting Workers natively avoided the need for an adapter layer, making the migration feasible for a small app.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in