MuseMVP

All in Cloudflare

Your entire SaaS.One Cloudflare account.

Next.js 16 runs on Workers, with D1, R2, Email Sending and Turnstile wired in as native Cloudflare services. No Postgres to host, no S3 keys, no separate mail vendor.

The live demo is served by this app's own Worker.

https://app.example.com
VisitorAny browser

Your Cloudflare account

External by designPaymentsStripe, Creem, Dodo Payments, WaffoGoogle · GitHub sign-in

Workers· Next.js 16 · Hono API

OpenNext builds the Next.js app into a single Worker. Pages render and Hono API routes respond in the same runtime, close to the visitor.

Config
main: .open-next/worker.js
Starter file
apps/web-cloudflare/open-next.config.ts
Read the guide

Everything inside the dashed line runs in your Cloudflare account. Payment gateways and OAuth providers stay external services you configure.

Why one platform

Less infrastructure to run.

Putting the whole stack on Cloudflare changes what you operate, what you pay for and where your code runs.

One platform

One dashboard. One CLI.

Compute, data, files, mail, bot checks and logs share a single Cloudflare account. Wrangler creates resources, stores secrets, applies migrations and deploys.

  • Workers
  • D1
  • R2
  • Static Assets
  • Email Sending
  • Turnstile
  • Observability
apps/web-cloudflare/wrangler.jsoncExcerpt · IDs omitted
{
  "main": ".open-next/worker.js",
  "routes": [
    { "pattern": "app.example.com", "custom_domain": true }
  ],
  "assets": { "binding": "ASSETS" },
  "d1_databases": [{ "binding": "DB" }],
  "r2_buckets": [{ "binding": "R2_BUCKET" }],
  "observability": { "enabled": true }
}

Global by default

Code runs near every visitor.

Workers run on Cloudflare's global network, so pages and API routes start close to the user. There is no region to pick for application code.

D1 keeps a primary database location. Plan write-heavy paths around it.

Usage-based

Pay for requests, not idle servers.

No VM, container or database server sits waiting for traffic. Workers, D1 and R2 bill by usage, with included quotas.

Not on the bill

  • Idle servers
  • Database instances
  • R2 egressFree

Billed by usage

  • Worker requests & CPU time
  • D1 rows read & written
  • R2 storage & operations

Plan fees, quotas and limits vary. Check current Cloudflare pricing; zero cost is not guaranteed.

Clone to production

From an empty account to your own domain.

The same commands as the deployment guide. Local development runs on Wrangler's local D1, so you build and test before touching remote resources.

pnpm cf:deploy runs a strict D1 migration check first and stops while remote migrations are pending.

Read the Workers deployment guide
~/my-saaspnpm · wrangler
  1. # 1 · Create D1 and R2 once

    pnpm --filter @musemvp/cloudflare exec wrangler d1 create <db>

    pnpm --filter @musemvp/cloudflare exec wrangler r2 bucket create <bucket>

  2. # 2 · Write env files, secrets and local D1

    pnpm muse:init --yes --app cloudflare

  3. # 3 · Seed accounts and develop locally

    pnpm db:seed:d1

    pnpm dev:cf

  4. # 4 · Back up, test and apply remote migrations

    pnpm db:migrate:d1:remote

  5. # 5 · Check migrations, then deploy the Worker

    pnpm cf:deploy

Two apps, one purchase

Same product. Two runtimes.

MuseMVP ships two complete apps in one repository. They share domain packages and differ only where the platform does.

Next.js + Node

apps/web

Next.js + Cloudflare

apps/web-cloudflare

This page

Runtime

Node.js on Vercel or Docker

Cloudflare Workers via OpenNext

Database

PostgreSQL

D1 (SQLite) through the DB binding

Files

S3-compatible storage with access keys

R2 through the R2_BUCKET binding

Email

Resend or Cloudflare Email

Cloudflare Email Sending

Local development

PostgreSQL in Docker Compose

Wrangler local D1, no Docker

Deploy

Vercel or your own Docker host

pnpm cf:deploy to Workers

Choose it when

You need PostgreSQL, self-hosting or long-running Node processes.

You want one platform, an edge runtime and the least infrastructure to operate.

Shared by both apps

  • Better Auth: email, OTP, OAuth, 2FA
  • Stripe, Creem, Dodo & Waffo billing
  • Admin users & roles
  • English & Chinese i18n
  • MDX docs, blog & legal pages
  • AGENTS.md + 8 agent skills

MuseMVP and All in One include both apps.

See the Next.js + Node app
Inside the starter

A clear home for every piece.

Two deployment-ready apps. Shared domain packages. Explore the actual MuseMVP workspace, from the app boundary to the code behind it.

