rust-wokrers is an open-source Cloudflare Workers SaaS starter with a Rust Worker backend, Vite frontends, D1 migrations, admin operations screens, CMS pages, and benchmark tooling.
Build production-ready edge SaaS apps with Rust, Cloudflare Workers, D1, Vite, React, admin auth, CMS pages, API-only mode, and benchmark-ready deployment workflows.
cloudflare-workers, rust, worker-rs, vite, react, saas-boilerplate, edge-computing, cloudflare-d1, cloudflare-kv, cloudflare-r2, workers-ai, vectorize, admin-dashboard, api-starter, serverless-rust
rust-workers: Cloudflare Worker written in Rust usingworker::Routerapps/landing: public Vite + React frontendapps/admin: Vite + React operations consolepackages/com: TypeScript contracts shared by the Vite appsrust-workers/migrations: D1 schema and seed SQLbench: performance benchmark suites for deployed Worker targets
APP_MODE selects the runtime surface:
| Mode | Behavior |
|---|---|
full |
Serves landing, admin, CMS pages, and APIs. |
api-only |
Serves /api/* only; non-API routes return JSON service information or JSON 404. |
pnpm install
cp rust-workers/.dev.vars.example rust-workers/.dev.vars
pnpm cert:local
pnpm db:migrate:local
pnpm devLocal URLs:
- Landing:
https://localhost:5173 - Admin:
https://localhost:5174 - Rust Worker API:
https://localhost:8787
pnpm dev # Rust Worker + both Vite apps
pnpm cert:local # install local HTTPS certificate
pnpm dev:rust-workers # Worker only
pnpm dev:apps # Vite apps only
pnpm db:migrate:local # local D1 migrations
pnpm check # Rust + Vite type checks
pnpm build # Rust check + Vite production builds
pnpm deploy:prod # remote D1 migration + Worker deploy
pnpm perf:workers # deployed Worker benchmark ladder- Rust API routing with shared security headers and API logging
- Full mode and API-only mode
- Session login cookies and admin API protection
- D1-backed settings, leads, media, pages, users, emails, logs
- Cloudflare Images direct-upload flow
- AI Gateway copy generation
- Workers AI text and embedding examples
- Vectorize reindex/search API
- KV and R2 example APIs
- KV-backed operations task API
- Dynamic
robots.txt,sitemap.xml, and public CMS pages
- Quick Start
- Cloudflare Setup
- Deployments
- Security
- Cloudflare Examples
- CLI Scaffolding
- Architecture
- API Reference
- Module Guide
- Testing
- Frontend
- Templates
- Troubleshooting
- Complete Usage Guide
- Performance Benchmark
- Open Source Release Checklist
Workflow templates are stored in _templates/github-workflows. Copy them into .github/workflows/ after you configure repository secrets and deployment targets.
MIT