Moving a Base44 app to Supabase and Vercel is four jobs, and one is hard. The Vite React frontend deploys on Vercel with a build command and output folder; the rows come out as an export. From Base44 to Supabase, the hard job is the data model: the entity format has no relation type, so every foreign key is yours.

Base44 to Supabase: what moves and what you rebuild

A Base44 to Supabase move has four parts at four costs: the React frontend needs a Vercel build setting, the rows need an import script, the entity schemas need a hand-written Postgres data model, and the backend functions need a new place to run.

The export routes themselves, and the files each one writes, are covered under what a Base44 export contains. This page starts from the point where those files sit on your machine and asks what each one turns into.

Part of the appComes outWhat it costs you
Frontend React codeYes, as a Vite projectA build setting on Vercel and a new data client
Entity schemasYes, as JSON Schema .jsonc filesThe rebuild: a Postgres data model written from them
The rowsThrough the dashboard’s CSV export, not through base44 ejectAn import script and a filter
Backend functions, integrations and filesThe function source does; the runtime it calls does notA new host or a replacement for each one

The documented way to get the code and the schemas onto your machine is the Base44 CLI. Install it with npm install -g base44@latest (it needs Node.js 20.19.0 or higher), then run the base44 eject command. Base44’s docs say it “downloads your app’s frontend code and backend resources locally” into a new backend project with its own app ID, and they are blunt about the rows: “Your entity schemas are copied to the new project, but data is not.”

Base44’s project structure page sets out where everything lands. Entity schemas are .jsonc files under base44/entities/, each backend function lives in base44/functions/<name>/entry.ts, the sign-in methods sit in base44/auth/config.jsonc, and connectors and agents get folders of their own (base44/connectors/, base44/agents/). One file, base44/.app.jsonc, links the folder to your Base44 app, and the docs say it should not be committed to version control.

Two-way GitHub sync, which needs the Builder plan or higher, writes a different layout, and Base44’s Code tab docs carry a note that decides whether you have your schemas at all: “When using GitHub 2-way integration, entities are managed in Base44 and are not included in your local repository.” So take thirty seconds before anything else: open the synced repository and look for entity schema files. If they are missing, run base44 eject to get them.

Base44’s docs describe no Base44 Supabase setting that swaps the database under a running app. Base44 keeps its records in a NoSQL database of its own, so connecting the app to Supabase means building the tables first and then replacing the Base44 client in the frontend with supabase-js.

This page is built from the current documentation of Base44, Supabase, PostgreSQL, Vite and Vercel. It describes the documented route, not a migration we carried out, so try each step on a copy of your app before you trust it. Several companies sell the whole move done for you, among them EscapeBase44, Base44Devs and Staticbot; this page sets out the work itself.

Mapping Base44 entities to Postgres tables

Base44 entities map to Postgres tables one field type at a time: six JSON Schema types become columns, enums become check constraints, required fields become not null, and string fields holding another record’s id become foreign keys you add yourself, because the entity format has no relation type.

Base44’s entity format is JSON Schema. Each entity is an object whose fields can be string, integer, number, boolean, array or object; enum restricts a string to a list of allowed values, required names the fields that must be provided, and format marks a string as a date or a date-time. The same page adds a line worth reading twice: “Base44 entities don’t support unique constraints.”

What sits underneath explains why old rows may not match their own schema. Base44’s docs say the database is MongoDB compatible, and: “Schemas are not enforced, so you can update your data model at any point without running migrations.” Postgres works the other way round. A column has one type, a constraint rejects the row that breaks it, and a relationship exists only once you declare it.

Whether Supabase is the right landing place is its own question, answered under why so many AI-built apps land on Supabase. The table below assumes that decision is made and covers the constructs an entity file holds and the built-in fields every record carries.

Base44 constructPostgres columnConstraint to addNote
"type": "string"textnoneA length check only where the app needs one
"format": "date-time" on a stringtimestamptznoneDate and time, including time zone
"format": "date" on a stringdatenoneA calendar date
"type": "integer"integer or bigintnonebigint for counts that can outgrow four bytes
"type": "number"numeric(p,s)noneWe’d never use float for money
"type": "boolean"booleannoneDecide what a missing value means
"type": "array"jsonb or text[]nonetext[] only when every item is a string
"type": "object"jsonbnoneSplit it into a table if you query inside it
"enum": [...] on a stringtextcheck (col in (...))Old rows may break it: Base44 did not enforce schemas
"required": [...]that columnnot nullBackfill first: old rows may lack the value
"default": <value>that columndefault <value>
Built-in idtext primary keyA string in Base44; keep it so references still match
Built-in created_date, updated_datetimestamptzdefault now()updated_date also needs an update trigger
Built-in created_bytextHolds an email, not a user id
Built-in created_by_idtextBase44’s own user id, not a Supabase one
Internal is_deleted, deleted_datedo not createFilter on them at import if the export has them
Internal is_sample, entity_name, app_id, environmentdo not createPlatform bookkeeping
A string field holding another record’s idtextreferences other_table (id)The relationship you add yourself

Every Postgres name in that table is in PostgreSQL’s data types list: timestamptz is the short form of timestamp with time zone, and numeric is an “exact numeric of selectable precision”. PostgreSQL’s own numeric page says that type “is especially recommended for storing monetary amounts”, and we’d give money a fixed scale such as numeric(10,2); float is an alias for double precision, which the same docs call inexact.

Here is a worked pair: a course with an enum, a default and required fields, and an enrollment that points at a course by id. The rls block at the bottom of the course file is Base44’s own rules syntax, which the policies section turns into SQL.

// base44/entities/Course.jsonc
{
  "name": "Course",
  "type": "object",
  "properties": {
    "title":     { "type": "string" },
    "status":    { "type": "string", "enum": ["draft", "open", "closed"], "default": "draft" },
    "price":     { "type": "number" },
    "starts_at": { "type": "string", "format": "date-time" },
    "tags":      { "type": "array", "items": { "type": "string" } }
  },
  "required": ["title", "starts_at"],
  "rls": {
    "create": { "user_condition": { "role": "admin" } },
    "read":   true,
    "update": { "created_by": "{{user.email}}" },
    "delete": { "user_condition": { "role": "admin" } }
  }
}
// base44/entities/Enrollment.jsonc
{
  "name": "Enrollment",
  "type": "object",
  "properties": { "course_id": { "type": "string" }, "completed": { "type": "boolean", "default": false } },
  "required": ["course_id"]
}

Nothing in those files says that course_id points at a course. A person reading them can tell; Postgres cannot until the DDL says so:

create table public.courses (
  id           text primary key,
  title        text not null,
  status       text not null default 'draft' check (status in ('draft', 'open', 'closed')),
  price        numeric(10,2),
  starts_at    timestamptz not null,
  tags         jsonb not null default '[]'::jsonb,
  created_date timestamptz not null default now(),
  updated_date timestamptz not null default now(),
  created_by   text not null,
  owner_id     uuid references auth.users (id)
);

create table public.enrollments (
  id           text primary key,
  course_id    text not null references public.courses (id) on delete restrict,
  completed    boolean not null default false,
  created_date timestamptz not null default now(),
  created_by   text not null,
  owner_id     uuid references auth.users (id)
);

create index on public.enrollments (course_id);
create index on public.enrollments (owner_id);

Two lines in that DDL have no counterpart in the Base44 files: the references clause on course_id and the owner_id column. Getting column types, nulls, relationships and delete behavior right is a review of its own, and the database review checklist walks through it for any schema, this one included.

The three things that break in the mapping

Each of these three passes a build and fails only once real records arrive.

created_by holds an email, not a user id

Base44’s security documentation describes created_by as the “Email of user who created the record”, and the ownership rule a Base44 app uses is written against it: {"created_by": "{{user.email}}"}. Supabase policies run on auth.uid(), which “Returns the ID of the user making the request”. Every ownership rule therefore needs a decision, and the two ways out fail at different times.

