Sorta think you can build just about any app to both be decentralized, work offline-first, and work on any device

Patrick Toner
2 min readNov 29, 2022

--

Using:

1. A browser.

2. PouchDB.

3. Git + CI platform (github, gitlab)

Your app is “full stack in the browser”. This means all your data and (most) logic for the app is always right on the user’s device. The app reads/writes to Pouch and that’s it.

PouchDB is a P2P database that does not have a “system of record”. You can sync it with any other user. Just like git really. But unlike git it has full support for the Mongo query language and strong indexing support.

There is also now a git implementation that works directly in the browser too: https://isomorphic-git.org/

So now what I’m doing is using git for long-term data storage. It’s also a P2P tech and there’s a huge amount of commercial infrastructure available.

This is a big challenge because it means being far more deliberate with segregating your data based on which user actually needs to see it. But at the end of the day you can just commit that data to github, etc and deal with it there.

Now the CI pipeline has direct access to all of the user data and can do analytics + long-running queries and commit the result right back to git.

Then the user downloads that new data when they are online and get more info.

Then add an Ethereum node + IPFS node and real-time data complex multi-user apps with offline authentication are on the table.

The end result is an application that basically scales for free commercially via the major providers and allows users to step in and provide their own infrastructure and run the entire stack themselves right on their own machine.

The big differences are:

1. We are not going to ignore that the user has a powerful computer right in their hands just to go out and spend money on the cloud.

2. So getting a new user doesn’t cost the app company money. They simply connect their preferred git provider and store their own data.

This is such an enormous difference over apps that scale by using cloud services directly. Git is already a great way to prevent developer lock-in and far less complex than other solutions that sit behind most systems.

--

--

Patrick Toner

Software developer, teacher, baseball fan. Right now I really like #ethereum. I think everything is going to be robots soon.