Ship SaaS products on Cloudflare in hours, not weeks
A Cloudflare-native starter kit with Workers, React Router v7 + Hono, Better Auth, Drizzle on D1 and a shadcn/ui design system — wired together with tests, quality gates and gated deploys.
$ git clone https://github.com/farshidpourlatifi/edgeseed my-appWatch it go from clone to deployed
EdgeSeed in one unbroken take — cloning the repo, booting the dev servers, passing the quality gate, and shipping a gated release to a live Cloudflare Worker. The same commands you'll find in Getting started below.
What you'll see
- Step 1: Starts on this landing page.
- Step 2: git clone, then pnpm install.
- Step 3: Dev servers come up on Cloudflare Workers.
- Step 4: Build, typecheck and the boot check go green.
- Step 5: A version bump, then a gated release deploys.
- Step 6: The live Worker in Cloudflare — its D1 and rate-limit bindings, and real request logs.
Everything wired up on day one
Nine building blocks that normally take weeks to assemble, already integrated and covered by tests.
- Cloudflare Workers runtimeRuns at the edge on Workers with local dev through Wrangler, so production and localhost behave the same.
- React Router v7 + HonoServer-rendered routes with loaders and actions, backed by a Hono app that owns every API surface.
- Better AuthEmail and password, GitHub and Google OAuth, plus organizations, invitations and role-based membership.
- Drizzle ORM on D1Typed schema and migrations against Cloudflare D1, with a single request-scoped database client.
- shadcn/ui design systemAccessible primitives, CSS-variable theming and a first-class dark mode you actually own the code for.
- MCP server for LLM toolsExpose your app to agents over the Model Context Protocol, with every tool mirroring a public API route.
- Auto-generated OpenAPIRoute schemas emit an OpenAPI document that is checked into git — CI fails the build when it drifts.
- Observability built inOne correlation id per request — on the response header, every log line, and the Sentry issue. Quote it from an error page and land on the exact failure.
- Quality gatesESLint, Prettier and gitleaks run as pre-commit hooks, blocking broken code and leaked secrets locally.
- Gated deploysDeploys wait on lint, format, types, unit, e2e and a gitleaks history scan before any Worker ships.
One account, four ways in.
The same operation works from the web app, the REST API, the CLI, and an MCP server for LLM agents — one set of users, one permission model.
Web
Sign in and the dashboard reads the session cookie Better Auth set. The same principal every other surface resolves to.
pnpm dev
# → localhost:5173/dashboard/settingsOne request, one predictable path
No hidden globals and no duplicated data access. Here is exactly what happens between the edge and your database.
Worker entry
Every request lands on a single Cloudflare Worker that binds D1 and environment secrets before anything else runs.
Hono middleware
Middleware builds a per-request context: a correlation id and scoped logger first, then a Drizzle database client and a configured auth instance, never shared between requests. The id follows the request out — response header, every log line, and any Sentry event.
Better Auth
Auth routes handle sessions, OAuth callbacks and organization membership, then hand the active user to downstream handlers.
Versioned API
Validated /api/v1 routes emit OpenAPI schemas, so breaking changes require a new version rather than a silent edit.
React Router loaders
Loaders receive the same request-scoped db and auth through AppLoadContext, so pages and the public API can never disagree about your data.
A monorepo you can navigate
Eight focused packages with clear boundaries, so a change to auth never means editing your UI library.
- @starter/webappReact Router v7 app with SSR loaders, layouts and the authenticated dashboard.
- @starter/mcpserverModel Context Protocol server exposing your domain to LLM tooling.
- @starter/authlibBetter Auth configuration, session helpers and organization permissions.
- @starter/configsharedZod-validated Worker env schemas and the app version, shared by both Workers.
- @starter/dblibDrizzle schema, migrations and the request-scoped D1 client factory.
- @starter/observabilitylibStructured logging, correlation ids and opt-in Sentry reporting, shared by both Workers.
- @starter/uilibshadcn/ui component library with the shared theme and design tokens.
- @starter/clitoolDev workflow scripts for migrations, seeds, the OpenAPI spec and product init.
Quality gates you cannot skip
The same commands run on your machine and in CI. If a gate fails, the deploy never starts.
76
Vitest, 9 suites across packages
9
Playwright: auth, health, landing
54%
Stryker, 294 mutants on core logic
4
quality, drift, e2e, gitleaks
~/edgeseed $ pnpm verify › lint eslint . ok › format prettier --check . ok › test vitest run (76) ok › secrets gitleaks git --redact ok › build turbo build ok › types turbo typecheck ok › e2e playwright test (9) ok 7 gates passed — deploy unlocked
~/edgeseed $ pnpm test:mutation Stryker mutating packages + app server… killed 159 survived 131 no-coverage 4 mutation score 54.1% report: reports/mutation/index.html
~/edgeseed $ pnpm verify > edgeseed@0.2.1 verify lint — eslint . clean format — All matched files use Prettier code style! unit — vitest run ✓ packages/db schema.test.ts (33 tests) ✓ ui terminal-timeline.test.ts (16 tests) … 7 more suites Test Files 9 passed (9) · Tests 76 passed (76) secrets — gitleaks git --redact INF 28 commits scanned INF no leaks found build — 2 tasks successful Time: 33ms >>> FULL TURBO types — 8 packages clean e2e — Running 9 tests using 1 worker 9 passed (18.6s) 7 gates passed — deploy unlocked ~/edgeseed $ pnpm test:mutation mutation run complete killed 159 survived 131 no-coverage 4 mutation score 54.1% report: reports/mutation/index.html
Running locally in 4 commands
No dashboard clicking required. Everything below works against local D1 before you deploy.
Clone the repository
Clone with full history so you can keep pulling upstream updates through the upstream remote later.
$ git clone https://github.com/farshidpourlatifi/edgeseed my-appMake it yours
Installs dependencies, wires the git hooks, and stamps your product name onto the Workers and config.
$ pnpm install && pnpm init:product my-appApply migrations and seed
Runs Drizzle migrations against local D1 and loads a demo user and organization.
$ pnpm db:migrate && pnpm db:seedStart developing
Boots the app at http://localhost:5173 with hot reload against local D1.
$ pnpm dev