# clockworklabs/SpacetimeDB

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/clockworklabs-spacetimedb).**

19,189 stars · 686 forks · Rust · other

## Links

- GitHub: https://github.com/clockworklabs/SpacetimeDB
- Homepage: https://spacetimedb.com
- awesome-repositories: https://awesome-repositories.com/repository/clockworklabs-spacetimedb.md

## Topics

`database` `dataoriented` `game-development` `mmorpg-server` `relational` `relational-database` `web-development` `web-framework`

## Description

SpacetimeDB is a stateful, real-time database platform that executes application logic directly within the database engine. By unifying data storage and business logic, it allows developers to build applications where state transitions are processed through atomic, server-side functions. The platform maintains persistent connections to stream incremental updates to clients, ensuring that local caches remain synchronized with the server state at all times.

The platform distinguishes itself by generating type-safe client interfaces directly from server-side schema definitions, ensuring consistent data structures across the entire application stack. It utilizes persistent event sourcing to record every state change to disk, which facilitates full data recovery and historical auditing. Furthermore, the system supports language-agnostic module deployment, allowing custom application logic to run within the database environment regardless of the source programming language.

Beyond its core execution model, the platform provides a comprehensive suite of tools for managing the full application lifecycle. This includes centralized identity and access management, task scheduling for recurring operations, and granular team-based project administration. Developers can interact with the system through a command-line interface that supports local development, testing, and the generation of type-safe bindings.

The platform offers flexible deployment options, supporting both managed cloud services and self-hosted infrastructure. It includes built-in monitoring and observability features, such as real-time log streaming and performance metrics, to assist in tracking data changes and function execution.

## Tags

### Data & Databases

- [Real-time Databases](https://awesome-repositories.com/f/data-databases/real-time-databases.md) — Executes application logic directly within the database engine while streaming state changes to clients via persistent connections.
- [Database Execution Engines](https://awesome-repositories.com/f/data-databases/database-execution-engines.md) — Executes custom application logic directly within the database engine to unify data storage and business logic.
- [Relational Database Management Systems](https://awesome-repositories.com/f/data-databases/relational-database-management-systems.md) — Implements a relational database engine that supports atomic transactions, SQL queries, and structured data storage.
- [Type-Safe Database Clients](https://awesome-repositories.com/f/data-databases/type-safe-database-clients.md) — Generates strongly-typed client interfaces from server-side schema definitions to ensure consistent data structures across the application stack. ([source](https://spacetimedb.com/docs/quickstarts/deno))
- [Atomic Transactions](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/connection-transaction-management/atomic-transactions.md) — Processes state transitions through isolated functions that automatically roll back changes on failure to maintain data integrity.
- [Real-time Data Synchronization](https://awesome-repositories.com/f/data-databases/real-time-data-synchronization.md) — Maintains live data consistency between server-side state and client-side caches through automated, persistent subscription streams.
- [Type-Safe Client Generators](https://awesome-repositories.com/f/data-databases/type-safe-client-generators.md) — Generates type-safe client interfaces directly from server-side schema definitions to ensure consistent data structures across the application stack.
- [Database Schema Definitions](https://awesome-repositories.com/f/data-databases/database-schema-definitions.md) — Enables the definition of structured data collections using tables, primary keys, and constraints. ([source](https://spacetimedb.com/docs/tutorials/chat-app))
- [Historical Data Querying Interfaces](https://awesome-repositories.com/f/data-databases/data-access-querying/historical-data-querying-interfaces.md) — Records every state change to disk to facilitate full data recovery and historical auditing of application state. ([source](https://spacetimedb.com/docs/intro/zen))
- [SQL Query Interfaces](https://awesome-repositories.com/f/data-databases/sql-query-interfaces.md) — Allows developers to execute standard SQL queries or use type-safe query builders to retrieve and filter records. ([source](https://spacetimedb.com/docs/databases))
- [Local Database Development Tools](https://awesome-repositories.com/f/data-databases/local-database-development-tools.md) — Provides a standalone server instance to facilitate development and testing of application logic and data structures. ([source](https://spacetimedb.com/docs))

### Web Development

- [Real-Time Frameworks](https://awesome-repositories.com/f/web-development/web-applications/real-time-frameworks.md) — Enables building stateful applications with integrated server-side logic and native real-time data synchronization to clients.

### Software Engineering & Architecture

- [Event Sourcing](https://awesome-repositories.com/f/software-engineering-architecture/event-sourcing.md) — Records every state change to disk by default to enable full data recovery and historical auditing of application state.
- [Reactive State Subscriptions](https://awesome-repositories.com/f/software-engineering-architecture/reactive-state-subscriptions.md) — Maintains persistent connections to push incremental database updates to clients, keeping local caches synchronized with server state.
- [Server-Side Logic Frameworks](https://awesome-repositories.com/f/software-engineering-architecture/server-side-logic-frameworks.md) — Supports writing custom server-side application logic in standard programming languages to handle business rules and state transitions. ([source](https://spacetimedb.com/docs/intro/key-architecture))

### Development Tools & Productivity

- [Type-Safe Binding Generators](https://awesome-repositories.com/f/development-tools-productivity/type-safe-binding-generators.md) — Generates type-safe client interfaces from server-side definitions during the build process to ensure consistent data structures.
- [Task Scheduling](https://awesome-repositories.com/f/development-tools-productivity/task-scheduling.md) — Allows developers to trigger server-side logic at specific future times by defining scheduling rules within data tables. ([source](https://spacetimedb.com/docs/tables))
- [CLI Development Tools](https://awesome-repositories.com/f/development-tools-productivity/cli-development-tools.md) — Provides a command-line interface to initialize projects, manage local server instances, and generate type bindings. ([source](https://spacetimedb.com/docs/quickstarts/remix))
- [Team Management](https://awesome-repositories.com/f/development-tools-productivity/team-management.md) — Allows users to group related databases into projects and manage granular access permissions for team members. ([source](https://spacetimedb.com/docs/databases))

### DevOps & Infrastructure

- [Database Lifecycle Management](https://awesome-repositories.com/f/devops-infrastructure/database-lifecycle-management.md) — Streamlines the operational lifecycle of database modules through integrated command-line tools and local development environments.
- [Cloud Deployment Platforms](https://awesome-repositories.com/f/devops-infrastructure/cloud-deployment-platforms.md) — Provides managed cloud hosting environments for deploying and scaling database applications without infrastructure overhead. ([source](https://spacetimedb.com/docs/databases))

### Networking & Communication

- [Websocket Connection Managers](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers.md) — Maintains persistent websocket connections to stream incremental updates while handling authentication and lifecycle events. ([source](https://spacetimedb.com/docs/clients))

### Security & Cryptography

- [Identity and Access Management Servers](https://awesome-repositories.com/f/security-cryptography/identity-and-access-management-servers.md) — Provides centralized user registration, authentication flows, and token issuance to verify identities and restrict access. ([source](https://spacetimedb.com/docs/core-concepts/authentication))
- [Access Control](https://awesome-repositories.com/f/security-cryptography/access-control.md) — Applies server-side filters and visibility rules to database queries to restrict client access to specific data subsets. ([source](https://spacetimedb.com/docs/tables))

### Programming Languages & Runtimes

- [Language-Agnostic Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/language-runtimes/language-agnostic-runtimes.md) — Supports language-agnostic module deployment, allowing custom application logic to run within the database environment regardless of the source language.

### System Administration & Monitoring

- [Monitoring and Observability](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability.md) — Offers real-time log streaming, performance metrics, and execution callbacks to monitor database state and function performance. ([source](https://spacetimedb.com/docs/tutorials/chat-app))
