Bring Your Own Database
There's this thought that's been on my mind a bit.
Every AI company is pushing the dawn of built-in-house apps. Paying for third-party tools is a thing of the past. Every company is going to just quickly build what they need, and it will be fast and low cost, and solve all their problems, and those pesky expensive engineers that need coffee to operate will no longer be needed.
Except the industry finally got to the place where they realized that isn't true. That maintaining software is usually the hardest part, not building it. That software engineers weren't just coders, and were in fact the architects, engineers and bricklayers of the entire software process.
Turns out, just because we've been able to automate the bricklayers for most of the repeatable work in software engineering, we don't need to get rid of the rest of the engineers. Not only are they still needed, but more than ever, the careful and experienced ones with an understanding of detailed patterns are needed to check not whether the syntax of a PR is correct, but whether the business logic is, and whether the AI understood its tasks well enough to actually behave as it's supposed to.
Rant aside, it really has never been easier to build software. We're in the age of the ephemeral app: a few scripts, a quick UI, and a repeated task just goes away. In the last year alone I've built:
- a smart calendar that syncs across my devices
- a security tool for my home server
- pages for building stories and worlds for my RPG campaigns
- a tracker for my childhood collections, with prices, quantities and versions
- daily briefings on sports, news and whatever else I'm following
- a library of quotes from books I've read, with one showing up on my calendar each day
- a handful of cooking skills
- and, somewhere in there, a company
I could go on. And that's the problem.
This is all nice for an engineer with arguably too much excitement and free time. But what about everyone else? It's never been easier to build software, but what about the willingness to understand how things work? How to deal with good UX, feature creep, package updates and so on.
It's easy to think it's never been easier, but being in tech keeps you in a bubble. Most people these days don't have a desktop. And outside of college students, many barely own a laptop; their phone or tablet is where most households stop these days.
"What's the point of all this then? I thought this was called Bring Your Own Database."
The point of it is that in the world of ephemeral products, they no longer need to be ephemeral. We no longer need to set up our backend and frontend servers, configure DNS, set up GitHub Pages, or care about API keys, usage limits, DDoS or storage limitations. It's difficult to do so.
What we can do is make the app available for download with a quick installer.
"But Steven, this is the cloud age and the age of the internet. Why would I install something like that on my laptop and then not have access to it on my phone?"
And my answer to that is: fair point, it's an issue for me as well. I built a D&D tool a few months ago and had a variety of friends asking to use it for their games. However, it just lived on either their device or in browser local storage, which, beyond not being the safest, just wasn't convenient.
So, trying to move fast, I just spun up a quick DB on render.com for it. However, beyond the 30 days of free storage, something like that costs money to keep up for others. So, looking at alternatives, I remembered how older apps from back in the day functioned: other RPG tools that relied on Patreon money and operated on slim margins. They all offered the same thing: "Connect your Google Drive for free storage."
We all have cloud storage in one manner or another; the tech giants make sure you're in their ecosystem and provide something. The integration of it is simple enough:
// The whole "backend" is a JSON file the user owns.
// No server, no database, no API keys to protect.
// 1. Local first: always works, even offline
saveLocal(data) -> IndexedDB (falls back to localStorage)
export(data) -> download "my-character.json" to their device
import(file) -> read the JSON back in and render it
// 2. Bring your own Drive: same JSON, synced to their cloud
connect():
load Google sign-in (accounts.google.com/gsi/client)
ask for scope "drive.appdata" // a hidden app folder; we can only see our own file
keep the access token in memory only
save(data):
file = find "campaign-data.json" in their Drive
body = { version, updatedAt, appVersion, data }
file exists ? PATCH it : POST a new one
load():
file = find "campaign-data.json" in their Drive
download it, check the shape, render it
This allowed us to easily just have the app available via a free GitHub Pages URL, and the integration with their Drive allowed me to just keep a JSON file on their device or in their Drive and have them manage multiple characters with it.
Is this a great pattern for software at scale? Of course not. But for tiny apps to be shared across the internet, for people to help each other out with tools from their more tech-savvy or tech-curious friends? Absolutely. I've been using this pattern a lot in the last few months, and intend to do so more in the future.
However, this isn't a fix-all. AI made coding and building software easier, but it didn't make hosting and maintaining any easier. That's still the hard part. BYODB brings to the forefront a world where, if we as a whole can agree on a single plug-and-play pattern for it, we could easily just share ideas, tools, and ephemeral or niche projects. The world is ever changing, and the patterns that were bad yesterday can find a good use case today.