/electric

ElectricSQL local-first SQL platform. Develop instantly reactive apps with realtime multi-user and conflict-free offline support. For web and mobile. With active-active replication between Postgres and SQLite.

Primary LanguageElixirApache License 2.0Apache-2.0

ElectricSQL logo

Local-first software platform for developing web and mobile apps with instant reactivity, realtime multi-user collaboration and conflict-free offline. From the inventors of CRDTs. Based on standard open source Postgres and SQLite.

CI License - Apache 2.0 Status - Alpha Chat - Discord

Quick links

What is ElectricSQL?

ElectricSQL is a local-first software platform that makes it easy to develop high-quality, modern apps with instant reactivity, realtime multi-user collaboration and conflict-free offline support.

Local-first is a new development paradigm where your app code talks directly to an embedded local database and data syncs in the background via active-active database replication. Because the app code talks directly to a local database, apps feel instant. Because data syncs in the background via active-active replication it naturally supports multi-user collaboration and conflict-free offline.

How do I use it?

ElectricSQL gives you instant local-first for your Postgres. Think of it like "Hasura for local-first". Drop ElectricSQL onto an existing Postgres-based system and you get instant local-first data synced into your apps.

ElectricSQL then provides a whole developer experience for you to control what data syncs where and to work with it locally in your app code. See the Documentation and the Quickstart guide to get started.

Repo structure

This is the main repository for the ElectricSQL source code. Key components include:

  • clients/typescript — Typescript client that provides SQLite driver adapters, reactivity and a type-safe data access library
  • components/electric — Elixir sync service that manages active-active replication between Postgres and SQLite
  • generator — Prisma generator that creates the type safe data access library
  • local-stack — Docker Compose stack to run the backend services locally
  • protocol/satellite.proto — Protocol Buffers definition of the Satellite replication protocol

See the Makefiles for test and build instructions and the e2e folder for integration tests.

Team

ElectricSQL was founded by @thruflo and @balegas, under the guidance of:

See the Team and Literature pages for more details.

Contributing

See the Community Guidelines including the Guide to Contributing and Contributor License Agreement.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

It's also super helpful if you leave the project a star here at the top of the page☝️