Skip to content

Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres.

License

Notifications You must be signed in to change notification settings

hongsw-aibizon/electric

 
 

Repository files navigation

ElectricSQL logo

Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres.

CI License - Apache 2.0 Status - Alpha Chat - Discord

ElectricSQL

Sync for modern apps. From the inventors of CRDTs.

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 Introduction 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
  • 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☝️

About

Local-first sync layer for web and mobile apps. Build reactive, realtime, local-first apps directly on Postgres.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 54.0%
  • TypeScript 40.3%
  • HTML 4.3%
  • PLpgSQL 0.7%
  • Makefile 0.3%
  • Erlang 0.2%
  • Other 0.2%