DeepSpace SDK
Build real-time collaborative apps on Cloudflare Workers. Auth, storage, multiplayer, payments, and one-command deploys.
DeepSpace is a full-stack SDK for shipping real-time apps on Cloudflare Workers. One package gives you authentication, SQLite-backed data sync, role-based permissions, presence, collaborative editing, channel-based messaging, file storage, AI chat, scheduled jobs, payments, and deploys to <your-app>.app.space or your own custom domain.
Get started in three commands#
npm create deepspace@latest my-app
cd my-app
npx deepspace dev
The scaffold ships a Vite + React frontend, a Hono worker, file-based routing, Tailwind v4, a shadcn-style UI primitives kit, and six Durable Object classes wired into the SDK. Edit src/ and refresh the browser. When you're ready to ship, run npx deepspace deploy.
The SDK#
Three entry points cover the surfaces most apps need.
// Frontend (React)
import { RecordProvider, useQuery, useMutations, useAuth } from 'deepspace'
// Worker (Cloudflare Worker)
import { RecordRoom, verifyJwt, CHANNELS_SCHEMA } from 'deepspace/worker'
// Multi-user Playwright fixture (test files only)
import { test, expect } from 'deepspace/testing'
| Entry point | What lives here |
|---|---|
deepspace |
React hooks, providers, auth UI, theming, payments client, integration client |
deepspace/worker |
Durable Object base classes, schemas, JWT verification, AI helpers, metering |
deepspace/testing |
Playwright fixture and account helpers for multi-user tests |
A single CLI ships in the same package: npx deepspace dev, deploy, add, domain, and more.
What you can build#
DeepSpace is built for apps where state is shared across users. The SDK ships the primitives so you don't write them yourself.
- Multiplayer apps. Live cursors, presence, and per-collection RBAC out of the box.
- Collaborative editors. Yjs-backed text fields and shapes synced over WebSocket.
- Messaging products. Channels, DMs, reactions, and read receipts as drop-in schemas.
- AI applications. Streamed Claude, GPT, or Cerebras with multi-turn tool use over your records.
- SaaS with billing. Subscriptions, one-time products, and refunds via Stripe Checkout.
- Internal tools. Dashboards, trackers, and admin consoles with auth and storage built in.
How this site is organized#
| Section | What you'll find |
|---|---|
| Get started | Introduction, quickstart, installation, and a tour of the scaffolded project. |
| Core concepts | Architecture, the data model, permissions, real-time sync, and deployment. |
| Build with DeepSpace | Step-by-step guides for the features you'll use most: auth, data, messaging, collaborative editing, presence, files, AI chat, and payments. |
| Worker & server | Server actions, scheduled jobs, external APIs, and custom Cloudflare bindings. |
| Going to production | Custom domains and testing patterns. |
| SDK reference | Every export from deepspace, deepspace/worker, and deepspace/testing. |
| CLI reference | Every CLI command, every flag. |
Need help?#
- Join the Discord to ask questions and share what you've built.
- Browse the source on GitHub.
- Try the hosted app builder at deep.space.