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.
The deepspace package exposes three entry points. Each section of this reference documents the surface of one entry point, organized by feature.
import { ... } from 'deepspace' // React client SDK
import { ... } from 'deepspace/worker' // Cloudflare Worker runtime
import { ... } from 'deepspace/testing' // Playwright fixture (test files only)
Client - deepspace
Everything you import on the frontend - providers, hooks, components, and utility functions.
| Section | Covers |
|---|
| Auth | useAuth, useUser, AuthGate, AuthOverlay, signIn, signOut, getAuthToken |
| Records | useQuery, useMutations, RecordProvider, RecordScope, useUsers, useUserLookup |
| Messaging | useChannels, useMessages, useReactions, useChannelMembers, useReadReceipts, useConversation |
| Real-time | usePresence, usePresenceRoom, useYjsText, useYjsField, useCanvas, useGameRoom, useCronMonitor |
| Files | useR2Files, formatFileSize, isImageFile |
| Integrations | integration.post, OAuth helpers, platform-context exports |
| Payments | useSubscription, useCheckout, PricingTable, server helpers |
| Theming | DeepSpaceThemeProvider, applyDeepSpaceTheme, getUserColor |
Worker - deepspace/worker
Everything you import inside your Cloudflare Worker - DO base classes, schemas, auth verification, AI helpers.
| Section | Covers |
|---|
| Rooms | RecordRoom, YjsRoom, CanvasRoom, PresenceRoom, CronRoom, GameRoom, DOManifest |
| Schemas | CollectionSchema, RBAC types, drop-in collections, role constants |
| Server actions | ActionHandler, ActionContext, ActionTools, ActionResult |
| AI | createDeepSpaceAI, context compaction, chat history, built-in tools |
| Cron | CronTask, CronExecution, buildCronContext |
| Auth | verifyJwt, createDeepSpaceAuth, HMAC primitives |
| Bindings | runMigrations, meterAi, meterVectorize, meterUsage, manifest types |
| Proxy helpers | apiWorkerFetch, platformWorkerFetch, authWorkerFetch |
Testing - deepspace/testing
Multi-user Playwright fixture and account helpers.
TypeScript signatures
This reference shows the most common signatures and shapes. For exact type definitions - including generic constraints, optional fields, and discriminated unions - read the bundled .d.ts files:
| Module | Location |
|---|
deepspace | node_modules/deepspace/dist/index.d.ts |
deepspace/worker | node_modules/deepspace/dist/worker.d.ts |
deepspace/testing | node_modules/deepspace/dist/testing.d.ts |
If a hook or type isn’t documented in this reference, it probably exists in the .d.ts. Read the declaration before guessing.