App builders made the sandbox disposable: create it, fork it, restore it, throw it away. The database behind each generated app should work the same way.

I recently read Lovable's post on how they built their platform and why they keep rebuilding it. Their goal hasn't changed since the plan they wrote in 2023, but how they get there has changed several times. They gave agents more freedom, then deleted most of that code when the agents got stuck. They planned to fine-tune models, then found that short instruction files, retrieved at the right moment, worked better. Most recently, Lovable's engineers started forking the sandbox each generated app runs in: the whole running computer, including the application's database, so an agent can try two approaches from the same starting point.
Lovable belongs to a growing category of app builders, alongside tools like Bolt, Replit, v0 and many others, that turn a prompt into a working application. Their engineering teams work through versions of the same problems, and one of them sits underneath every generated app: where its data lives. Millions of these apps get created, most stay small, and agents keep rewriting them long after the first prompt.
Sandboxes have adapted to that pattern and my argument is that the database should too.
Lovable's post describes a progression that many teams in this category recognize.
At first, every change meant a fresh build. To make edits feel fast, they kept each project's sandbox and development server running, so a change could appear in the live preview without building a production bundle. Incremental type checks let the agent catch errors while the project kept running.
Next came persistence. Saving the source files wasn't enough, because an agent returning days later needed the running processes as well. Their stateful sandboxes checkpoint memory, CPU state, and disk, then restore all of it in seconds.
Then came forking. The same checkpoints let them copy a whole running environment, so agents can explore different directions from one starting point.
Agent state went the same way. In a separate post, Inside Chats, Lovable describes how each agent conversation is stored as an append-only log modeled on Git. Every event points to its parent, so any iteration boundary can start a new branch without copying the history before it. On a typical weekday, that system records roughly half a billion events.
The trend across app-builder infrastructure: anything an agent works on should be easy to snapshot and copy.
The database usually hasn't caught up. Most platforms use one of two setups:
Neither holds up when you have millions of apps and most of them sit idle.
The model that fits is one database per generated app, managed the same way as the app's sandbox. The database follows the app through its whole lifecycle:
Each database runs Turso, an open-source, SQLite-compatible database written in Rust, and has its own schema. Generated apps rarely share one: a recipe app and a booking tool have no tables in common, and the agent changes each one as the user adds features.
Because Turso is part of Supabase, questions that span every app have a home too. Platform-wide reporting, like usage across all generated apps, can run in Supabase alongside Turso, while each app keeps its own database.
In the same post, Lovable names trust as the hardest open problem in the category: one misunderstood request can delete data or break something that can't be undone.
Prompts and guardrails make those mistakes less likely, but they can't reverse one after it happens. That's the data layer's job.
A database per app helps in two ways. First, a bad migration or a runaway delete only affects one app's database. Second, point-in-time restore rolls that database back to the moment before the agent acted, and branching lets the agent test a risky change on a copy first.
Together, these give the platform an undo for user data.

App builders run their sandboxes and agent fleets in their own cloud accounts. Their apps' databases should run there too, next to the compute that uses them and under the same security controls.
Turso Cloud BYOC is Turso Cloud running in your own AWS account, with the same product and Platform API. The part of the control plane that creates and manages databases runs on your side, so every database operation happens in your account, and Turso's side holds only billing, organization settings, and metrics, with no access to your databases.
A platform can start on hosted Turso Cloud and move to its own account later without rewriting anything, and either way it doesn't have to build its own system for provisioning and scaling millions of databases. If your platform runs on GCP or Azure, talk to the team.
For the architecture in detail, read Turso Cloud BYOC: the same product, in your own AWS account. To check whether your platform needs it, see Do you need BYOC? A guide for technical leaders.
As generated apps grow up, app builders will face the question of where each app's data lives more often. It comes up when an app's users start taking payments, and again when the platform runs into enterprise requirements. Lovable recently had to change its data architecture for this reason. In their post on moving their frontend off Firestore, they explain that enterprise features, like granting a whole group access to a project and syncing users through SCIM, needed queries their original setup couldn't support.
With a database per app, the answer is simple. Most apps run in the platform's own cloud account. An app whose owner requires their own account can run its database there, on the same design. And when an app needs Auth or Storage, the platform can add Supabase alongside it.
If you're building an app builder and want each generated app to have its own database in your own cloud account, talk to the team. To try the database-per-app model first, start with Turso Cloud for free.