From Bubble to an app in your own repository
Bubble apps run only on Bubble and cannot be exported as code, so moving to Meadowstack means rebuilding the screens and logic while the data comes across as CSV or JSON. The part to carry over with the most care is the privacy rules: Bubble enforces them on its server, so in the new app they belong in your database or your API as well as in the module's permission table.
By Bohuslav PoláčekChecked
| In Bubble | In Meadowstack | What changes |
|---|---|---|
| A data type and its fields | A table in your database and a type in the module's domain/types.ts | One schema checks a value in the form and again on the server |
| A field whose type is another data type | A foreign key, and a link from one record to the other | The related record opens beside its list, then as a full page |
| A privacy rule on a data type | A row level security policy or a check in your API, mirrored by domain/permissions.ts | The database refuses what the rule forbids; the screen only decides what to show |
| A workflow: an event that runs actions | A user action that calls the module's api, or a move in domain/workflow.ts | Each move writes an event in the record's history in the same transaction |
| An action that changes the database | A function in data/api.ts, typed by the module's contract | Pages import only that file, and one contract test runs against your backend |
| A page and its elements | A <Screen archetype> built from kit components | The screen type sets width, header and scroll; you do not position elements |
| Show and hide by condition | <Can do="…"> for actions, and the four states of every data view | Hidden actions are refused by the server too, and loading, error and empty are never skipped |
Why teams move
- The app should live in the company's own repository and run on a host the company chooses.
- The team wants to read, review and test the logic, and to let an AI coding tool change it by rules it can check.
- The app has grown roles and approvals, and the team wants one table that says who may do what, tested.
How the move goes
- Write down every data type, its fields and its privacy rules. Each rule is a sentence: "a draft is visible to its author and admins". These sentences become your permission table and your database policies.
- Write down every workflow as event and actions. A workflow that changes a status becomes a named move with its history event; one that only shows or hides something becomes screen code.
- Make the app's repository (
docs/recipes/start-your-own-app.md) and one module per kind of record, copied from the samplerequests(docs/recipes/new-module.md). - Build the screens against the simulated store first, so each one is seen loading, failing and empty before real data arrives.
- Export the data from Bubble and load it into your database once. With Postgres on Supabase, the framework's example has the migration with row level security and the adapter (Supabase); with your own API,
docs/recipes/connect-your-data.mdlists what each route must answer and refuse. - Run both apps on the same data until the people who use it daily sign off, then switch.
Before launch
- Every privacy rule has a policy or an API check, and the module's contract test passes against your backend.
- An action the screen hides is refused by the server: try it with
curland a person's token. - Real sign-in is in place, and user accounts are invited again: in 2.1 the starter's sign-in is for development only (Security).
What comes across and what does not
- Data comes across: Bubble exports a data type from its app data view as CSV, JSON or newline-delimited JSON.
- The app itself does not. Bubble's own documentation says its apps can only run on Bubble and there is no way to export an application as code, so pages, workflows and rules are rebuilt from your notes.
- The design can be the brief for the new screens, but the screens are made from kit components and tokens, not copied.
- Privacy rules come across as policies you write, and they matter most: they are what keeps one person's data from another today.
When to stay on Bubble
- Nobody on the team writes or reviews code, and nobody will own a repository, a database and a host.
- The app changes daily in its editor and the people changing it are not developers.
- The logic is simple, the roles are few, and the platform's hosting and privacy rules already do what you need.
A privacy rule, written as a database policy
create policy requests_select on public.requests for select
using (status <> 'draft' or requester_id = auth.uid() or public.app_role() = 'admin');Sources
Questions
Can I export my Bubble app as code?
No. Bubble's documentation says its apps can only run on Bubble and cannot be exported as code. The data can be exported, and the app is rebuilt.
In which formats does the data come out?
From the app data view, a data type exports as CSV, JSON or newline-delimited JSON, and Bubble sends a link to the file when the export is ready.
Where do privacy rules go?
Into the server: a row level security policy in Postgres or a check in your API, and the same rule in the module's permission table so the screen hides what the server refuses.
What happens to our users' accounts?
They move to the identity provider you choose for the new app. The starter in the framework signs in for development only, so real sign-in is part of the move.
Two ways
Build it yourself, or have it built
Have it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your appBuild it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the framework