Migrate from Vercel / Next.js

Off Vercel, onto Cloudflare — two paths, and we won't blur them.

There's no Next.js template to drop into — microservices.sh templates are SvelteKit. So be honest about scope. Path 1 keeps Next.js and moves the host to Cloudflare via OpenNext; that is a host migration, not a microservices.sh app. Path 2 rebuilds the backend onto governed modules and keeps or rebuilds the frontend. This page lays out both and points at the right skill.

pnpm create microservices-app@latest my-app --template saas-starter-sveltekit

Local-first · no login · Node ≥ 20 · driven by the vercel-next-to-cloudflare agent skill

Concept mapping

How Vercel / Next.js maps onto Cloudflare-native.

Vercel / Next.js microservices.sh / Cloudflare Note
Next.js on Vercel Next.js via @opennextjs/cloudflare (Path 1) Not all Next features map 1:1; check version support
Vercel Postgres D1 (see prisma-postgres) or external Postgres over HTTP D1 is SQLite
Vercel KV / Blob / Cron Cloudflare KV / R2 / Cron Triggers
ISR / on-demand revalidation OpenNext cache (KV/R2/D1-backed) Configure the cache adapter
Edge Middleware Workers / Next middleware on OpenNext Behavior differences exist
NextAuth / Vercel auth Keep, or move to email-code auth (Path 2)
Backend API routes Modules + Workers (Path 2) via express-api-to-workers patterns
Next.js frontend Kept, or rebuilt on SvelteKit (Path 2) Reusing Next UI on SvelteKit is a rewrite, not a port

The migration

Five steps, plan-first and approval-gated.

  1. 01

    Confirm the path

    Path 1 = keep Next.js, move the host via OpenNext. Path 2 = rebuild the backend on microservices.sh modules. Decide before you scaffold — they're different projects.

  2. 02

    Path 1 — adopt OpenNext

    Add @opennextjs/cloudflare, configure wrangler and the OpenNext cache adapter, and map infra: KV→KV, Postgres→D1 or external, Blob→R2, Cron→Cron Triggers.

  3. 03

    Path 2 — scaffold & map

    Scaffold with create microservices-app, then map backend surfaces to modules and use the matching data/API migration skills; auth becomes email-code.

  4. 04

    Decide the frontend (Path 2)

    Keep Next.js calling the new backend, or rebuild the UI on the SvelteKit template — that rebuild is a rewrite, not a port.

  5. 05

    Verify

    Path 1: wrangler dev then a preview deploy — check routing, middleware, ISR, images. Path 2: local dev, smoke tests, schema checks.

What doesn't port 1:1

The real cost — no surprises.

pnpm create microservices-app@latest my-app --template saas-starter-sveltekit
See the quickstart