local-first/offline sounds cool. Users own their data. Interactions are instant because you've completely eliminated network latency.

You've completely eliminated it. Right?

… right?

Anyway.

No servers needed. Not a single server in sight.

I mean there's sync engine, but that's not a server! It's an engine! Vroom vroom!

It's alpha, but seems to work great!

Just me, my browser and my data. Life is good.

So. Where's my data?

IndexedDB, mostly. I can access it via the dev tools. Let's see there's some fine print here moves glasses down nose:

Made in PostgresSQL

Interesting. There's also a little currier stamp that reads:

SQLite Cache!

So. My data is in IndexedDB. And a sqlite cache. And a PostgreSQL database. Three copies. Redundancy, baby! Doesn't sound too complex. It all just seems to work.

And it does work. It feels fast. The data is mine so far as it's in my browser. These are great qualities, but at what cost? A sync engine and remote data store for syncing. I have to use a SPA architecture. Builds. Bloated bundles. Is this really the only way to build responsive and resilient applications?

Welcome to YAGNI club.

OK I got the pithy shit out of my system.

If I'm fully being honest I had the local-thirst for a minute there. Even helped deploy it and experienced the sharp edges first-hand.

If I'm still fully being honest I get angry when I think about. Not just local-first, but the web and industry broadly. We've been influenced in to thinking building web applications is so hard that you need overly complex solutions that funnel to paid services.

Thinking of the incentives. Vercel, AWS and many others make money when you believe servers and deploying are too hard without them. The marketing, defaults and developer tooling all start to reinforce that. I don't think that's the intent of anyone working with or on these technologies and in fact I think they're all very intelligent people working on hard problems. I'm just not convinced anymore the problems they're working on need to be my problems.

When I look at it all through the lens of making fast and resilient web applications I actually think the technologies you choose to work with are arbitrary. Any stack local-first or not. With React, NextJS, svelete, Datastar. You can produce something that is fast, responsive and resilient. Solves a business need. Delights and empowers users. These are table stakes. However the work needed to get there and maintain it is where I see more clear trade offs with winners and losers.

At the end of the day nothing will be gaining the knowledge and understanding of how everything works together. How easy is it to keep the system in one persons head? I think that's critical especially as we continue to offload more and more of our critical thinking and decision making to subscription based LLM providers. Just like they made servers seem too difficult they're now making thinking seem too difficult.

I'd rather be building the kinds of apps I can still explain myself. All the context and data is local-first in my mind.

Now with all the high-level emotional bits out of the way…

I built out the same app in a few different stacks exercising local-first, SPA (with and without RSC) and hypermedia approaches. Not to see which is the most performant, but to reason about how difficult they're to work with and reason about.

I've also been exploring some of my thoughts around this in the shape of a web application tool belt for JS runtimes (not a framework! at least I don't think it is) if you're wanting some more concrete technical ideas to chew on https://orion-tour.pages.dev.

Stay tuned!