The bar

A violinist is on stage, halfway through a set, reading from Solo Scores on a tablet. The venue's signal drops, as it always does. They turn the page.

The next piece has to appear, with their markings on it. Nothing on the screen can ask them to wait, retry or sign in. A musician who loses their music mid-performance won't use the app again.

That's the bar for the latest version of Solo Scores, refined over several versions since it started as a progressive web app in 2018. With no connection at all, a player has to be able to open any score, mark it up and reorder a playlist. Choosing a sync layer that could clear it, the deciding factor turned out not to be the data at all. It was sign-in.

Where the others fell short

Most offline-first databases come as a package: storage on the device, sync to the cloud, and their own sign-in to tie it together. That's convenient, and the data side was usually good. Scores were stored on the tablet and edits queued up while offline.

The catch is that bundling sign-in means the database decides what happens when a session lapses. Its answer is built for a typical app: refresh the session in the background, and if that fails, sign the user out or hold back the data until it's sorted. On office wifi you'd never notice.

Every service I tried did this to some extent. The music was on the device the whole time, but it sat behind a session that needed the server. On stage, after a long set with no signal, that turns a tablet full of music into a sign-in screen. For Solo Scores, that's the one failure that can't happen.

PowerSync stays out of auth

PowerSync doesn't have a sign-in system. The app's database lives on the tablet and is always open. When PowerSync wants to sync, it simply asks the app for credentials. If the app has none, sync waits. Nothing else changes.

That one decision makes it far more versatile:

  • I choose how people sign in, and I can change that later without touching how data is stored or synced.
  • I set the rules for a lapsed session. In Solo Scores it's ephemeral: losing it pauses sync, and never touches what's on the device.
  • Signing out is a decision, made by the user, or by the server when it's actually reachable, never by a library that couldn't phone home.

Everything else robust offline first needs is still there: what each device should hold is synced ahead of time, not just what you've opened, and offline edits are kept on the device until they're delivered. But none of it would matter if sign-in could still lock the door.

The secrets

  • Make the device the source of truth. If the app has to work with no signal, the cloud is for sharing, not storing.
  • Pick a sync layer that doesn't own your auth. Whoever controls sign-in controls whether the app opens.
  • Let sign-in gate the sync, never the app.