logo

Overview

OPCStack template documentation index and reading guide

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
Admin Users, credits, codes, announcements, payments, AI task inspection Admin Console
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. On first use, give the Quick Start URL to an AI coding agent. It installs create-opcstack-app; later projects can invoke the Skill directly.

Going to production?

  1. Deployment for the deploy path and resource provisioning.
  2. Authentication to lock down signup and OAuth.
  3. Payments and Credits to wire billing.
  4. Admin Console to operate the deployed product.
  5. Testing before you ship.

Working on the template itself?

  1. Architecture for design principles and system overview.
  2. Database for the sharding model and saga rules.
  3. Deployment for the prepare-cloudflare automation.
  4. API contracts in src/api-contract/ for the contract conventions.