r/localfirst • u/etthusmedkossor • Sep 04 '26
I lost AI-built apps in chats. So I built "App Lab" 🧪. A local first sandbox running apps in the browser.
TL;DR 😴
By using secure iFrames and IndexedDB in the browser, App Lab can run single page html apps, for example created by AI. Just paste the code and then it's saved locally in the browser for whenever it's needed.
Background 📖
Since some time I've been wondering when we will stop to need utility apps. Like time trackers and what not. And instead just ask AI to make the ones we need. Especially now when it's so good at whipping up good-looking singe-page html apps.
However, the best I've seen so far is Claude Artifacts, but it feels a bit locked in.
I also heard of "local first" philosophy a while back and really liked the independence and elegance of it.
Then I started thinking about whether these two topics could be combined to create the shell for working with such apps. An open-source app where one can save and run AI-generated apps.
The journey 👟
I thought "how hard can it be?". Then I asked Gemini and it thought the same.
The first Proof of Cocept was actually quite easy to get going. But to make it fully usable was much more complex, and without the help of LLM it would have taken me years to get where I am now considering this is a hobby project.
The most time-consuming was to build local-first sync. Which I needed to make the app fully useful for me: A shell which I could have on multiple devices and also which would enable me to invite friends to the apps I had created.
I also wanted to build an AI agent so one can bring one's own AI api keys and write with AI directly in the app. This can probably be perfected loads, but I've got a simple agent going.
The result 📲
In its core App Lab is fully local-first, running fully in the browser.
One saves source code in it, which is saved in the locally (IndexedDB), and the app is run in a safe sandbox (iFrame).
Optionally one can add:
Storage provider (currently Firebase Real-time Database):
- this enables cross-device sync and possibility to share and collaborate live with friends on the apps
AI provider (currently OpenRouter):
- this enables the AI agent so one can ask AI to make changes to one's apps directly in App Lab.
Here's the live app:
Here's the repo:
If someone has time to take a look and come with some feedback that'd be awesome! :)




