website/products/index.md
Composable sync primitives that work with your stack.
<ProductsGrid productPage />The sync primitives in the Electric stack are designed to work together and work with your API and existing infrastructure.
In the diagram below, the white boxes are your components / infra.
<figure> <a href="/img/products/electric-stack-overview.lg.jpg" target="_blank"> </a> </figure>Postgres Sync connects to your Postgres and syncs data over HTTP.
TanStack DB is the recommended client for application development. You can sync data into TanStack DB from Electric and/or from a Durable Stream. It also provides mutation primitives that work with your backend API.
PGlite is mainly used in dev, test and sandbox environments. You can use it as a standalone embedded database or you can sync data into it using Postgres Sync.
There are lots of options here. However, for most apps we recommend using Postgres Sync for data sync and TanStack DB for reactive state-management and optimistic mutations in the client.
See the building super-fast apps on sync post for more info.
::: details App development alternatives
pgvector (if they can tolerate a slightly heavier WASM dependency):::
Use Durable Streams for core durable transport for resilience and resumeability. Combine with TanStack DB for Durable Sessions with persistence and natural support for multi-user, multi-agent collaboration.
You can also use Postgres Sync to sync message history, metadata and structured elements and then join this up into a single, unified, reactive, client data model that combines structured and unstructured data using TanStack DB.
You can use the lower-level protocol layers of Durable Streams to craft your own sync protocol. Including passing a Standard Schema to the Durable State layer for an instant, type-safe sync protocol tailored to your data schema.
You can also integrate your own sync engine or data source into TanStack DB.
Embed PGlite for a full, reactive Postgres in your runtime. Including support for extensions like pgvector. This works in any JavaScript runtime, including WebContainers, avoiding the need for external infra dependencies.
You can also design your own TanStack DB collections, to bake reactive data management and custom actions into your runtime APIs.
Dive into the individual product pages and documentation.