The missing sync layer for modern apps
Build reactive, realtime, local-first apps directly on Postgres.
- Access rules
- Sync shapes
- Live queries
- Local writes
Authorize and control Control data access with row‑level DDLX rules.
Electrify tables to opt them in to sync. Then grant and assign permissions using your existing data model.
ALTER TABLE projects
ENABLE ELECTRIC;
ELECTRIC ASSIGN 'projects:owner'
TO projects.owner_id;
ELECTRIC GRANT ALL
ON projects
TO 'projects:owner';
ELECTRIC GRANT SELECT
ON projects
TO ANYONE;
Craft how data syncs onto your app using Shapes.
Shapes allow you to manage dynamic partial replication between Postgres in the cloud and SQLite or PGlite in the local app.
const shape = await db.projects.sync({
where: {
owner_id: auth.user_id
},
include: {
issues: {
include: {
comments: {
include: {
author: true
}
}
}
}
}
});
Bind realtime data to your components with Live queries.
Queries are type-safe, reactive and run purely against data synced onto the local SQLite or PGlite, with 100% full SQL support.
const MyComponent = () => {
const db = useElectric()!
const { results } = useLiveQuery(
db.projects.liveMany({
where: {
status: true
},
orderBy: {
name: 'asc'
}
})
)
return (
<List items={results} />
)
}
Take the network off the interaction path with Local writes.
No need for a state management library. Writes are immediate, reactive, replicated and conflict‑free.
const MyComponent = () => {
const db = useElectric()!
const { results } = useLiveQuery(
db.projects.liveMany()
)
const add = () => {
db.projects.create({
data: {
id: crypto.randomUUID()
}
})
}
return (
<List items={results} add={add} />
)
}
Anurag Goel
Founder - Render
ElectricSQL is a great choice for a local-first sync layer that you can run anywhere yourself.
Johannes Schickling
Founder - Prisma
I’m very impressed with ElectricSQL’s approach to sync and their thoughtful API design.
José Valim
Creator - Elixir
ElectricSQL brings the full power of the Erlang VM to local-first software development.
For
Modern UX
- Instant reactivity
- Realtime multi‑user
- Conflict‑free offline
Local-first data access makes your apps instantly responsive and consistently fast.
Realtime multi-user replication keeps your data in sync between users and devices.
Conflict-free offline solves connectivity and concurrency issues for you using CRDTs, Rich-CRDTs and strong eventual consistency.
For
Operational simplicity
- Simple to operate
- Cheaper to run
- Reliable by design
Reduce the diversity and workload of your backend services by standardising on a simple, scalable replication protocol.
Move data and compute workload onto the local device for a huge reduction in your cloud compute bill.
Queries
Database queries
per second
1,000
Workload
Percentage of
workload reduced
85%
Local-first apps naturally tolerate network and backend downtime, so you don't need to engineer such high uptime.
Downtime
Time per
month
3 hours
System
Actual
reliability
99.5%
End-user
Target
reliability
99.999%
Using
Your existing stack
- Standard open‑source
- Drop‑in compatible
- Existing applications
Permissive license. No operational lock-in. Works with any Postgres‑based system.
Self-host
One horizontally scalable sync service. No complex infra or durability requirements.
Any Postgres
Works with your existing data model and any Postgres that supports logical replication.
Works with your existing data model, migrations tooling, web framework and component library.
Designed to provide an incremental adoption pathway for your existing brownfield applications.
Switch from REST
Swap out your REST API endpoints for ElectricSQL and you'll never need to code imperative state transfer again.
Find out how »Switch from Redux
You don't need a state management framework when you can code directly against a local reactive database.
Find out how »Switch from GraphQL
Swap out your GraphQL layer for ElectricSQL for realtime multi-user and local-writes without rollbacks.
Find out how »Next steps
Get started
Jump into the Quickstart guide for the fastest way to get ElectricSQL up and running. Or checkout the Examples and the Usage and Integration guides.