Skip to content

Synced-Store

Synced-Store is a library for multi-player sync and persistence.

  • Chat apps and turn-based games work well
  • FPS games and other latency-sensitive real-time simulations do not work well
  • Data syncs relatively fast (under 1 second)
  • Users should generally never see a loading spinner — all mutations produce an instant local result that is later replaced with the authoritative server result

Components of a Synced-Store App

  • Schema — The shape of the store's data, plus the inputs for mutations and actions. Used for TypeScript type inference, LLM tool generation, and MCP integration.
  • Mutators — Functions that modify store data. Run on both client (optimistic) and server (canonical).
  • Actions — Server-only operations for things the client can't do: external API calls, randomness, private data access.
  • Services — Server-side dependencies injected by the platform into action contexts (API keys, blob storage, permissions, etc.).
  • Client Reference — The SyncedStoreClient API for querying, subscribing, and mutating data.
  • Limitations — Size limits, constraints, and what Synced-Store doesn't support.