OPCStack is a Cloudflare-native product skeleton for one-person or small teams to ship SaaS and AI products fast. Auth, payments, credits, R2, D1 sharding, KV, Queues, Cron, deployment automation, and testing are wired end to end. You delete what you do not need; you do not rebuild the base loop from scratch.
Module Map
| Module | What it gives you | Doc |
|---|---|---|
| Web + API | SvelteKit SSR, Hono API, prerendered static pages | Frontend, API contracts |
| Database | D1, Drizzle, user data sharding, read replicas, auto migration | Database |
| Storage | R2 public/private/tmp paths, browser direct upload, image variants | Storage |
| Async | Queues, Cron, Durable Objects | Queues and Cron |
| Auth | Better Auth, email, Google, GitHub, LinuxDO, Turnstile, beta code | Authentication |
| Credits | Wallet, ledger, signup grant, daily checkin, invite reward, redeem code, expiry | Credits |
| Payments | Dodo, Creem, one-time packs, subscriptions, webhooks, refund clawback | Payments |
| AI | Chat, image, TTS, realtime, video providers, async tasks with R2 output | AI |
| Operations | User feedback, system notifications, global and targeted announcements | Operations |
| Testing | Vitest, BDD helper, mock D1 and R2, E2E, coverage | Testing |
| Deployment | prepare-cloudflare automation, DNS, CN domain, secrets, deploy commands | Deployment |
Reading Guide
Just cloned the template?
Start with Getting Started. The fastest path is to let an AI agent guide you: open your AI coding tool, reference @BOOTSTRAP.md @AGENTS.md, and it will walk you through local setup step by step.
Going to production?
- Deployment for the deploy path and resource provisioning.
- Authentication to lock down signup and OAuth.
- Payments and Credits to wire billing.
- Testing before you ship.
Working on the template itself?
- Architecture for design principles and system overview.
- Database for the sharding model and saga rules.
- Deployment for the prepare-cloudflare automation.
- API contracts in
src/api-contract/for the contract conventions.