📄️ Sync Server
Verdant doesn't sync by default. It's offline-first, sync-optional. I built it that way because my goal is to support nice local-only anonymous experiences, and add sync & realtime on as an incentive to sign up (and potentially subscribe) to your app.
📄️ Authenticating Sync
To connect to sync, you must create an auth endpoint. This can be done automatically on the same server you use for sync, or you can define a custom endpoint on a different server.
📄️ Connecting a Client
To connect your client to the server, you must pass it sync configuration.
📄️ Presence & Profiles
Once you're syncing, presence info is available on client.sync.presence (where client is your instance of Client).
📄️ Advanced: Transports
Verdant can sync over HTTP requests or WebSockets. By default, it automatically uses HTTP when a user is the only one connected to a library, and switches to WebSockets when other users are online.
📄️ Synchronizing files
When you create files locally, they are flagged as unsynced until you next go online.
📄️ Pruning Invalid Data
Verdant has a lot of tricks up its sleeve for providing strong schema support while still making sure the data your app sees stays consistent, even when some peers haven't updated their app yet.
📄️ Server Persistent Storage
Verdant only supports SQLite-backed server storage at the moment, but in two flavors:
📄️ Access Control
Verdant has limited access for document access control in sync'd environments. This is still an early days, kicking-the-tires approach. As such I've limited the power of it to two modes: "shared" (default) and "private" (only devices you own can see the document).
📄️ Tips and tricks for working in distributed systems
After a year or so of building distributed apps on Verdant, here's some tricks I've picked up.