About this project

SpacetimeDB is an open-source project from Clockwork Labs that combines a relational database with a server runtime. Instead of deploying a separate web or game server between clients and a database, developers write application logic as a module in Rust, C#, TypeScript, or C++. The module defines tables and reducers (functions that mutate data). Clients connect directly to the database, call reducers, and subscribe to tables. When data changes, SpacetimeDB pushes updates to subscribed clients automatically, so clients do not need to poll or refetch. The README states that all application state is held in memory for fast access, while a commit log on disk provides durability and crash recovery, and that the system provides ACID guarantees. It is described as being used for the MMORPG BitCraft Online, whose backend runs as a single module. Installation is available via shell scripts on macOS/Linux and PowerShell on Windows, followed by a CLI login that authenticates with GitHub. A quick start command creates a project from a template, publishes it to Maincloud, and watches for file changes to rebuild and republish automatically. The database can also be run with Docker or built from source with Cargo. Server modules are supported in Rust, C#, TypeScript, and C++; client SDKs support TypeScript (React, Next.js, Vue, Svelte, Angular, Node.js, Bun, Deno), Rust, C# (standalone and Unity), and C++ (Unreal Engine). Documentation covers quickstarts, core concepts, tutorials, deployment, CLI and SQL references. The project is licensed under the Business Source License 1.1, which converts to AGPL v3.0 with a linking exception after a few years, so users are not required to open-source their own code.