Skip to content

A landing page today.Your next module tomorrow.

An open source SaaS starter kit for Cloudflare. Start small, and add each module as source files you own. Think shadcn/ui for a full-stack SaaS.

Version 0.8.0. Proof of concept. Not for production use yet.

Add code when the product needs it.

Each module adds source files to your repository.

  1. Validate (opens in a new tab)add waitlist

    Start with the landing page, then collect sign-ups to test the idea.

  2. MVP (opens in a new tab)add auth

    Add sign-in, the user app and the admin console when people sign up.

  3. Teams (opens in a new tab)add teams

    Add team accounts and tenant isolation when users ask for them.

  4. Money (opens in a new tab)add payment

    Add one-off payments and subscriptions when someone wants to pay.

  5. Scale (opens in a new tab)add queue

    Add background jobs, file uploads, feature flags, API keys and rate limits as usage grows.

Built on Cloudflare and tools you already know.

Every project runs on Cloudflare, where Workers, D1, KV and R2 keep most modules on the free tier. Astro, TanStack Router and Hono build the apps, with Drizzle and Better Auth for data and sign-in.

Runtime

  • Workers
  • D1
  • KV
  • R2
  • Queues

Frameworks

  • Astro
  • TanStack Router
  • Vite
  • Hono

Libraries and tools

  • Drizzle
  • Better Auth
  • Postgres
  • Turborepo
  • pnpm

Boilerplates make you delete code for a week.

You clone one and inherit forty features, twelve environment variables and someone else's opinions about billing.

A boilerplate gives you forty features on day one. Saasaloy gives you one, and adds the next when the product needs it.

Choose the modules you need.

Each module adds its source files to your repository. You read and edit every line it writes.

26 modules · 17 providers · 4 drivers

Filter modules by stage
  • api

    A Hono API on Cloudflare Workers for every route the product needs.

    Needs logger

    npx saasaloy add api

  • database

    A Drizzle database on D1 or Postgres, with migrations.

    Needs api

    Driversd1postgres

    npx saasaloy add database

  • logger

    Structured logs with levels and field redaction.

    Providersconsole

    npx saasaloy add logger

  • validators

    Shared Zod schemas, so the API and the browser check the same input.

    Needs api

    npx saasaloy add validators

  • waitlist

    A waitlist form and its API route, to collect early sign-ups.

    Needs api, database, validators

    npx saasaloy add waitlist

  • admin

    A staff console behind sign-in. Later modules add their screens to it.

    Needs api, auth, shell

    npx saasaloy add admin

  • app

    The signed-in app for your users, with sign-in, sign-up and a home screen.

    Needs api, auth, shell

    npx saasaloy add app

  • auth

    Sign-in and sessions with Better Auth.

    Needs api, database

    npx saasaloy add auth

  • e2e

    Playwright tests that sign in and walk through each installed module.

    Needs api

    npx saasaloy add e2e

  • email

    Send email through one interface. The local provider logs each message.

    Needs api

    Providerscloudflareconsoleplunk

    npx saasaloy add email

  • shell

    The layout, navigation, user menu and data table of every signed-in screen.

    npx saasaloy add shell

  • command

    A Cmd+K command palette and keyboard shortcuts in every signed-in app.

    Needs shell

    npx saasaloy add command

  • email-react

    Write email templates in JSX, with a preview server.

    Needs email

    npx saasaloy add email-react

  • multitenant

    Tenant isolation, where a query without the tenant filter does not compile, plus custom roles.

    Needs api, database, auth, teams, admin

    npx saasaloy add multitenant

  • teams

    Organizations, members, roles and invitations, with an admin screen.

    Needs api, database, auth, admin

    npx saasaloy add teams

  • billing

    Subscriptions with plans and entitlements, and a 402 gate on paid features.

    Needs api, database, auth, admin, queue, email

    Providersconsolestripe

    npx saasaloy add billing

  • payment

    One-off payments with a status machine and a staff review screen.

    Needs api, database, auth, admin

    Providersconsolemanual

    npx saasaloy add payment

  • kv

    A key-value store with tenant-scoped keys and a cache helper.

    Needs api

    Providerscloudflarememoryupstash

    npx saasaloy add kv

  • queue

    Background jobs and cron schedules.

    Needs api

    Providerscloudflarememory

    npx saasaloy add queue

  • sms

    Send SMS through one interface, with segment counting.

    Needs api

    Providersconsolekhudebarta

    npx saasaloy add sms

  • storage

    File storage with signed links.

    Needs api

    Providerscloudflarememory

    npx saasaloy add storage

  • api-keys

    Scoped API keys, stored as a hash, owned by a user or an organization.

    Needs auth

    Driversorganizationuser

    npx saasaloy add api-keys

  • env-infisical

    Load secrets from Infisical for setup and deploy.

    npx saasaloy add env-infisical

  • feature-flags

    Feature flags with per-tenant overrides, rollouts and kill switches.

    Needs api, database, validators, auth, admin, kv

    npx saasaloy add feature-flags

  • file-uploads

    File uploads with an upload block, an admin screen and a cleanup job.

    Needs api, auth, admin, database, storage, validators

    npx saasaloy add file-uploads

  • ratelimit

    Rate limits per route, with a 429 and Retry-After.

    Needs api, kv

    npx saasaloy add ratelimit

Change the vendor, not your code.

Cloudflare is the default provider. One env var moves a capability such as email to another vendor.

.env (example)
EMAIL_PROVIDER=console
  • One interface.

    A capability such as email exposes one interface. Your code calls it, whichever provider sits behind it.

  • Pick the vendor with an env var.

    A *_PROVIDER env var selects the provider module, such as email-cloudflare or email-plunk.

  • Local development without a vendor account.

    Every capability ships a -console or -memory provider, so you build the whole project offline.

Ready for coding agents from the first commit.

A new project starts with AGENTS.md, CLAUDE.md, a DESIGN.md and seven base skills for setup, config, env, design, testing, deploy and landing copy.

Every module you add brings its own skill file, and one pnpm check tells the agent whether its change holds.

Read the agent guide (opens in a new tab)

Before you start.

What is Saasaloy?

Saasaloy is an open source, composable SaaS starter kit for Cloudflare. It is a CLI plus a module registry, not a boilerplate. You start with a landing page, then add the API, database, auth, payments and other modules one command at a time. Each module copies source files into your repository under the MIT license.

How is it different from a boilerplate?

A boilerplate gives you every feature on day one, and you spend the first week deleting the ones you do not need. Saasaloy starts with a landing page and adds each module when the product needs it. Later fixes reach the files you own through saasaloy update.

Which modules should I add first?

Follow the stages. Add waitlist to test the idea, auth when people sign up, teams when they ask for a team account, and payment when someone wants to pay. saasaloy add installs the modules each one needs first.

Do I own the generated code?

Yes. The CLI copies source files into your repository, and nothing is imported from a Saasaloy package at runtime. Edit anything.

Do I need a Cloudflare account?

Not until you deploy. Every capability ships a console or in-memory provider, so the whole project runs on your machine with no cloud account.

What does it cost to host?

Close to nothing while you test the idea. The base, api, database-d1, auth, admin, waitlist and teams run on the Cloudflare free tier, which allows 100,000 Worker requests a day and, for D1, 5 million rows read, 100,000 rows written and 5 GB of storage. email-cloudflare and queue-cloudflare need a paid Workers plan, and a vendor provider such as email-plunk needs that vendor's account.

Can I change providers?

Yes. Every vendor sits behind a swappable provider. Pick the vendor with a *_PROVIDER env var, and the database takes a Postgres driver in place of D1.

How do module updates work?

saasaloy update re-applies the base and modules at a newer version, with a merge plan for the files you edited. saasaloy remove undoes a module from its manifest.

Is Saasaloy ready for production?

Not yet. It is a working proof of concept. The CLI, the module contracts and the generated code can change between releases until a stable 1.x.x version ships. Pin the version you install and read the changelog before you update.

Start with a landing page today.

Add the next module when the product needs it.

npx saasaloy init my-app

This site began as the landing page saasaloy init writes. Its source lives at apps/web. View this site's source (opens in a new tab)