Matching on the email claim in the user’s token keeps each policy a one-line translation:

using (lower((select auth.jwt()) ->> 'email') = lower(created_by))

It works on the first day and breaks the day a user changes their email address, because every row they own is still stamped with the old one. Backfilling a real owner_id uuid column moves the failure to import time, where you can see it:

update public.courses c
set    owner_id = u.id
from   auth.users u
where  lower(u.email) = lower(c.created_by)
  and  c.owner_id is null;

-- Should return 0 after a clean backfill.
select count(*) from public.courses where owner_id is null;

A count above zero means a creator who has no Supabase account yet, or an email changed inside Base44. Decide what happens to those rows before traffic moves: under an auth.uid() = owner_id policy, a null owner_id hides the row from everyone, its owner included.

No foreign keys come out, and adding them surfaces broken data

With no relation type in the format, a relationship in a Base44 app is a plain string holding another record’s id, and nothing ever checked it. Delete a course while enrollments still name it, and those enrollments sit in the export pointing at nothing. Run this against the staging import before the constraint exists:

-- Should return no rows.
select e.id, e.course_id
from   staging_enrollments e
left join staging_courses c on c.id = e.course_id
where  c.id is null;

If rows come back and the constraint goes on first, Postgres refuses the load with an error of the form insert or update on table "enrollments" violates foreign key constraint, followed by a detail line naming the key that “is not present” in the parent table. Read the key it names, then run the query above to list the rest. Dropping the constraint to make the message go away puts the broken references straight into the new database.

Soft-deleted rows come back alive

Every Base44 record carries an internal is_deleted field, which the docs call the “Soft delete flag”, and a deleted_date. The dashboard keeps deleted records for 30 days under Recently deleted, internal fields “aren’t returned in API responses”, and Base44’s data docs do not say whether a CSV export includes deleted records. So open the export file and look for the column. If it is there, filter at import:

insert into public.courses (id, title, status, price, starts_at, tags, created_date, updated_date, created_by)
select id, title, status, price, starts_at, tags, created_date, updated_date, created_by
from   staging_courses
where  is_deleted is not true;

Then compare the row count with Base44’s own count for that entity. The dashboard table shows at most 5,000 items, so for a larger entity use the SDK’s count() instead of counting rows on screen. A gap in either direction means canceled orders or thrown-away drafts are about to reappear, or real rows went missing.

If the app already holds paying customers’ records, all three of these traps play out on their data, and this is the point to decide whether to bring in help. Before the import runs, a free audit is where we weigh up with you which of the three traps your exported records are likely to hit. In the sprint, we review and correct types, nullability, foreign keys, uniqueness rules, and cascade behavior.

Turning Base44 security rules into Supabase policies

Base44 security rules become Supabase row level security policies one operation at a time: each create, read, update and delete rule turns into an insert, select, update or delete policy, the email-based ownership rule needs a decision, and field-level rules have no direct Postgres equivalent.

A Base44 rule lives in an rls block on the entity, with the keys create, read, update and delete. Each takes true (“Allow all users”), false (“Block all users”) or a condition. Conditions support $or, $and, $nor, $in, $nin and $all, can use {{user.email}}, {{user.id}}, {{user.role}} and {{user.data.*}}, and check roles with {"user_condition": {"role": "admin"}}. A single field can carry its own rls block with read and write. Our reading is that each of those field rules becomes a view, a column grant, or a check inside the policy, because Postgres row level security filters rows, not columns.

The Course entity’s four rules turn into the block below. Two things are left out on purpose: the admin create rule needs an insert policy of its own before anyone can add a course, and updated_date needs the update trigger from the mapping table.

alter table public.courses enable row level security;

-- Base44: "read": true
create policy "signed-in users read courses"
on public.courses for select
to authenticated
using (true);

-- Base44: "update": {"created_by": "{{user.email}}"}
create policy "owners update their own courses"
on public.courses for update
to authenticated
using      ((select auth.uid()) = owner_id)
with check ((select auth.uid()) = owner_id);

