Sign in

Liveblocks vs. Electric Sync: documents and Postgres data

Liveblocks is a realtime collaboration platform that allows you to build multiplayer applications where users and agents can work together. It provides a sync engine that powers shared documents, text editing, presence, and more. Electric Sync (ElectricSQL) is a read-path sync engine that streams subsets of Postgres data, called shapes, to clients over HTTP, while writes go through your own API.

Electric Cloud is shutting down

Electric was acquired in 2026 and its cloud services are winding down.

Which should you choose?

Electric and Liveblocks solve different problems. Electric is how Postgres rows reach your clients, whereas Liveblocks is how people edit artifacts together.

Choose Liveblocks when several people work on the same canvas, document, or workflow at once, and their edits need to merge without overwriting each other. Choose Electric when Postgres is your source of truth and clients need a live local copy of selected rows, such as an issue list that updates as assignments change, while writes keep going through your existing API. Issue trackers often use both: business records in Postgres delivered by Electric, and the editable specification in a Liveblocks document.

Compare what gets synchronized

AreaLiveblocksElectric Sync
Core data modelShared documents in Storage. Shapes. Subsets of Postgres tables.
Read pathSubscribe to a room. Document changes, presence, and broadcast events arrive over WebSocket. Shape logs streamed to clients over HTTP, with CDN caching.
Write pathEdit the document from the client or from your server. Not included. Your API validates and writes to Postgres.
Conflict resolutionCRDT-based. Concurrent edits to objects, lists, maps, and text merge automatically. Your server decides. Postgres serializes writes, so the last write to a row wins.
Text editingBuilt in, with Tiptap, BlockNote, Lexical, and more. Not built in. Electric publishes examples that pair it with Yjs.
Ready-made UICursors, avatar stacks, comments, and notifications. None.
AuthenticationYour server issues access tokens using your existing auth. Your proxy or API gateway authorizes each shape request.
Self-hostingPaid add-on on the Enterprise plan. Open source. Run Electric next to your Postgres.
The main questionWhich parts of your app should people edit together?Which Postgres rows should each client keep a live copy of?

Follow a change from the client back to the client

Electric only handles the read path, so the write route stays with your application. Liveblocks applies edits to a shared document and sends them on. The two paths look like this:

StageElectric-based applicationLiveblocks document
User makes a changeYour app applies an optimistic update locally.Storage or an editor integration applies the edit locally.
Source-of-truth writeYour API validates the write and commits it to Postgres.The Liveblocks server applies the operation to the document.
Other clients updateElectric streams the changed rows to every subscribed shape.Liveblocks sends the change to everyone in the room.
ReportingQuery Postgres directly.Read the document, or keep a copy in your own database.

Electric's write guide covers online writes, optimistic updates, and persistent local state. What users see while a write is pending is up to your implementation. In Liveblocks Storage, the local edit shows immediately and the server confirms it.

Does Electric handle writes back to Postgres?

No. Electric is a read-path sync engine: it streams data out of Postgres but does not write into it. Its write guide documents several patterns, including online writes and persistent optimistic state, but your application builds and runs that write path.

For an issue tracker, you might keep accounts, issues, and assignments in Postgres, use Electric to deliver the relevant rows, and keep your existing API for updates. Check the full loop from a local edit through validation to the updated row arriving back at the client.

For a shared canvas, start with the operations on shapes, lists, and text. Check whether Liveblocks Storage represents those interactions directly, then decide how that document connects to your business records.

Can Electric work with Yjs?

Yes, by adding Yjs yourself. Syncing a row that contains a paragraph does not define how two people's edits to that paragraph merge. Electric publishes examples that combine its sync with Yjs: Yjs merges the text, and Electric carries the Yjs updates through Postgres. Liveblocks ships Yjs-based editor integrations that handle the same merging without a separate transport.

With either design, decide which representation of the content is the source of truth. If you also keep a searchable or reportable copy, define how that copy updates and how much delay your app can tolerate.

Pricing and deployment

Electric Cloud charges for writes and retention; reads, egress, and concurrent users are free. Pay-as-you-go is $1 per million writes and $0.10 per GB-month of retention, with monthly bills under $5 waived. Live Postgres changes add $2 per million writes on top. Pro is $249 per month, which acts as prepaid usage credit at a 10% discount. Your Postgres hosting, your write API, and any editor layer such as Yjs come on top of that.

For Liveblocks, include the collaboration usage plus your application back end. Your plan's credits apply once across all Liveblocks usage.

Electric is open source and can be self-hosted alongside your Postgres. Liveblocks offers self-hosting as a paid add-on on the Enterprise plan. Either way, your own servers, database, backups, and operations are part of the budget.

Get started

Explore the whiteboard example, then use the canvas guide to see where document state, presence, and application tools fit.

Start building with Liveblocks for free. For self-hosting, contact sales.