BITCONNECT
checking…

One connection upstream.
Any number downstream.

A read-only SpacetimeDB relay holding a live replica of BitCraft's public state. Point the stock spacetimedb-sdk or your generated bindings at this host instead of upstream, change nothing else, and get the same data — without adding load to the game servers.

01Connect

Pick a module, subscribe, and the SDK maintains a local cache exactly as it would against upstream. No BitCraft token is needed — the relay issues its own identities; upstream never sees your clients.

typescript · spacetimedb-sdk
import { DbConnection } from './module_bindings';

DbConnection.builder()
  .withUri('wss://relay.example.com')   // ← the only change
  .withModuleName('bitcraft-live-12')
  .onConnect((conn) => {
    conn.subscriptionBuilder()
      .onApplied(() => console.log('local cache ready'))
      .subscribe(['SELECT * FROM player_state']);
  })
  .build();
shell · poke it first
curl https://relay.example.com/v1/ping
curl https://relay.example.com/v1/database/bitcraft-live-12/schema | jq '.tables | length'

02Surface

The relay speaks SpacetimeDB's v1 HTTP and WebSocket protocol, so existing tooling works unmodified.

GET/v1/database/{module}/subscribeWebSocket — the SDK connects here
GET/v1/database/{module}/schemaModule schema, as upstream publishes it
GET/v1/database/{module}Database info
POST/v1/identityRelay-local identity, no account required
GET/v1/pingLiveness
GET/healthzReady once every replica holds data

03Semantics worth knowing

Read-only

Subscriptions and SQL over the replicated tables. Reducer calls are refused — this is a window into the world, not a way to act on it.

Stale, never wrong

If upstream drops, connected clients keep a consistent snapshot while the relay reconnects, rather than being cut off mid-session.

Explicit refusals

Tables excluded from replication error at subscribe time. You will never mistake "not replicated here" for an empty result.

BITCONNEEEEEECT
hey hey hey · bitconneeeect