musemvp Hover to preview · Click for docs

Project explorer

storage.tsOpen docs
apps/web-cloudflare/src/server/storage.ts
Source excerpt · MuseMVP starter

Representative directories and source excerpts. App pages stay separate; domain logic is shared.

Read the structure guide

Three plans. One payment.

Choose the plan that fits

Every plan is a one-time, tax-inclusive purchase. UI Templates covers landing pages, MuseMVP covers the full-stack SaaS starter, and All in One includes both.

  • One-time payment
  • Tax included
  • No subscription
  • Keep every version you receive
Best value

One payment. Tax included.

All in One

MuseMVP + every UI template

$79USD
one-time

The full-stack MuseMVP starter plus all 9+ UI landing-page templates, including new ones during maintenance.

Buy All in One

SaaS starter

  • IncludedNext.js + Node app
  • IncludedNext.js + Cloudflare app
  • Coming soonTanStack Start + Cloudflare appComing soon
  • IncludedAuthentication, payments & dashboard
  • IncludedAI-native development

UI landing-page templates

  • Included9+ live landing-page templates
  • IncludedEditable page source, layouts & assets
  • IncludedNew templates during maintenance

After payment, connect GitHub in the Dodo Customer Portal, then accept each repository invitation.

One payment. Tax included.

MuseMVP

Full-stack SaaS starter

$69USD
one-time

Next.js + Node and Next.js + Cloudflare apps in one repository, with authentication, payments and a dashboard.

Buy MuseMVP

SaaS starter

  • IncludedNext.js + Node app
  • IncludedNext.js + Cloudflare app
  • Coming soonTanStack Start + Cloudflare appComing soon
  • IncludedAuthentication, payments & dashboard
  • IncludedAI-native development

UI landing-page templates

  • Not included9+ live landing-page templates
  • Not includedEditable page source, layouts & assets
  • Not includedNew templates during maintenance

After payment, connect GitHub in the Dodo Customer Portal, then accept each repository invitation.

One payment. Tax included.

UI Templates

UI landing pages

$19USD
one-time

9+ editable Next.js landing-page templates. A design product, independent of the engineering starter.

Buy UI Templates

SaaS starter

  • Not includedNext.js + Node app
  • Not includedNext.js + Cloudflare app
  • Not includedTanStack Start + Cloudflare app
  • Not includedAuthentication, payments & dashboard
  • Not includedAI-native development

UI landing-page templates

  • Included9+ live landing-page templates
  • IncludedEditable page source, layouts & assets
  • IncludedNew templates during maintenance

After payment, connect GitHub in the Dodo Customer Portal, then accept each repository invitation.

Every plan includes

  • 1 developer license
  • Multiple commercial end products
  • Private client-project handoff
  • Product-line updates
  • Public documentation & community

One developer. Multiple commercial products and private client-project source handoff. No source redistribution or template resale.

Keep the versions you receive forever. Updates and new templates are included while the same product line is maintained, not future independent products or unlimited services.

There is no self-serve upgrade or price-difference checkout. Need to switch plans? Contact support.

Cloudflare FAQ

Running on Cloudflare

Platform scope, cost, limits and how this app relates to Next.js + Node.

Is everything really on Cloudflare?+

Compute, database, file storage, transactional email, bot checks and logs are. Payment gateways (Stripe, Creem, Dodo Payments, Waffo) and Google or GitHub sign-in remain external services you configure.

Can I run it for free?+

Usage-based pricing and included quotas help while you are small, but the template does not promise zero cost. Check Workers CPU-time and bundle-size limits, D1 and R2 quotas, and Email Sending access for your account.

Can I use PostgreSQL or Hyperdrive in this app?+

No. apps/web-cloudflare is D1-only by design. If you need PostgreSQL, use the Next.js + Node app included in the same purchase.

Can I switch between the Node and Cloudflare apps later?+

Both apps share packages, but switching platforms means migrating data (PostgreSQL to D1, S3 to R2, or back) and verifying services again. It is not an environment-variable switch.

What D1 and Workers limits should I know about?+

D1 uses SQLite semantics and rejects interactive transaction() calls, so the starter uses batch() for multi-statement writes. Workers have their own runtime limits; check the built Worker with pnpm cf:preview before deploying.

Which plan includes the Cloudflare app?+

MuseMVP and All in One both include Next.js + Cloudflare alongside Next.js + Node. UI Templates does not include either app.

Workers · D1 · R2 · Email · Turnstile

Put the whole product on Cloudflare.

The platform wiring is done, with auth, payments and admin already on top. Start from a working Worker instead of an empty account.