# Sync
> solved
Composable sync primitives.
That work with your stack.
> [!IMPORTANT] Instructions for coding agents
> Coding agents should read [AGENTS.md](/AGENTS.md) for instructions and guidance.
## Table of Contents
### Product
- [Electric](/product/electric.md): Sync little subsets of your Postgres data into local apps and services.
- [Cloud](/product/cloud.md): Hosted Electric sync that's blazing fast and scales to millions of users
- [PGlite](/product/pglite.md): Sync into a lightweight WASM Postgres with real-time, reactive bindings.
### Use cases
- [Data sync](/use-cases/data-sync.md): Replace APIs, data fetching and network error handling with data sync.
- [Local-first software](/use-cases/local-first-software.md): Take the network off the interaction path and build software that works offline and is resilient by design.
- [Cache invalidation](/use-cases/cache-invalidation.md): Replace ttls and expiry policies with realtime sync and automated invalidation.
- [Local AI](/use-cases/local-ai.md): Sync data for local AI from your existing business systems. For zero latency retrieval and zero inference cost.
- [Cloud cost reduction](/use-cases/cloud-costs.md): Take the query workload off your database and the compute workload off your cloud.
### Docs
- [Documentation](/docs/intro.md): Welcome to the ElectricSQL developer documentation!
- [Quickstart](/docs/quickstart.md): Get up-and-running with Electric and TanStack DB. Install, develop and deploy a super-fast, reactive web app, based on real-time sync of your Postgres data.
- [Sync stacks](/docs/stacks.md): Electric provides composable sync primitives that allow you to add real-time sync to your existing stack, without imposing technology choices, code changes or data silos.
- [AGENTS.md](/docs/agents.md): Documentation for guiding coding agents to develop apps with Electric.
### Guides
- [Auth - Guide](/docs/guides/auth.md): How to do authentication and authorization with Electric.
- [Shapes - Guide](/docs/guides/shapes.md): Shapes are the core primitive for controlling sync in the ElectricSQL system.
- [Writes - Guide](/docs/guides/writes.md): How to do local writes and write-path sync with Electric.
- [Installation - Guide](/docs/guides/installation.md): How to install and run Electric.
- [PostgreSQL Permissions - Guide](/docs/guides/postgres-permissions.md): How to create and configure PostgreSQL users with the necessary permissions for Electric.
- [Deployment - Guide](/docs/guides/deployment.md): How to deploy the Electric sync engine.
- [Security - Guide](/docs/guides/security.md): How to secure data access and encrypt data with Electric.
- [Troubleshooting - Guide](/docs/guides/troubleshooting.md): Tips and FAQs on how to run Electric successfully.
- [Client development - Guide](/docs/guides/client-development.md): How to write an Electric client for any language that speaks HTTP and JSON.
### API
- [HTTP API](/docs/api/http.md): The HTTP API is the primary, low level API for syncing data with Electric.
- [Sync service](/docs/api/config.md): Configuration options for the Electric sync engine.
#### Clients
- [Typescript Client](/docs/api/clients/typescript.md): Electric provides an Typescript client for streaming Shapes from Postgres into the web browser and other Javascript environments.
- [Elixir Client](/docs/api/clients/elixir.md): Electric provides an Elixir client and a Phoenix integration.
### Integrations
#### Frameworks
- [LiveStore - Integrations](/docs/integrations/livestore.md): How to use Electric with LiveStore.
- [MobX - Integrations](/docs/integrations/mobx.md): How to use Electric with MobX.
- [Next.js - Integrations](/docs/integrations/next.md): How to use Electric with Next.js.
- [Phoenix - Integrations](/docs/integrations/phoenix.md): How to use Electric with Phoenix.
- [React - Integrations](/docs/integrations/react.md): How to use Electric with React.
- [Redis - Integrations](/docs/integrations/redis.md): How to use Electric to sync data into Redis.
- [TanStack - Integrations](/docs/integrations/tanstack.md): How to use Electric with TanStack. Including using Electric for read-path sync and TanStack Query for optimistic writes.
- [Yjs - Integrations](/docs/integrations/yjs.md): How to use Electric with Yjs.
#### Platforms
- [Amazon Web Services (AWS) - Integrations](/docs/integrations/aws.md): How to deploy Electric on Amazon Web Services (AWS).
- [Cloudflare - Integrations](/docs/integrations/cloudflare.md): How to use Electric with Cloudflare.
- [Crunchy Data - Integrations](/docs/integrations/crunchy.md): How to use Electric with Crunchy Bridge managed Postgres.
- [Digital Ocean - Integrations](/docs/integrations/digital-ocean.md): How to deploy Electric on Digital Ocean.
- [Expo - Integrations](/docs/integrations/expo.md): How to use Electric to sync data into Expo apps.
- [Fly.io - Integrations](/docs/integrations/fly.md): How to deploy Electric on Fly.
- [Google Cloud Platform (GCP) - Integrations](/docs/integrations/gcp.md): How to deploy Electric on Google Cloud Platform (GCP).
- [Neon - Integrations](/docs/integrations/neon.md): How to use Electric with Neon's serverless Postgres.
- [Netlify - Integrations](/docs/integrations/netlify.md): How to deploy Electric apps on Netlify.
- [PlanetScale - Integrations](/docs/integrations/planetscale.md): How to use Electric with PlanetScale Postgres.
- [Render - Integrations](/docs/integrations/render.md): How to deploy Electric on Render.
- [Supabase - Integrations](/docs/integrations/supabase.md): How to use Electric with Supabase. Including syncing data out of Supabase Postgres and into Supabase Edge Functions.
### Reference
- [Alternatives](/docs/reference/alternatives.md): Alternative projects and systems for syncing data and building local-first applications.
- [Benchmarks - Reference](/docs/reference/benchmarks.md): We run benchmarks for the Electric sync engine and the Electric Cloud, which hosts the sync engine behind a CDN.
- [Literature](/docs/reference/literature.md): A selection of research papers that relate to local-first software and distributed databases.
- [Telemetry](/docs/reference/telemetry.md): Electric provides telemetry data for real-time system monitoring.
### Demos
- [Burn](/demos/burn.md): Agentic system built on Postgres and a real-time sync stack.
- [AI Chat](/demos/ai-chat.md): Resilient, multi-user, multi-agent AI chat app powered by Electric.
- [Linearlite](/demos/linearlite.md): Local-first project management app built with Electric and PGlite.
- [Notes](/demos/notes.md): Collaborative note-taking app with sync powered by Electric and Yjs.
- [Pixel art](/demos/pixel-art.md): Collaborative pixel art editor with real-time multiplayer editing.
### Examples
- [Bash](/demos/bash.md): Example using Electric from a bash script.
- [Encryption](/demos/encryption.md): Example of how to implement encryption with Electric.
- [Gatekeeper auth](/demos/gatekeeper-auth.md): Example of the gatekeeper pattern for API-based auth with Electric.
- [Next.js](/demos/nextjs.md): Example of an Electric app using Next.js.
- [Phoenix LiveView](/demos/phoenix-liveview.md): Example of a Phoenix LiveView app using Electric.
- [Proxy auth](/demos/proxy-auth.md): Example showing how to authorize access to Electric using a proxy.
- [React](/demos/react.md): Basic example of an Electric app using React.
- [Redis](/demos/redis.md): Example showing how to sync into Redis from Electric.
- [Remix](/demos/remix.md): Example of an Electric app using Remix.
- [Tanstack](/demos/tanstack.md): Example of an Electric app using Tanstack Query for optimistic state.
- [Todo app](/demos/todo-app.md): This is a classic TodoMVC example app, developed using Electric.
- [Write patterns](/demos/write-patterns.md): Four different patterns for handling writes in an Electric application.
- [Yjs](/demos/yjs.md): This is an example application using Electric with Yjs.
### About
- [About](/about/community.md): ElectricSQL is an open source project. We welcome new users, contributors, supporters and community members.
- [Team](/about/team.md): Meet the team, advisors and investors behind ElectricSQL.
- [Jobs](/about/jobs.md): Join a small, technical, multi-disciplinary team that's passionate about product, engineering and developer experience.
- [Contact](/about/contact.md): Get in touch with us by email or say hello on our community Discord.
#### Jobs
- [Founders Associate - Jobs](/about/jobs/founders-associate.md): We're looking for a generalist future founder to take over and manage as much of the company operations as you can.
#### Legal
- [Terms](/about/legal/terms.md): Using our software is entirely at your own risk.
- [Privacy](/about/legal/privacy.md): We privately store a limited set of personal information to identify and communicate with you.
- [Cookies](/about/legal/cookies.md): Websites don't save cookies, browsers do.
### Other
- [@electric-sql/docs](/CHANGELOG.md)
- [120 days of hardening â the postâ1.0 reliability sprint](/blog/posts/2025-08-04-reliability-sprint.md): Our last quarter was a reliability sprint. We set one goal: make ElectricSQL so boringâreliable that you stop thinking about it and just build.
- [A new approach to building Electric](/blog/posts/2024-07-17-electric-next.md): Electric Next is a new approach to building the ElectricSQL sync engine.
- [Announcing Durable Streams](/blog/posts/2025-12-09-announcing-durable-streams.md): A persistent stream primitive and HTTP protocol for reliable, resumable, real-time data streaming into client applications
- [Bringing agents back down to earth](/blog/posts/2025-08-12-bringing-agents-back-down-to-earth.md): Agentic AI, beneath all the hype, is actually just normal software. You can build agentic systems with a database, standard web tooling and real-time sync.
- [Building AI apps? You need sync](/blog/posts/2025-04-09-building-ai-apps-on-sync.md): AI apps are collaborative. Building them requires solving resumability, interruptibility, multiâtab, multiâdevice and multiâuser.
- [Demos](/demos.md): Demos and example applications build with ElectricSQL.
- [Development environments](/use-cases/dev-and-test.md): Eliminate system-level dependencies and ad-hoc data provisioning by replicating data into an embedded PGlite database.
- [Durable Streams 0.1.0 & State Protocol](/blog/posts/2025-12-23-durable-streams-0.1.0.md): The first official npm release of Durable Streams, introducing the State Protocol for database-style sync semantics and early community experiments
- [Electric 1.0 released](/blog/posts/2025-03-17-electricsql-1.0-released.md): With version 1.0 Electric is now in GA. The APIs are stable and the sync engine is ready for mission critical, production apps.
- [Electric 1.1: new storage engine with 100x faster writes](/blog/posts/2025-08-13-electricsql-v1.1-released.md): How we built a new storage engine for Electric, why we did it now, and how it delivers lower latency, higher throughput, and zeroâdowntime deploys.
- [Electric BETA release](/blog/posts/2024-12-10-electric-beta-release.md): The Electric sync engine is now in BETA. If you haven't checked out Electric recently, it's a great time to take another look.
- [Electric Cloud public BETA: Sync in 30 seconds](/blog/posts/2025-04-07-electric-cloud-public-beta-release.md): Electric Cloud is now in public BETA! This means it's open to everyone for immediate access.
- [ElectricSQL](/old-index.md): Sync little subsets of your Postgres data into local apps and services.
- [Local-first sync with Electric and TanStack DB](/blog/posts/2025-07-29-local-first-sync-with-tanstack-db.md): Tanstack DB is a reactive client store for building super fast apps on sync. Paired with Electric, it provides an optimal end-to-end sync stack for local-first app development.
- [Local-first with your existing API](/blog/posts/2024-11-21-local-first-with-your-existing-api.md): How to develop local-first apps incrementally, using your existing API.
- [Multi-user collaboration](/use-cases/multi-user.md): Replace ad-hoc sockets and broadcast channels with highly-scalable, low-latency fanout and sync.
- [PGlite Engineer - Jobs](/about/jobs/pglite-engineer.md): We're looking for a generalist web and systems engineer to join the core PGlite team, working mainly in Typescript, Rust and C++.
- [Untangling the LLM spaghetti](/blog/posts/2025-04-22-untangling-llm-spaghetti.md): LLMs are generating code. That code is imperatively fetching data. That leads to a big ball of spaghetti.
- [Untitled](/docs/_tutorial.md)
- [Untitled](/docs/llms/_intro_redux.md)
- [Untitled](/docs/llms/_quickstart_redux.md)
- [Untitled](/src/partials/home-cta.md)
- [Untitled](/src/partials/home-features-after.md)
- [Untitled](/src/partials/home-features-before.md)
- [Untitled](/src/partials/home-your-stack-simplified.md)
- [Vibe coding with a database in the sandbox](/blog/posts/2025-06-05-database-in-the-sandbox.md): More play less infra. With PGlite you can vibe code with a database built into the sandbox.