Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • electric

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

  • Hi HN, James, Valter, Sam and the team from ElectricSQL here.

    We're really excited to be sharing ElectricSQL with you today. It's an open source, local-first sync layer that can be used to build reactive, realtime, offline-capable apps directly on Postgres with two way active-active sync to SQLite (including with WASM in the browser).

    Electric comprises a sync layer (built with Elixir) placed in front of your Postgres database and a type safe client that allows you to bidirectionally sync data from your Postgres to local SQLite databases. This sync is CRDT-based, resilient to conflicting edits from multiple nodes at the same time, and works after being offline for extended periods.

    Some good links to get started:

    - website: https://electric-sql.com

    - docs: https://electric-sql.com/docs

    - code: https://github.com/electric-sql/electric

    - introducing post: https://electric-sql.com/blog/2023/09/20/introducing-electri...

    You can also see some demo applications:

    - Linear clone: https://linear-lite.electric-sql.com

    - Realtime demo: https://electric-sql.com/docs/intro/multi-user

    - Conflict-free offline: https://electric-sql.com/docs/intro/offline

    The Electric team actually includes two of the inventors of CRDTs, Marc Shapiro and Nuno Preguiça, and a number of their collaborators who've pioneered a lot of tech underpinning local-first software. We are privileged to be building on their research and delighted to be surfacing so much work in a product you can now try out.

  • vaxine

    Rich-CRDT database based on AntidoteDB.

  • Hi HN, James, Valter, Sam and the team from ElectricSQL here.

    We're really excited to be sharing ElectricSQL with you today. It's an open source, local-first sync layer that can be used to build reactive, realtime, offline-capable apps directly on Postgres with two way active-active sync to SQLite (including with WASM in the browser).

    Electric comprises a sync layer (built with Elixir) placed in front of your Postgres database and a type safe client that allows you to bidirectionally sync data from your Postgres to local SQLite databases. This sync is CRDT-based, resilient to conflicting edits from multiple nodes at the same time, and works after being offline for extended periods.

    Some good links to get started:

    - website: https://electric-sql.com

    - docs: https://electric-sql.com/docs

    - code: https://github.com/electric-sql/electric

    - introducing post: https://electric-sql.com/blog/2023/09/20/introducing-electri...

    You can also see some demo applications:

    - Linear clone: https://linear-lite.electric-sql.com

    - Realtime demo: https://electric-sql.com/docs/intro/multi-user

    - Conflict-free offline: https://electric-sql.com/docs/intro/offline

    The Electric team actually includes two of the inventors of CRDTs, Marc Shapiro and Nuno Preguiça, and a number of their collaborators who've pioneered a lot of tech underpinning local-first software. We are privileged to be building on their research and delighted to be surfacing so much work in a product you can now try out.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • electric_dart

    A Dart implementation for Electric (electric-sql.com).

  • Hey, yup it's definitely a medium term objective.

    The team at SkillDevs are maintaining a Daft/Flutter client at https://github.com/SkillDevs/electric_dart

    Plus we have a thread to extract the core client-side replication component to Rust to be able to compile for multiple targets.

  • walex

    Postgres change events (CDC) in Elixir

  • Neat, this is the pattern I've been thinking about for a while now. Also glad to see this is Elixir based.

    I've been using https://github.com/cpursley/walex (basically a fork of cainophile via a fork for subabase) to listen to Postgres changes in Elixir.

  • cr-sqlite

    Convergent, Replicated SQLite. Multi-writer and CRDT support for SQLite

  • I am fully on the offline-first bandwagon after starting to use cr-sqlite (https://vlcn.io), which works similar to ElectricSQL.

    I thought the bundle size of wasm-sqlite would be prohibitive, but it's surprisingly quick to download and boot. Reducing network reliance solves so many problems and corner-cases in my web app. Having access to local data makes everything very snappy too - the user experience is much better. Even if the user's offline data is wiped by the browser (offline storage limits are a bit of a minefield), it is straightforward to get all synced changes back from the server.

  • EteSync Server

    The Etebase server (so you can run your own) (by etesync)

  • Are you / have you considered leveraging postgres' row level security for this (row filtering)? Feels like a natural fit for ensuring the right subset of data gets to the right users https://www.postgresql.org/docs/current/ddl-rowsecurity.html

    E2E encryption would also be nice to have, it could be worth having a look at https://www.etesync.com/ for inspiration

  • RxDB

    A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/

  • Congrats to the team. Once I’ve tried https://rxdb.info/ and it wasn’t funny at all to do the remote replication (PG) and to deal with conflicts. I do need to check this out!

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts