Realtime multi-user
As well as being instantly reactive, local-first also naturally supports multi-user collaboration. You write data locally and it syncs in the background between users and devices.
Remember, source code for the widgets in this introduction is in the examples/introduction folder of the main electric‑sql/electric repo.
Multi-user
Below, we've again embedded two demo apps. This time, they're both the same local-first app, being used by a different user.
Live Editor
As you can see, if one user interacts with the interface, the changes naturally sync to the other user. If you expand the live editor, you'll see there's no special code involved in making the app multi-user. You just read and write data to the local database and support for realtime collaboration is naturally built in.
Multi-platform
Sync also works across multiple devices and across web and mobile. For example, you can open the same demo app in your mobile browser:
Scan the QR code and scroll down a touch to see the same multi-user demo app. Also make sure you have the demo in view in this browser. Then have a play with both :) You'll see changes sync in realtime across your devices.
As we'll see in active-active replication, sync isn't limited to web and mobile. Before we dive into that, let's first see how realtime sync and conflict-free offline play together »