ioy.ai
Sign inGet the starter
Template guide

Cloudflare Workers SaaS template with React Router 7

Explore a private React Router SaaS starter for Cloudflare Workers, including D1, private R2, accounts, billing adapters and local setup.

What is this Cloudflare Workers SaaS template?

ioy.ai is a private SaaS starter for developers building independent products on Cloudflare Workers. It uses React Router 7 for server-side rendering (SSR), React and TypeScript. The reference application brings together a public website, an account and AI workspace, billing, an API and an admin area. See the features and the reference pricing; the pricing page describes example SaaS plans, not the price of the template.

The template is free to claim after signing in. It is not a public source repository: your account can create a temporary read-only credential for a sanitized release, without granting access to the private GitHub repository or its history. The public Codex Skill does not contain the template source. Your own product uses independent accounts, resources, credentials and branding.

Architecture and included building blocks

  • Workers and React Router: The Worker serves React Router SSR pages and application APIs. Public content is compiled at build time rather than read from disk at runtime.
  • D1 and private R2: D1 stores account and business records. Private R2 stores files; access to results is checked against the account and expiration rules.
  • Workflows and optional Durable Objects: Cloudflare Workflows handle background generation tasks. An optional Durable Object provides an additional global concurrency admission gate. Unknown paid-task results are reconciled rather than blindly submitted again.
  • Accounts and billing: better-auth supports the account flows, including email/password and configurable Google sign-in. The billing implementation has Stripe, Creem and Waffo provider branches; select and configure one provider for the deployment, with matching products, credentials and signed webhooks.
  • Content and interfaces: Markdown and MDX content supports docs, blog, feature and scenario pages. The app includes an open API and OpenAPI contract, a user workspace and an admin area. Website, API and product Skill share task and credit rules.
  • Product creation: A generator creates an independent project from your requirements. The Codex Skill can guide intake and launch steps; custom business workflows still need implementation and testing.

The standard layout provides a multi-page SaaS. The optional one-page layout puts a single enabled workflow, result, authentication, pricing and policy sections on the home page. Hosted sign-in or checkout can temporarily take users off that page.

Run the starter locally

Install Node.js 24 or newer, npm, Git and the system zip command. Sign in to ioy.ai, claim the template and create a clone credential. When Git prompts, use ioy as the username and the temporary credential as the password; do not put the credential in a URL or chat.

git -c credential.helper= clone https://ioy.ai/template.git ioy-template
cd ioy-template
npm ci
node scripts/local-secrets.mjs
npm run db:local
npm run dev

Open http://127.0.0.1:5188. The secrets helper creates local credentials without replacing an existing .dev.vars; the migration command uses local D1 storage. The development configuration simulates AI and email and disables billing. Simulated output and local mail do not prove model quality or real email delivery. Follow the quickstart for the full local account flow and credential handling.

From a local demo to your own SaaS

First define the audience, workflow, input and output, model, billing, API needs, brand and operational details. Then use the generator or Codex Skill to create a separate project in an empty directory. Configure your own domain and services, replace reference content and plans, and implement any workflow not already supported. The product creation guide explains the intake and generation steps.

For real use, independently configure and verify the services you enable: for example, model credentials and actual cost rates, a verified email sender, Google login, and a selected payment provider. Test payments and webhooks in the provider's test environment before live use. Local simulation is not evidence of a working external service. The deployment guide covers isolated preview resources and production checks.

Cloudflare usage, domain registration, AI models, email and payment providers can have separate charges or account requirements. Check each provider's current terms and costs for your own usage; claiming the template does not provision or pay for those services.

How does this compare with Next.js on Workers?

Both approaches can serve a React application on Cloudflare Workers, but they use different frameworks and deployment integrations. This starter is built around React Router 7 SSR and its existing Workers bindings, routes and SaaS components; it is not a Next.js template. A Next.js-on-Workers project may be a better fit if you already depend on Next.js conventions or an existing Next.js application. Compare the specific framework features, Cloudflare compatibility and integration work your project needs rather than assuming either option is universally faster or cheaper.

FAQ

Is the Cloudflare Workers SaaS template open source?

The template source is private. After signing in, you can claim a sanitized release using a temporary read-only clone credential without access to the original private repository.

Does the starter use Next.js?

No. It uses React Router 7 for server-side rendering with React and TypeScript on Cloudflare Workers.

Are AI generation and email delivery real in local development?

No. The default local AI and email flows are simulations; real models and email delivery require independently configured services and verification.

Can I use Stripe, Creem or Waffo?

Yes. The starter includes provider branches for all three, but you must select a provider and configure its account, products, credentials and webhooks before accepting payments.

Can I build a single-page SaaS?

Yes. The optional one-page layout supports one enabled workflow and places its tool, result, authentication, pricing and policy sections on the home page.

Does claiming the template cover hosting and provider costs?

No. The template is free to claim after sign-in, but Cloudflare, domains, models, email and payment providers may charge separately.