From Retool to an app you own
In Retool a query sits in the app beside the components that call it, and the resource it reaches is set up in Retool. On Meadowstack every call to your data goes through one file per module with a typed contract, so the screens never change when the backend does. The move is a rebuild of the screens on the kit, while your databases and APIs stay where they are.
By Bohuslav PoláčekChecked
| In Retool | In Meadowstack | What changes |
|---|---|---|
| An app | A module: one folder with its records, rules, data and pages | A module never imports another, so it can be switched on in the next app as it is |
| A resource: the connection settings for a database or API | Your backend, reached by the module's adapter (data/api.http.ts) | The credentials live on your server; the browser gets a token, never a database password |
| A query, written in the app beside its components | A function in data/api.ts, typed by the module's contract | Pages import only that file, and one contract test runs against every implementation |
| A component: a table, a form, a button | A kit component inside a <Screen archetype> | The archetype sets the width, the header and what scrolls; you do not place widgets on a canvas |
| JavaScript that transforms a query's result | The adapter's mapping from rows to the module's types | One place maps needed_by to neededBy, and the pages never see a raw row |
| Who may use a resource or an app | domain/permissions.ts: one table of actions per module, asked through can(action, record) | Rules can depend on the record, so nobody approves their own; your server enforces the same table |
| A loading spinner or an empty table you configure | The four states of every data view through <AsyncState> | npm run check fails a page that loads data and skips one |
Why teams move
- The app outgrew a tool for internal screens: clients, suppliers or field staff should use it, and it should look and behave like the company's own product.
- The team wants the code in its own repository, reviewed like the rest, and an AI coding tool that writes into it by rules it can check.
- Rules about who may do what have spread across queries and component settings, and nobody can say where the four-eyes check lives.
How the move goes
- List the Retool apps and, for each, the queries it runs. Each app usually becomes a module; a query that reads becomes a list or get function, a query that writes becomes a create, update or move.
- Make the app's repository with
npm run new-app(the recipedocs/recipes/start-your-own-app.md): the kit packed intovendor/, the rules for your coding tool and the checks. - Copy the sample module
requestsand rename it (docs/recipes/new-module.md): write the types, the states and the permission table before any screen. - Write the module's contract in
data/api.tsfrom your query list, and build the screens against the simulated store first, so loading, failure and emptiness are seen before real data arrives. - Connect your backend with
docs/recipes/connect-your-data.md: an HTTP adapter for the API you already have, or Postgres on Supabase with row level security (Supabase). - Run Retool and the new app side by side on the same data until the people who use it daily sign off, then switch.
Before launch
- Every action a Retool app allowed has a line in the module's permission table, and the server refuses what the screen hides: try it with
curland a person's token. - The contract test passes against a test instance of your backend.
- Every change writes its history in the same transaction, so the record shows who did what.
- Real sign-in is in place: in 2.1 the starter's sign-in is for development only, and the server side is yours (Security).
What comes across and what does not
- Your data and your APIs stay where they are. Retool connects to them through resources; the new app connects to the same systems through its adapter.
- The SQL of your queries is a good start for your backend's endpoints, because it already says what each screen reads and writes.
- The app itself does not run outside Retool. Retool exports a classic app as a JSON file or a Toolscript archive with its queries, components and modules, without resources or data; it is a record of what you built, not code for another framework.
- Permissions are written again, per action and per record, in
domain/permissions.ts.
When to stay on Retool
- The screens are for a few colleagues, change weekly, and nobody outside the team sees them.
- Most of the work is wiring many existing systems together, and nobody on the team wants to own a repository.
- You rely on the platform's hosting and access control for its resources and have no one to run a backend of your own.
The contract every query moves into
export type RequestsApi = {
/** The requests this person may read, newest first, matching the search (title, supplier, number, person). */
listRequests: (actor: Person, query?: RequestQuery) => Promise<PurchaseRequest[]>;
/** One request and its history, oldest event first; "Request not found" also when this person may not read it. */
getRequest: (actor: Person, id: string) => Promise<RequestRecord>;
/** A new draft by this person, with its number; writes a "created" event. */
createRequest: (actor: Person, input: RequestInput) => Promise<PurchaseRequest>;
/** Saves an edit and writes an "edited" event that says what changed (nothing changed: no event). */
updateRequest: (actor: Person, id: string, input: RequestInput) => Promise<PurchaseRequest>;
/** Moves requests along the workflow, all or nothing, one event each; a rejection needs a reason. */
moveRequests: (actor: Person, ids: string[], move: Move, reason?: string) => Promise<PurchaseRequest[]>;
/** A comment in the history of a request this person can read. */
addComment: (actor: Person, id: string, text: string) => Promise<void>;
/** Deletes a draft and its history for good. */
deleteRequest: (actor: Person, id: string) => Promise<void>;
/** Summaries outside the page (the sidebar count) reload when this moves. */
subscribeToChanges: (listener: () => void) => () => void;
getRevision: () => number;Sources
- Retool docs: queries and codeChecked
- Retool docs: resourcesChecked
- Retool docs: componentsChecked
- Retool docs: import and export classic appsChecked
Questions
Can I import a Retool app into the framework?
No. Retool's export is a JSON file or a Toolscript archive that Retool reads; it holds queries, components and modules but no resources or data. Use it as a list of what to rebuild.
Where do the queries go?
Into your backend, behind the routes the module's adapter calls. The browser asks for a list or a change; the server runs the query and checks the permission.
Do our databases have to move?
No. The adapter talks to whatever answers JSON, so the databases Retool used can stay, behind an API of your own or behind Supabase.
How long does the move take?
It depends on the number of apps and queries. One module with its list, record, form and permissions is the unit to plan by, and the sample module is the one to copy.
Related
- Postgres: the person in a transaction settingIntegrations
- Supabase: the rules in the databaseIntegrations
- Moving one process from a spreadsheet into an app, step by stepBlog
- From Access or FileMaker to a web appMoving from
- From Bubble to an app in your own repositoryMoving from
- From Excel or Google Sheets to an appMoving from
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