-- Base44: "delete": {"user_condition": {"role": "admin"}}
create policy "admins delete courses"
on public.courses for delete
to authenticated
using (((select auth.jwt()) -> 'app_metadata' ->> 'role') = 'admin');

Three details in that block each come from a source. Wrapping auth.uid() in select is advice from Supabase’s row level security guide: the guide says it “causes an initPlan to be run by the Postgres optimizer” rather than calling the function on each row. On with check, PostgreSQL’s CREATE POLICY page says that “If only a USING clause is specified, then that clause will be used for both USING and WITH CHECK cases”; writing both keeps the two conditions readable and lets you tighten them apart. The same page adds that an update also needs a select or all policy on the row, which the read policy provides. And the role is read from app_metadata, because Supabase documents that user metadata “can be updated by the authenticated user”, while app metadata “cannot be updated by the user”.

One line is a decision rather than a translation. Base44 reads "read": true as allow all users; the policy narrows it to to authenticated, and a grant to anon belongs only on data you mean to publish to signed-out visitors. Supabase’s guide backs naming the role every time: “Always name the role a policy applies to, using the to clause.”

The roles themselves need a home. Base44’s built-in User entity carries full_name, email and a role that is “Either admin or user”, plus any fields you add. Nothing in the move carries those roles across for you, so you choose where they live: in each user’s app metadata, set server-side, or in a profiles table keyed on auth.users (id) that the policy joins to. A role changed in app metadata reaches auth.jwt() only after the user’s token is refreshed.

Before you enable this on every table, know the default. Once row level security is on, Supabase says “no data is accessible through the API when using a publishable key, until you create policies”, so a table with RLS on and no policy returns nothing. That is the safe default, and it is also why a screen can come up empty on the first test.

We audited 21 third-party apps in June and July 2026, and 9 of them had row-level security gaps. Those 21 were apps chosen for review, so the count describes them only and is no rate for Base44 apps or any other group.

So prove each policy with a second, ordinary account instead of reading it and trusting it. The method, and what a real test asserts, is laid out in testing Supabase RLS with a second account.

Moving the Base44 frontend to Vercel

A Base44 frontend moves to Vercel as a Vite build: a build command, the dist output folder, Supabase’s URL and publishable key in VITE_ variables, and every Base44 SDK call swapped for supabase-js with its error checked.

Base44’s docs say plainly that “Base44 apps are standard React apps built with Vite”, and Vite’s build options put the build output in dist by default. Vercel detects the framework and fills in the Build Command and the Output Directory for you; both sit under Settings, Build and Deployment, with an Override toggle if the project uses something else. You do not need to rebuild the app in Next.js: Vercel’s Vite guide deploys a Vite project as it stands. One file does need a look first: the vite.config.js Base44 generates is “Build configuration with Base44 plugin”, so take the plugin out once the SDK is gone.

One check belongs before anything else on Vercel: a deep link. Vercel’s guide warns that for a Vite single-page app “deep linking won’t work out of the box”, and gives the fix as a vercel.json at the project root:

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Open a page such as /courses/abc by typing its address, not by clicking through from the home page. Clicking through hides the problem, because the router handles it in the browser.

Base44 frontend environment variables: what may sit behind VITE_

Vite exposes any variable prefixed VITE_ “in client-side source code after Vite bundling”, and its docs say those variables “should not contain sensitive information such as API keys”. The Base44 frontend environment variables the old client read, VITE_BASE44_APP_ID and VITE_BASE44_APP_BASE_URL, go away with the SDK. In their place go the Supabase project URL and the publishable key, which Supabase calls “Safe to expose online”, and nothing else.

Supabase’s API keys documentation is just as direct about the other kind. Secret keys and the legacy service_role key “provide full access to your project’s data, bypassing Row Level Security”, and the places it says never to use one include “A browser, even on localhost.” A secret key behind a VITE_ prefix ships to every visitor inside a JavaScript file. The longer rule, with server-side variables and build-time versus runtime, is under how environment variables work at build and runtime.

