Valence
An open source framework that turns a web app into a mobile app's interface, with signed updates that roll back on their own.
- Design and engineering, open source
- 2026
- Flutter, Dart, TypeScript, SQLite

The problem
Every UI change to a native app waits on App Store and Play review. Teams also end up writing the same logic twice, once for the web and once for mobile.
Shipping a web app inside a native shell solves the second problem, but the usual approaches make the first one risky. If a new web build breaks on start, every phone that downloaded it is stuck with a broken app until the next release.
What I built
Valence has two halves, published as packages rather than generated code:
- A Flutter host,
valenceon pub.dev. It ships through the stores once. It runs the web app in a WebView served from a local loopback server, keeps data in native SQLite, and handles updates and sync. - A web client,
@getvalence/bridgeon npm. Any SvelteKit app, or any SPA that builds to static files, becomes both the website and the app’s UI.
One schema generates both the Dart interface and the TypeScript client, so the two sides can’t drift apart.
Data lives in SQLite, starts from a seed bundled in the app, and syncs incrementally by sequence number (“everything after update 1234”). A correction to bundled data is just a newer row.
Decisions worth explaining
Every update is a trial. The web build ships as a signed bundle, and phones download only the files whose hash changed. On the next launch the new bundle runs as a trial. The web app calls ready() once it has painted, and that commits the update. If the app crashes, or ready() doesn’t arrive within 15 seconds of foreground time, the phone goes back to the last good version. A second failure marks the bundle bad. The bundle built into the app is the final fallback.
Rolling back is releasing forward. To undo a release everywhere, you release the last good commit again. It gets a higher sequence number, so every device moves forward to it, and there is only one direction to reason about.
The bridge is locked down. It only answers pages the app’s own server delivered, checked with a per-launch nonce. Every message is decoded strictly against the schema, and the page runs under a content security policy that comes from the signed manifest. Login tokens go to the Android Keystore, and the page can set or clear one but never read it back.
Staying inside store rules. Apple’s developer agreement allows downloaded interpreted code as long as it doesn’t change the app’s purpose, and Google Play exempts JavaScript in a WebView. Native code can never be downloaded, and the bundler refuses to package it.
Where it stands
Valence is open source under the MIT licence, at 0.4 beta. Everything has been built and run on Android. The iOS paths are written and specified but untested, because I have no Apple hardware to test them on. The README says so in its first paragraph.
You can try the full release flow, including a build that breaks on purpose, in the console on getvalence.dev.