ElectricSQL solves the fundamental challenge of building applications that feel instant by moving data access to the client while maintaining PostgreSQL as the source of truth. Instead of making network requests for every data read, applications maintain a local copy of relevant data that updates in real-time through a persistent sync connection. User interactions modify local state immediately while changes propagate to the server and other clients asynchronously.
The shape-based subscription model allows applications to define exactly which data subsets each client needs, avoiding the bandwidth and storage costs of full database replication. A mobile app might subscribe to data for the current user's workspace, while an admin dashboard subscribes to aggregated metrics across all workspaces. As subscription shapes change based on user navigation or context, the sync engine efficiently adds and removes data from the local store.
ElectricSQL works with existing PostgreSQL databases by reading the WAL (Write-Ahead Log) for change detection, requiring no modifications to the database schema or existing server-side code. Client libraries for TypeScript and React provide hooks that make synced data feel like local state, with automatic conflict resolution handling the inevitable concurrent modifications in collaborative and offline-capable applications. The architecture supports millions of concurrent connections through horizontal scaling of the sync service.