docs/versioned_docs/version-1.12.0/00200-core-concepts/00600-client-sdk-languages.md
The SpacetimeDB Client SDKs provide a comprehensive interface for building applications that connect to SpacetimeDB databases. Client applications can query data, invoke server-side functions, and receive real-time updates as the database state changes.
SpacetimeDB provides client SDKs for multiple languages:
To build a client application with SpacetimeDB:
spacetime generate to create type-safe bindings for your databaseThe SDKs handle establishing and maintaining WebSocket connections to SpacetimeDB servers. Connections support authentication via tokens (for example, from SpacetimeAuth) and provide lifecycle callbacks for connect, disconnect, and error events.
See Connecting to SpacetimeDB for details.
Each client maintains a local cache of database rows through subscriptions. Clients define which data they need using SQL queries, and SpacetimeDB automatically synchronizes changes to the subscribed data. The local cache can be queried without network round-trips, providing fast access to frequently-read data.
Clients receive automatic updates when subscribed data changes. The SDKs provide callbacks for observing:
Clients can invoke server-side functions to modify data or perform operations:
The generated client bindings provide compile-time type safety between your client and server code. Table schemas, function signatures, and return types are all reflected in the generated code, catching errors before runtime.
When selecting a language for your client application, consider these factors:
Choose a language your development team is comfortable with to maximize productivity and reduce development time.
Each language has its own ecosystem of libraries and tools. If your application depends on specific libraries or frameworks, that may influence your choice.
The functionality of the SDKs remains consistent across languages, so transitioning between them primarily involves syntax changes rather than architectural changes. You can even use multiple languages in the same project - for example, C# for a Unity game client and TypeScript for a web administration panel.
New to SpacetimeDB client development? Follow this progression: