You have an idea for a SaaS. You open Cursor or Claude Code, and the familiar ritual begins. Auth. A database. Payments. Transactional email. Permissions. The agent generates it. You spend the weekend reviewing and patching, you burn $100 to $300 in tokens on the same foundational plumbing every serious project requires, and half of what comes back has subtle security holes or broken logic that only surfaces once a real user signs up. Welcome to AI slop.
Then comes the second surprise. The project grows, the free tier ends, and the infrastructure bill arrives. Egress fees on every byte that leaves the network. A managed database that costs money even while it sits idle overnight. Pricing that grows faster than expected.
PageZERO exists to remove both of those problems. It is an open source, full stack codebase that wires together everything a serious SaaS needs, with conventions an AI agent can actually follow, and it runs entirely on Cloudflare, so your infrastructure starts free and scales for pennies. This is the first real post on this blog, so let me introduce what it is and why it is built the way it is.
PageZERO is a complete starter codebase you own outright. Run one command:
bunx pagezero@latest init
You get a complete TypeScript project with authentication, payments, role based permissions, email, a database layer, UI components, testing, and a full CI/CD pipeline already connected and tested. You write product code on day one instead of glue code.
It is important to be precise about what PageZERO is not. It is not a framework and not a hosted service. There is no runtime dependency on PageZERO, no contract to honor, no upgrade treadmill. After the init command you have a normal repository. Keep what you need, delete what you do not, replace anything you disagree with. Every line is yours under the MIT license.
The most distinctive choice in PageZERO is that it is Cloudflare native from top to bottom. Most starters assume Vercel for hosting and a separate provider for the database. PageZERO instead uses one integrated platform, and that decision drives both the architecture and the economics.
Here are the parts of Cloudflare a PageZERO app uses:
| Job | Cloudflare service | What it does |
|---|---|---|
| Compute | Workers | Runs server side rendering and API routes in 300+ cities, close to the user |
| Database | D1 | A serverless SQLite database that lives at the edge next to your Workers |
| Static files | Assets | Serves JS, CSS, and images from the global CDN |
| Bot protection | Turnstile | Blocks form spam with an invisible challenge, no annoying CAPTCHA |
Because compute and data sit in the same edge network, requests do not hop across regions to reach a distant database. Code runs in the data center nearest the visitor, and Workers have no cold starts, so there is no slow first request after a quiet period.
| 🟠 Cloudflare | ▲ Vercel | ☁️ AWS | |
|---|---|---|---|
| Requests | 3M/mo | 1M/mo | Lambda: 1M/mo |
| Database | D1: 5 GB, 5M reads/day | Neon: 0.5 GB | RDS: 20 GB (12-mo trial) |
| KV Storage | 1 GB, 100K reads/day | Upstash: 256 MB, 16K cmd/day | DynamoDB: 25 GB |
| Object Storage | R2: 10 GB | Blob: 1 GB | S3: 5 GB |
| Egress | $0 | $0 (up to 100 GB) | $0 (up to 100 GB) |
| 🟠 Cloudflare | ▲ Vercel | ☁️ AWS | |
|---|---|---|---|
| Base Price | $5/mo | $20/user/mo | Pay-as-you-go |
| Requests | 10M/mo + $0.30/M | 10M/mo + $2/M | $0.20/M requests |
| Database | D1: 5GB + $0.75/GB | Neon: $0.35/GB | RDS: ~$13/mo + $0.115/GB |
| KV Storage | $0.50/M reads, $5/M writes | Upstash: $2/M commands | $0.25/M reads, $1.25/M writes |
| Object Storage | R2: $0.015/GB/mo | Blob: $0.023/GB/mo | S3: $0.023/GB/mo |
| Egress | $0 | 1 TB/mo + $0.15/GB | 1 TB/mo + $0.09/GB |
Two numbers do most of the work here. Egress on Cloudflare is always $0, so a viral moment never turns into a four figure bandwidth bill. And the database does not charge you a flat fee just for existing, the way a managed Postgres instance does. Pay for what you use, scale gradually, no idle tax.
The way we write code has changed. AI agents like Cursor and Claude now write a large share of it. They are fast, but they struggle with architectural decisions and can quietly introduce security holes when they improvise on a generic template.
A well structured, open codebase is the fix. PageZERO ships with an AGENTS.md
file that agents actually read. The moment an agent opens the project it understands the architecture, the conventions, and how to add a feature correctly. The module layout is predictable, every UI component follows the same four file pattern, and TypeScript is strict throughout, so an agent can reason about a function from its signature alone.
PageZERO also bundles agent skills under .agents/skills/
. You can ask in plain language to scaffold a component, change the theme, open a pull request, or merge one, and the agent runs a structured workflow that follows the project conventions every time. You move fast with AI without trading away quality or security.
Each capability lives in its own module under apps/
, so you can keep it, remove it, or extend it:
This is not a weekend project cranked out to win a feature count. It is engineered to last, with unit and end to end tests included, strict TypeScript throughout, and a CI/CD pipeline that runs on every push.
I made PageZERO fully open source because transparency is the strongest foundation you can build on. Most quality SaaS boilerplates are closed source and paywalled, so you rent someone else's architecture without ever seeing inside it. When every layer of your stack is open and community driven instead, you get the stability, security, and longevity that no proprietary shortcut can match. You can audit it, fork it, and trust it.
There is a practical angle too. Asking an AI agent to generate a codebase of this quality from scratch can cost anywhere from $100 to $300 in tokens on a frontier model like Claude Opus, and the result is usually worse. PageZERO gives you a better starting point for free.
If any of this resonates, the fastest way to understand PageZERO is to run it:
bunx pagezero@latest init
You only need Bun and Node.js. From there:
Build your startup on solid foundations. Start free, scale for pennies, own every line.