ElectricSQL - Local-First Database
Basic Information
- Name: ElectricSQL (now called Electric)
- Official Website: https://electric-sql.com/
- GitHub: https://github.com/electric-sql
- Type: Local-first data synchronization platform
- Programming Language: Elixir/TypeScript
- License: Apache 2.0
- Major Change: Announced "clean rebuild" in July 2024
Product Description
ElectricSQL (now simply Electric) was initially a bidirectional sync engine from Postgres to SQLite for building local-first applications. In July 2024, the team announced a "clean rebuild" of the sync engine, halting development of the old version. The new Electric is repositioned as "data primitives and infrastructure for multi-agent systems," offering components like Postgres Sync, Durable Streams, TanStack DB, and PGlite.
Core Components (New Version)
Postgres Sync
- Syncs Postgres data to clients
- HTTP-based sync protocol
- Supports Shape subscriptions (selective sync of data subsets)
PGlite
- WASM version of PostgreSQL running in browsers and Node.js
- Full Postgres functionality available on the client side
- Supports extensions (e.g., pgvector)
TanStack DB
- Client-side database integrated with the TanStack ecosystem
- Reactive queries and state management
- Optimistic updates
Durable Streams
- Persistent event streams
- Used for data coordination in multi-agent systems
Technical Transformation
- Old Version: Bidirectional sync between Postgres↔SQLite, CRDT conflict resolution
- New Version: Unidirectional sync from Postgres + client-side state management
- Reason for Transformation: Old architecture was overly complex; new version is more pragmatic
- PGlite: Became an independent, significant project (Postgres in the browser)
Business Model
- Open-source core (Apache 2.0)
- Electric Cloud hosting service (planned)
- Enterprise support and consulting
Target Users
- Developers building local-first web applications
- Teams needing offline support for mobile/web applications
- Developers of multi-agent AI systems (new positioning)
- Postgres users requiring client-side sync
Competitive Landscape
- PowerSync: Most direct competitor, supports more backend databases
- Triplit: Full-stack local-first database (acquired by Supabase)
- Replicache: Client-side sync framework
- Evolu: End-to-end encrypted local-first framework
- Jazz: Local-first development framework
Relationship with OpenClaw
Electric's PGlite allows OpenClaw to run a full Postgres database in the browser, enabling fully local data storage and queries. This is highly valuable for scenarios requiring complex data operations while maintaining data locality.
Sources
External References
Learn more from these authoritative sources: