> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deep.space/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

```bash theme={null}
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`.

[Follow the quickstart →](/get-started/quickstart)

## The SDK

Three entry points cover the surfaces most apps need.

```ts theme={null}
// 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](/get-started/introduction)       | Introduction, quickstart, installation, and a tour of the scaffolded project.                                                               |
| [Core concepts](/concepts/architecture)        | Architecture, the data model, permissions, real-time sync, and deployment.                                                                  |
| [Build with DeepSpace](/guides/authentication) | Step-by-step guides for the features you'll use most: auth, data, messaging, collaborative editing, presence, files, AI chat, and payments. |
| [Worker & server](/guides/server-actions)      | Server actions, scheduled jobs, external APIs, and custom Cloudflare bindings.                                                              |
| [Going to production](/guides/custom-domains)  | Custom domains and testing patterns.                                                                                                        |
| [SDK reference](/sdk-reference/overview)       | Every export from `deepspace`, `deepspace/worker`, and `deepspace/testing`.                                                                 |
| [CLI reference](/cli-reference/overview)       | Every CLI command, every flag.                                                                                                              |

## Need help?

* Join the [Discord](https://discord.gg/hcKSav5PpU) to ask questions and share what you've built.
* Browse the source on [GitHub](https://github.com/deepdotspace).
* Try the hosted app builder at [deep.space](https://deep.space).
