Glacivis is in closed alpha. Learn what we're building →
Glacivis

Feature · cloud sync

Cloud sync that respects you being offline.

Most ELNs need the network. Glacivis works on a flight, in a basement microscopy room, on a train. When you reconnect, the queue replays in causal order and conflicts resolve deterministically.

Why local-first matters

"Local-first" is a software-architecture term, not a marketing phrase. It means the local copy of your data is the authoritative one, and the cloud copy is downstream of it — not the other way round. The practical consequences for a wet lab are unambiguous:

  • Your day's work is never blocked by a vendor outage.
  • You can keep a private workspace on disk that never touches a cloud at all.
  • If the cloud copy diverges, you don't lose your work — you reconcile it.
  • If you stop paying the vendor, you don't stop owning your records.

How conflict resolution works

Every mutation is timestamped with a hybrid logical clock (HLC): a monotonic logical counter combined with a wall-clock component. HLCs total-order events across distributed writers without depending on perfect clock sync, which is what makes them the right primitive for an offline-tolerant editor.

When you reconnect, the local op-log replays against the workspace folder. Two writers who edited the same entity offline produce conflicting ops; the HLC determines causal order and the conflict-resolution rules merge them. For most edits — adding a note, ticking a checklist item, attaching a file — the merge is automatic. For rare structural conflicts (renaming the same entity to two different names) the UI surfaces a prompt and asks you to pick.

The op-log is universal: every entity table writes through the same path (entityOps helpers in the desktop app's src/lib/sync/), and a dev-mode guard throws if any tracked-table mutation tries to bypass it. That's how the audit trail and the sync layer share the same substrate without drift.

Two storage tiers, clearly separated

Glacivis distinguishes private workspaces from shared workspaces at the storage tier, not just the permissions tier:

  • Private workspaces are local-only by default. They live at {appData}/lms/private-workspaces/{workspaceId}/ on your laptop. No bytes leave the machine unless you explicitly convert the workspace to shared.
  • Shared workspaces live in a dedicated cloud folder per workspace at {syncRoot}/lms/shared/{workspaceId}/. Folder access is the access boundary. Sharing is per-workspace, not per-account.

EU jurisdiction at the binding level

The cloud substrate is Cloudflare R2 (object storage) and D1 (SQLite-on-the-edge). Each binding declares jurisdiction = "eu" in wrangler.toml. That's not a runtime configuration we read from an environment variable; it's a deploy-time contract enforced by Cloudflare's control plane. EU-jurisdiction-bound R2 buckets and D1 databases physically reside in EU regions and route through EU points of presence.

What this means in practice. If your IRB, DPO, or institutional IT require an EU-only data path, you can point at the wrangler.toml binding block as evidence that the path is configured at the platform level, not at the application level.

What you can do today

  • Work in a private workspace that never syncs anywhere.
  • Convert a private workspace to a shared workspace with copy or transfer semantics.
  • Invite collaborators by sharing the cloud folder + sending the workspace code.
  • Promote, demote, or remove members from your role-based admin panel.
  • See sync state per workspace in the rail (online, offline, pending ops, last successful sync).
  • Browse and revert workspace versions; default retention is 10 versions, change-gated.

What's coming

  • Mode 2: published snapshots. Read-only versioned JSON-bundle snapshots in dedicated published/ slots, for collaborators who need access without ever editing. (Phase 2.)
  • Surgical re-publish. Update a published snapshot without re-uploading the entire workspace. (Phase 2.)
  • Shared-folder backend choice. Today's substrate is Cloudflare R2; an iCloud Drive / OneDrive / Dropbox option is on the roadmap for labs that prefer to use their existing provider.

Download Glacivis →