# dev0 documentation

dev0 is a backend-as-a-service and DevOps platform built on Cloudflare Workers. Go from a chat prompt to a live production URL in about a minute — backend, web, and mobile in one loop — on a flat-rate plan, with a standalone export to your own Cloudflare account so you can leave whenever you want.

dev0 is **test-driven and type-driven**, so your AI (or your team) builds faster and gets it right the first time: every project ships a typed SDK and locked contracts, and you test before you deploy. See [Test-driven and type-driven](#test-driven-and-type-driven) below.

This reference covers every building block in the platform. Pick a section from the sidebar, or start with the map below.

![The dev0 console — projects, pillars, and the build loop](/dashboard/devops-journey/console-dashboard.png)

## How the platform is organized

A **Workspace** holds your team, billing, and one or more **Projects**. A Project is the isolation boundary: every piece of data, every deployment, and every API key belongs to exactly one Project. Inside a Project you compose eight building blocks:

| Section | What it is | Built on |
|---|---|---|
| [Users](/docs/users) | End-user accounts + auth for the app you build | Cloudflare D1 |
| [DataTables](/docs/datatables) | Typed base / table / row / column | Cloudflare D1 |
| [Realtime](/docs/realtime) | Live row streams over WebSocket | Durable Objects |
| [Vectors / RAG](/docs/vectors-rag) | Semantic search + grounded answers | Managed vector store |
| [Agents](/docs/agents) | Built-in AI agents, billed per request | Managed AI |
| [Storage](/docs/storage) | Object buckets and files | Cloudflare R2 |
| [Functions](/docs/functions) | Sandboxed edge functions (JS/TS, Dart) | Cloudflare Workers |
| [Sites](/docs/sites) | Static + framework sites | Workers + R2 |

Around those, four more sections handle access and shipping: [API Keys](/docs/api-keys), the [Gateway](/docs/gateway) (share links + branded access), [Standalone](/docs/standalone) (export to your own Cloudflare account), and the [Cookbook](/docs/cookbook) (paste-ready prompts).

## The build lifecycle

Every project moves through one loop, whether you drive it by hand, from the Web IDE, or from an AI agent:

1. **Plan** — decide what to build.
2. **Code** — write source, or prompt the agent.
3. **Build** — dev0 compiles on-platform. No local toolchain to install.
4. **Test** — run a Site's tests (`vitest-like` unit tests + a `state-management` contract suite) and smoke a Function in the sandbox or with `GET /health`, all on-platform, before anything goes live.
5. **Deploy** — ship only when green; your app goes live on a `dev0.stream` URL.
6. **Export** — own it: a standalone Worker you can run on your own account.

## Test-driven and type-driven

This is why dev0 is both **fast** and **accurate** — and why an AI agent can ship a whole app in one turn without leaving a trail of subtle bugs.

**Type-driven — accurate by default.** Every project bundle ships a `.dev0/` folder with a **typed SDK** (`dev0-client` / `dev0-server` + generated `*-types.ts`) and a **contracts manifest**: your own author-owned `openapi.json` / `asyncapi.json` / JSON Schemas, plus the locked dev0 platform reference contracts. Code — yours or your agent's — is written against real types and a real contract instead of a guessed API, so whole classes of integration mistakes never happen.

**Test-driven — proven before it ships.** You test on-platform, in the same engine that runs production, before you create a deployment:

- **Sites** — `dev0_sites_test` (the Web IDE **Test** / **State** buttons) runs in two modes: `vitest-like` for `*.test.*` / `*.spec.*` unit tests (`describe` / `it` / `expect`), and `state-management` for a built-in contract suite over your state store (`src/lib/store.ts`'s `createStore` / typed `defineStore` + `dispatch`) plus any `*.state.test.*` files. See [Sites](/docs/sites).
- **Functions** — `dev0_sandbox_run` executes a bundle (or a multi-file source map) in the sandbox **without deploying**, and `dev0_functions_execute` plus a `GET /health` route smoke the live deployment. See [Functions](/docs/functions).

**Ship when green.** Because the test loop runs before deploy, the build you ship is the build you proved — less rework, fewer regressions, faster delivery. Non-vanilla Site starters even ship a working `src/lib/store.ts` + `src/lib/store.state.test.ts` so the loop is wired from the first prompt.

## Two doors, one data plane

dev0 exposes the same project data plane two ways:

- **Humans** — the dashboard and the SDKs, authenticated with a Bearer token (JWT).
- **Agents** — the MCP server at `https://mcp.dev0.stream/mcp`, authenticated with an API key. Connect any MCP client (Cursor, Claude, Codex) and it can build inside one project. See [Cookbook → Connect an AI agent](/docs/cookbook#connect-an-ai-agent).

Auth always rides in HTTP headers — `Authorization: Bearer …` for humans, `X-Dev0-Key` + `X-Dev0-Project` for machines. Never put keys in request bodies or JSON-RPC arguments.

## Rules

dev0 is **flat-rate**. Every plan includes generous quotas across all eight building blocks; dev0 never sends usage-based invoices. New accounts start with a **14-day Pro trial** (no card required, once per account), and new Pro subscriptions get an **introductory first month at $15** (then $30/month). Billing is handled by Paddle as the merchant of record. Full details: [Pricing](/pricing).

| Plan | Monthly | Yearly |
|---|---|---|
| **Pro** | $30 | $264 |
| **Business** | $70 | $600 |
| **Enterprise** | $2,500 | $30,000 |

### Limits

Headline included quotas per account (each section page lists its own detailed table):

| Quota | Pro | Business | Enterprise |
|---|---|---|---|
| Object storage | 20 GB | 80 GB | Custom |
| DataTables storage | 10 GB | 50 GB | Custom |
| Function invocations / month | 500,000 | 2,000,000 | Custom |
| Realtime connection-minutes / month | 30,000 | 150,000 | Custom |
| End-user accounts (MAU) | 50,000 | 200,000 | Custom |
| Sites egress / month | 50 GB | 200 GB | Custom |
| Vectors stored | 200,000 | 400,000 | Custom |
| dev0 Auto (AI) requests / month | 5,000 | 25,000 | Custom |

When you reach an included cap, requests on that axis pause with HTTP `402` — the response carries `X-Dev0-Paywall-*` headers naming the exact limit — until you upgrade or add credits. Nothing is silently billed.

### Credits

**Usage credits** are an optional buffer on top of your plan. One **Credits Pack** is **$25/month**: on Business, each invited teammate is one pack (1 seat + 5,000 credits per period); extra fuel packs (10,000 credits, no seat) can be bought from Billing. With credits and on-demand spending enabled, overage draws down credits at published per-section rates instead of pausing. Credits don't roll over. The full model lives in [Workspace → Rules](/docs/workspace).

## Every page is agent-ready

Each page in this reference is plain Markdown. Use the buttons at the top of any page:

- **Copy as Markdown** — copy the page source to paste into your AI agent.
- **View as Markdown** — open the raw `.md`.
- **Agent setup** — wire dev0 MCP ([Cookbook → Connect an AI agent](/docs/cookbook#connect-an-ai-agent)).
- **Docs for agents** — the machine-readable docs index (`/llms.txt`).

## Where to go next

- Want builds that are fast *and* accurate? → [Test-driven and type-driven](#test-driven-and-type-driven)
- Building your first app from a prompt? → [Cookbook](/docs/cookbook)
- Connecting an AI agent? → [Cookbook → Connect an AI agent](/docs/cookbook#connect-an-ai-agent) and [Agents](/docs/agents)
- Picking a framework? → [Cookbook → Frameworks](/docs/cookbook/frameworks)
- Leaving the hosted platform? → [Standalone](/docs/standalone)
