What problem does it solve?
Writing SpacetimeDB server modules in TypeScript requires precise knowledge of the SDK's schema builders, reducer context API, and export conventions, and small mistakes like wrong imports or missing exports silently break modules.
Core Features & Use Cases
- Schema and Table Definitions: Build tables with
table() and schema(), apply column types, primary keys, indexes, and scheduled tables using correct snake_case conventions.
- Reducers and Lifecycle Hooks: Implement reducers, init/connect/disconnect hooks, and database operations like insert, find, filter, update, and delete through
ctx.db accessors.
- Views, Procedures, and HTTP: Create per-user and anonymous views, query-builder semijoins, synchronous procedures, and inbound/outbound HTTP handlers.
- Use Case: When building a real-time game backend, use this reference to correctly define a scheduled tick reducer, per-player visibility views, and bigint-safe column types without trial-and-error.
Quick Start
Ask the AI to write a SpacetimeDB TypeScript module with a table and reducer following this SDK reference.