Swapping the Base44 SDK for supabase-js

The Base44 SDK’s data methods include get, list, filter, count, create, bulkCreate, update, delete, deleteMany and subscribe. Its list takes a sort, a limit, a skip and a field list; filter takes the criteria first, then the same sort, limit and skip, and a - before the sort field means descending. Each call has an equivalent in the supabase-js query reference:

// Base44 SDK: criteria, sort, limit, skip
const open = await base44.entities.Course.filter({ status: "open" }, "-starts_at", 20, 0);

// supabase-js: range() is 0-based and inclusive, so 0 to 19 is 20 rows
const { data: courses, error } = await supabase
  .from("courses")
  .select("*")
  .eq("status", "open")
  .order("starts_at", { ascending: false })
  .range(0, 19);
if (error) throw error;

The difference that bites is the return value. Supabase’s docs say “Every supabase-js call returns a { data, error } pair instead of throwing”, so a call site that never reads error carries on as if the query worked. After the swap, search the code for .from( and confirm that each call reads error.

Backend functions, integrations and files: what has no destination

Base44 backend functions, built-in integrations and stored file links have no destination on Supabase and Vercel: the function source comes out, but the entity SDK, auth context and platform services it calls stay on Base44, so each one is rebuilt or dropped.

Base44 pieceWhat comes outWhere it can go
Backend functionsTypeScript source at base44/functions/<name>/entry.ts, written for Deno and the Base44 SDKRewritten against supabase-js, then hosted on Supabase Edge Functions, a small server or a Vercel function
Built-in integrationsOnly the calls in your code (SendEmail, UploadFile, invokeLLM, GenerateImage and the rest)A provider account and a bill of your own for each one you keep
Stored file linksLinks to files Base44 stores: the builder’s file library, or files people uploaded through the live appFiles moved to your own storage and the stored links rewritten in the same pass as the rows
Agents and connectorsDeclaration files under base44/agents/ and base44/connectors/Rebuilt on your own stack or dropped

The functions are the clearest case of source without a runtime. Base44’s docs say they “run on Deno”, get their client from createClientFromRequest(), and receive the user’s authentication “automatically”. On your own stack none of that exists until you write it, so treat each function as a rewrite that comes with a working reference implementation. The trade-offs between Supabase Edge Functions, a small server and a Vercel function are set out under where the backend functions can run.

Built-in integrations are the sharper edge. Base44 lists SendEmail, SendPushNotification, GenerateImage, GenerateVideo, GenerateSpeech, TranscribeAudio, UploadFile, ExtractDataFromUploadedFile and invokeLLM, and tells builders “you do not need to set up API keys, connectors, or your own infrastructure” for them. That convenience is exactly what stays behind: each one you keep becomes an account with an email, image or model provider, under your name.

There is an open-source Base44-to-Supabase SDK from Ai-Automators that swaps the client for you, and its README is honest about the gap: “All integration functions are implemented as intelligent placeholders”, which “Provide mock responses for development/testing”. Read that README before you adopt it, not after the first email fails to send.

Files are the quiet one. Base44 keeps the files you upload or generate while you build in a per-app file library, public by default, so “anyone with a file’s link can open it”. Files people upload through your live app “aren’t saved to your file library”, and when the record that holds one is deleted, Base44’s media docs say “The file itself stays stored”. Either way, the links your rows store point at files that Base44 holds. Move the files and rewrite the links in the same import, so nothing in your rows still depends on Base44 once you leave.

Can Claude Code rewrite a Base44 backend?

Claude Code can write the DDL, the policies and the import script for this move, and it hosts nothing. Anthropic’s Claude Code docs describe it as “an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools”; where the rewritten functions run is still your call.

What it needs is the full picture in one go: the entity files, the mapping table and the three traps. Base44 tells builders not to declare the built-in fields in their schemas, so created_by shows up in the entity files at most inside a rule, and nothing there says it holds an email. An assistant working only from those files can easily type it as a user id and point it at auth.users.

How to check the move before you switch traffic

A moved Base44 app is proven before traffic switches when seven checks pass: matching row counts, zero rows without an owner, zero dangling references, a second account refused, a deep link that loads, no secret key in the browser bundle, and a fresh clone that deploys.

  1. 01 Row counts per table match Base44's count for that entity after the is_deleted filter. Keep both numbers.
  2. 02 select count(*) ... where owner_id is null returns 0 on every owned table, or each remaining row has a written decision. Keep the result.
  3. 03 The dangling-reference query returns no rows before the foreign keys go on. Keep the output.
  4. 04 Signed in as a second, ordinary account, reading another user's rows returns none and updating them changes none; a signed-out request reads nothing. Keep the result per table.
  5. 05 A deep link loads when its address is opened directly on the Vercel URL. Keep the URL and the date.
  6. 06 Scanning the built JavaScript in dist for the value of every secret key, the sb_secret_ key and the legacy service_role key alike, turns up nothing. Keep the scan output.
  7. 07 A fresh clone of the repository deploys to a staging host with no step that calls Base44. Keep the deploy log.

The seventh check is part of owning the app outright, and how to self host an exported app covers it with the rest of the hosting set-up. Where those checks sit once the app is live, release after release, is the subject of a release path for one app you own.

When not to move off Base44

Three reasons send people looking for this move, and only one of them needs it.

Cost is the first. Weeks of rebuilding have a price too, so set them against what staying on Base44 costs before you start.

Speed is the second. Slow reads and rate limits at a few hundred users often come from how the app queries its data, and a query that scans everything on Base44 will scan everything on Postgres too. We’d fix the query first; the reason to move may go with it.

Control is the third, and the one only a move fixes: a compliance requirement, a customer contract, or the plain need for a database connection string you hold. No tuning inside Base44 produces any of those. Choosing the exit itself, and destinations other than Supabase and Vercel, is covered under choosing how to leave Base44.

One boundary is worth saying out loud. A move does not produce a phone app: what comes out is a React web app built with Vite, and getting into the App Store or Google Play is a separate job.

Where the sprint does this

Three deliverables in the Production Hardening Sprint pick up where a moved app stands. Deliverable 1.4 is verified this way: run read and write tests as anonymous users, different roles, and separate tenants. For deliverable 4.1, the verification is to test rejected invalid records and expected relationship behavior using representative data. The check on deliverable 7.11 is to deploy a fresh clone to staging through the pipeline with no step that depends on the generating tool. We apply the equivalent controls for your payment provider, database, and framework; the implementation follows your stack. Hosting, paid tools and API usage are paid through your accounts, so Supabase and Vercel stay your bills.

Common questions about leaving Base44 for Supabase

Does Base44 have a database?

Yes. Base44 provides its own NoSQL database, which its docs describe as MongoDB compatible, with schemas that are not enforced, so the data model can change without migrations. The records live inside Base44 rather than in a database you hold, so leaving means exporting the rows and building tables for them somewhere else.

What are the key differences between Base44 and Supabase?

Base44 runs an app’s screens, data and sign-in in one platform, while Supabase gives you a Postgres database with sign-in and an API, and you write and host the app yourself. Base44 stores schemaless documents; Supabase stores rows in tables with types, constraints and row level security policies you write.

Which is better, Base44 or Claude code?

Neither in general, because they do different jobs. Base44 builds the app and runs it inside its own platform; Claude Code is an agentic coding tool that reads and edits code in a repository, and you host what it writes. Base44 fits when you want the platform to run the app, and Claude Code fits when you want to own and run the code yourself.

When is it worth getting help moving a Base44 app to Supabase?

It is worth getting help when the app already holds customer records or takes payments, because the email-based ownership rule, the missing foreign keys and the soft-deleted rows all pass a build and show up only when real records are loaded. AxonBuild offers a free audit, where we talk through with you which tables and rules your move puts at risk before any data is imported.