A user reinstalls your app, the local database is empty, and your launch logic treats them as brand new — even though their data is safe in your cloud. RestoreKit detects that exact moment and rehydrates from your source of truth: resumably, idempotently, and crypto-aware.
Pure-Dart engine · Supabase, drift & secure-storage adapters · runnable demo · 36 passing tests
The naive fix — "if local is empty, pull from cloud" — breaks in four ways, and each one is its own outage.
A genuinely new user also has an empty local DB. Always-pull hammers your backend; never-pull loses returning users. After a reinstall the auth session is gone too — so you can't even check until they sign back in.
If your local DB is encrypted, the key lived in secure storage — also wiped. You must recover it before writing a single row. That's a real design decision, not an afterthought.
A 4,000-record pull dies at 2,200 on hotel wifi. Without a checkpoint, the next launch can't tell "done" from "half-full" — so you either lose rows forever or restart from zero.
A timed-out manifest request falls through to onboarding, and a returning user stares at a fresh-install screen. A transient blip must mean "retry" — never data loss.
Four steps, behind the scenes — your user just sees their data come back.
The OS wiped local storage, so the on-device database is empty.
After sign-in, RestoreKit sees an empty device + an account that has data in your cloud → returning, not new.
It restores from your own backend (Supabase, Firebase, your API) in resumable batches.
Safely, no duplicates — even if the download is interrupted. No blank screen, ever.
🔒 RestoreKit has no server and stores nothing — it moves your data, from your cloud, on the device. It never sees or keeps your users' data.
ifRestoreKit resolves what a launch means from the four signals that matter, then runs a resumable restore you can watch.
// 1. What does this launch mean? switch (await resolver.resolve()) { case LaunchDecision.normalLaunch: goToApp(); case LaunchDecision.freshOnboarding: onboard(); case LaunchDecision.restoreAvailable: case LaunchDecision.resumeRestore: await restore(); } // 2. Run (or resume) it — observable + safe coordinator.states.listen(updateProgressUI); await coordinator.run(); // → restored | nothingToRestore | alreadyComplete
Zero Flutter / DB / network dependencies. Fully unit-testable and portable. Your stack plugs in through six small interfaces.
A durable checkpoint advances after every batch. An interrupted restore continues from the last cursor — no duplicates.
Bring your own key recovery — passphrase-derived, cloud-wrapped, KMS, biometric-gated. RestoreKit asks for the key, never dictates it.
Supabase (manifest + keyset pagination via RLS), drift (idempotent upserts), and a secure-storage checkpoint — drop-in for your stack. Firebase / REST are a small interface away.
Probe failures throw and force a retry — they're never collapsed into "new user." The one mistake that ruins trust, designed out.
Wipe the device, watch it restore, interrupt it, hit retry. Every guarantee on this page is backed by a test you can run.
Buy the weeks, not the glue. Full source, lifetime updates, instant access via GitHub.
Secure checkout via Polar · pay in your local currency · instant GitHub repo access + license key
Get notified about new adapters, releases, and deep-dive posts on offline-first & mobile security. No spam.
Building in public — follow along as the security/offline patterns get extracted.
No. Sync keeps two live stores in agreement. RestoreKit solves the cold-start case sync ignores: an empty device that must rehydrate from the cloud after a reinstall — including key recovery and resumable, idempotent restore.
Any. The core is backend-agnostic via six interfaces. A Supabase adapter ships in the box (keyset pagination + RLS); Firebase, a custom API, drift, sqflite, Hive, or Isar are a thin adapter away.
Yes — full source, yours to use under the license tier you buy, with lifetime updates.
Absolutely. Key recovery is optional — omit the KeyVault and you get the reinstall detection + resumable restore on their own.
Yes — buy above and you'll get GitHub repo access plus your license key instantly, with lifetime updates included.