OPCStack / Cloudflare native

Build OPC products faster, at lower cost, and ready for production

OPCStack is a Cloudflare-native AI SaaS template for One Person Companies. It includes authentication, payments, credits, D1 sharding, R2, KV, Queues, Cron, AI tasks, deployment automation, and a test suite

Runtime architecture Cloudflare Edge
01 / Worker runtime Live
SvelteKit SSR + Hono API
Queue consumers Edge routes
02 / Control plane Primary
META_DB
Shard registry User routing
03 / Tenant data Regional
D1 Shards
04 / Platform Attached
R2 · KV · Queues
One Worker · one control plane · regional tenant data
Built for one person companies Open source template Cloudflare Worker runtime

Build Faster

AI can focus on product changes

Most templates provide pages, login, and a few sample APIs. You still have to build everything else from scratch
01

A stable engineering foundation

Requirements, context, constraints, feedback, testing, and deployment are made repeatable

02

Complete core capabilities

Stop rebuilding login, payments, storage, queues, and deployment for every project

03

A real product flow

Signup, beta codes, credits, referral rewards, payments, subscriptions, notifications, feedback, and Admin API are already wired

Production ready

More Production-Ready Than a Typical Cloudflare Template

Near-unbounded horizontal growth
Edge Nearest Worker
Control plane META_DB
Tenant data D1 Shards
WNAMWEURAPACOC
Built-in

Identity and access

Better Auth sessions, email login, Google, GitHub and LinuxDO OAuth, beta-code gating and protected admin access

Built-in

Billing and credits

Subscriptions, payment webhooks, integer credit units, ledgers, grants, deductions and affiliate referrals

Built-in

Regional tenant data

A global META_DB resolves every user to regional D1 Shards with primary writes and read replicas

Built-in

Storage policy

R2 paths separate public, private and temporary objects with explicit ownership and lifecycle rules

Built-in

Async workloads

Queues, cron jobs and AI task state keep long-running work outside the request path

Built-in

Operations and delivery

Typed API contracts, generated migrations, local resources, tests and Cloudflare deployment automation

Why Cloudflare

Lower deployment and operations costs

Cloudflare puts Workers, D1, R2, KV, Queues, Cron, and CDN on one edge platform. It can run signup, usage, payments, async tasks, and file storage at low cost
$5Workers Paid Plan starting price
0R2 egress charge
100KWorkers free requests / day

R2 egress is free, and KV, Queues, and D1 have no egress fees either

Quick Start

Create an OPCStack app with one prompt

  1. 01

    Paste the prompt

    Give the Agent the Quick Start link and your app name

  2. 02

    Install the Skill

    The Agent installs create-opcstack-app for its platform

  3. 03

    Create the app

    The Skill clones, configures, and starts the project

Agent prompt
Create an OPCStack app named <APP_NAME> by following:
https://raw.githubusercontent.com/glidea/opcstack/main/QUICK_START.md
Quick start

FAQ

What to know before you start

Is this a template or a framework? Do I own the code after cloning

It is a template, not a framework. After cloning you own the full source, modules collaborate through explicit interfaces, you can change or delete any part, no framework conventions to follow and no vendor lock-in

Can I delete modules I don't use

Yes. Modules collaborate through interfaces, removing payment or AI does not affect auth or storage, you just skip writing the base flow instead of redesigning sign-up, payment and storage from zero

I'm not building an AI product, is it still a fit

Yes. AI is an optional module, remove it and auth, payment, credits, storage, queues and the deploy skeleton stay complete

How much can I actually save? Is the free tier enough to start

The free tier is enough to run an MVP, Workers Paid Plan is pay-as-you-go from $5/mo. In a public case a Vercel bill of $800+/mo dropped to under $20 on Cloudflare at the same traffic, and R2 egress is free

Once I've used the template, how do I sync later upstream updates

The repo keeps an upstream remote, follow SYNC_TEMPLATE.md to selectively merge upstream updates, it is not a one-time copy that cuts you off from the template

My project is small, is D1 sharding over-engineering

No impact. A small project runs on a single active shard by default, add shards when you scale, new users auto-assigned and existing users never migrate, sharding is a fallback for later, not a burden

What do I need to get started? Is init complicated

Just Node and pnpm. Give the Quick Start link to an Agent once to install create-opcstack-app, then use the Skill directly for future projects