DEV Community

Kieren Day
Kieren Day

Posted on

I built a local-first Browser OS with $0 server costs (OPFS, Web Workers & zero-backend)

Most web applications today follow the same blueprint: heavy backend server instances, cloud database dependencies, aggressive telemetry, and recurring subscription walls.

For the past few months, I've been experimenting with the opposite extreme: What if you built a desktop-grade Browser OS that runs 100% inside the client's browser, keeps data sovereign on their local disk, and costs $0/month in server infrastructure?

That experiment became Cordoval (https://cordoval.work)—a local-first workspace merging productivity ("Work"), an offline economic simulation engine ("Play"), and an embedded RSS podcast client ("Cast") into a single tab.

Here is a look at the architecture, the modern browser APIs that made it possible, and a local-first growth experiment I'm running.

The System Architecture

To deliver a desktop-class experience entirely in browser memory and local storage without backend APIs, Cordoval relies on three core browser subsystems:

High-Performance Local Storage: OPFS + IndexedDB
Instead of hitting remote databases, data lives strictly on the user's disk:
• Origin Private File System (OPFS): Used for bulk binary assets, heavy document trees, and state snapshot files. OPFS provides near-native read/write file handle performance off the main thread.
• IndexedDB: Handles rapid key-value application states, user settings, and indexing.

Note: Zero database latency, full offline functionality, and complete data sovereignty—if the network goes down, the OS keeps running.

Off-Main-Thread Simulation: Web Workers
The Play module features a full economic sandbox (stocks, fixed-yield bonds, real estate) with background time-elapsed yield calculations.

To keep the UI running at 60fps glassmorphic rendering:
• All price fluctuation tickers and compound interest logic run inside dedicated Web Workers.
• State updates are passed back to the main UI thread via postMessage(), preventing UI jank or main-thread blocking.

Native Streaming & RSS Parsing: HTML5 Audio
The Cast module streams audio directly from podcast host URLs parsed client-side via native RSS feed enclosures using standard fetch() and HTML5 Audio APIs, eliminating the need for media proxy servers.

The "Local Sharewall" Experiment

Because Cordoval has no server backend, accounts, or telemetry, standard SaaS paywalls don't work. Instead, I'm testing a zero-backend Sharewall loop:

Active Usage Tracking: Using the Page Visibility API (document.visibilityState === 'visible'), the app tracks active foreground minutes locally.

The 30-Minute Trigger: After 30 active minutes, access pauses until the user triggers a social share.

Client-Side Unlock: Leveraging the native navigator.share() Web API, completing the share writes a 30-day forward expiration timestamp directly into localStorage.

While technical users could open DevTools and bypass the token, it provides a seamless, zero-friction viral loop for general users while preserving a zero-data-collection promise.

Challenges of Local-First Architecture

Building without a backend isn't without trade-offs. Two key browser hurdles remain:

• Mobile WebKit Storage Eviction: iOS Safari can evict IndexedDB/PWA storage for un-bookmarked apps after periods of non-use. Implementing strict export/import backup workflows is critical.
• CORS Restrictions on RSS Feeds: Some podcast hosts restrict cross-origin enclosure fetching via strict CDN headers, requiring carefully managed client-side fallback parsing.

Check It Out

Cordoval 8.0 is live at https://cordoval.work

If you're interested in local-first software, PWA architectures, or building serverless client-side applications, try it out and drop your feedback in the comments!

Top comments (0)