Leaving Bolt: What the Zip Leaves Behind (Data, Secrets, Deploys)

· 7 min read ·
vibe-coding bolt deployment databases

A man in a green sweater carrying an open box of glowing code blocks while a small robot with a tool belt sits on stacked boxes holding up a key; three unpacked boxes marked with a database, a key and a globe sit on the floor

To export a Bolt project, open it on a desktop, click the project title in the top left, click Download, unzip the file, and run npm install && npm run dev in that folder. You need Node.js installed first. That gets you the code. Your database rows and your secrets stay in Bolt, and server function changes do not deploy themselves.

Everything about Bolt here comes from its help center, checked on December 6, 2026. No real Bolt project was exported for this post, so what a real zip contains, .env especially, is unchecked. Bolt changes often, so recheck before you rely on a click path.

One warning before the steps. If a payment key ends up in your browser code, every visitor can read it. The test near the end catches that.

What comes with the zip

ThingIn the zip?What to do
Your codeYesOpen it in any editor
Database address and public keyBolt’s secrets docs say it stores these in .env, which is part of your project’s codeCheck the file exists (see below)
Secrets (payment or email keys)No. Bolt says it never writes a secret into project files, browser code or the published siteCreate them again where your code will run
Database rowsNoExport from the Tables page, or claim the database
Server functionsThe files are in supabase/functionsDeploying them is a separate job

.env starts with a dot, so Finder on a Mac and File Explorer on Windows hide it. In a terminal, ls -a lists it. The docs do not say the download always includes it. If it is missing, the app starts with no database address.

Running it

Download Node.js first, then run node -v and compare it with the version your project needs (below). Open a terminal in the unzipped folder (on a Mac, right-click the folder and choose New Terminal at Folder), then run npm install && npm run dev. Success looks like a line with a localhost address. Open it in your browser.

If it fails with a message about node:util and styleText, your Node is too old. A scratch Vite 8.4.1 project lists node: ^20.19.0 || >=22.12.0 in its package.json and failed on Node 18 that way. Your project’s package.json has its own engines field. Run node -v and compare.

Running locally probably talks to your live database, because .env holds its address. That is reasoning from the docs, not a tested fact. So before the first run, ask your AI tool “Does .env point to my live database?” If it does, create a second Supabase project for testing and point .env at that one, as staging versus production explains. A first local run that writes test data into live data is the failure to avoid.

Three ways out

RouteWhat movesWhat stays behind
DownloadCode, one timeHistory, data, secrets
GitHubCode with full history, private repo to start, branches workData, secrets
Supabase claimYour Bolt Database and its data, into your own Supabase accountNothing, but it cannot be undone

The Supabase route needs a Pro or Teams plan and you must own the Supabase organisation you connect. Start from the database icon, then Advanced, then Claim. Do not use Connect on a project that already has a Bolt Database. Bolt warns it replaces the connection and may cause data loss. Bolt cannot move a Supabase database back to Bolt Database, and the connected organisation cannot be changed later.

If you only want a copy of the rows, the Tables page exports CSV or JSON.

After a claim, check the data. Supabase’s changelog says that from October 30, 2026 new tables in public need an explicit grant before the Data API can see them, and existing tables keep their grants. Row-level security is separate. Run the two-account test from why a Supabase table is public on whatever Bolt created.

Three things that go wrong

Pausing. Bolt’s database docs say a Bolt Database pauses after six or more days of low usage unless the project is published on Bolt hosting. Supabase’s free plan pauses after a week of low activity, even when published. Export the rows before you stop using the Bolt copy.

Server functions. Bolt’s server function docs say changes you make yourself, in Code view, a terminal or GitHub, are not deployed until you ask Bolt to deploy. Outside Bolt, Supabase’s secrets docs say local functions read supabase/functions/.env and a hosted project needs supabase secrets set NAME=value. Either way, you can edit a function, see nothing change, and think the edit is broken.

Secrets in Git. Put .env in .gitignore before your first push. Bolt’s .env holds public values, but you will add real keys to it. See leaked API keys.

The mistake that costs money

If you or an AI assistant puts a payment key in .env under a name starting VITE_, Vite copies it into the JavaScript every visitor downloads. In a scratch run, STRIPE_SECRET_KEY stayed out of the build and VITE_STRIPE_SECRET_KEY did not.

The test below builds the app and reads every file a visitor would download, source maps included. It checks what a visitor receives, not how your code is written. It fails when a secret is visible, and it fails if someone “fixes” the leak by deleting payments, as tests that check behaviors, not code explains. Save it as tests/export.test.mjs. It uses Node’s built-in runner, so nothing to install:

// Checks what a visitor can download, not how the code is written.
import { test, before } from "node:test";
import assert from "node:assert/strict";
import { execSync } from "node:child_process";
import { readdirSync, readFileSync, statSync } from "node:fs";
import { join } from "node:path";
const walk = (d) =>
readdirSync(d).flatMap((f) => {
const p = join(d, f);
return statSync(p).isDirectory() ? walk(p) : [p];
});
// Stripe (sk_/rk_), Supabase secret keys, OpenAI and Anthropic (sk-), Supabase service_role
const SECRET = /sb_secret_|\b(?:sk|rk)_(?:live|test)_|\bsk-(?:proj|ant|svcacct|admin)-[\w-]{10,}|\bsk-[A-Za-z0-9]{32,}|service_role/;
let files = "";
before(() => {
execSync("npx vite build --sourcemap", { stdio: "pipe" });
files = walk("dist").map((p) => readFileSync(p, "utf8")).join("\n");
});
test("the scanner can see the build (your public database address is in it)", () => {
assert.match(files, /example-project\.supabase\.co/);
});
test("nothing a visitor downloads looks like a secret key", () => {
assert.doesNotMatch(files, SECRET);
for (const [token] of files.matchAll(/eyJ[\w-]+\.eyJ[\w-]+\.[\w-]+/g)) {
const claims = JSON.parse(Buffer.from(token.split(".")[1], "base64url"));
assert.notEqual(claims.role, "service_role", "a service_role key is in the build");
}
});
test("paying still goes through the server function", () => {
assert.match(files, /\/functions\/v1\/charge/);
});

Change the address in the first test to yours, and the function path in the third to what your app calls. The first test is the scanner’s proof of life: if it cannot find your own public address, a pass on the second test means nothing. Run it with node --test tests/export.test.mjs.

Failing first. The scratch app had the key in .env as VITE_STRIPE_SECRET_KEY and sent it from the browser:

ok 1 - the scanner can see the build (your public database address is in it)
not ok 2 - nothing a visitor downloads looks like a secret key
not ok 3 - paying still goes through the server function
# pass 1
# fail 2

Then passing. The fix has two parts. Delete the VITE_STRIPE_SECRET_KEY line, then have the browser call a server function that holds the key, with only the public key sent. In plain words: the browser asks your server to charge the card, and only the server knows the secret. Ask your AI tool: “Move the payment call into a server function, read the key from a secret, and remove it from .env.”

ok 1 - the scanner can see the build (your public database address is in it)
ok 2 - nothing a visitor downloads looks like a secret key
ok 3 - paying still goes through the server function
# pass 3
# fail 0

The lazy fix. Deleting the payment code also turns test 2 green. Test 3 catches it:

ok 1 - the scanner can see the build (your public database address is in it)
ok 2 - nothing a visitor downloads looks like a secret key
not ok 3 - paying still goes through the server function
# pass 2
# fail 1

The patterns cover Stripe (sk_, rk_), Supabase sb_secret_ keys, OpenAI and Anthropic sk- keys, and a service_role key hidden inside a base64 token. An earlier version of this test only matched Stripe-style strings and service_role, and it passed on a scratch build that shipped an sb_secret_ key and an sk-proj- key to the browser. This version fails that build. A first attempt used a loose sk- pattern, and it also failed a clean build that contained a loading spinner with the CSS class sk-chase-dot-before, so the sk- patterns now need the proj, ant, svcacct or admin prefix, or 32 or more letters and digits. In a scratch run the clean build with a spinner passes, and builds with an sk-proj- key and an sk-ant- key fail. The scan finds secret-shaped text only. It cannot prove there are no secrets, so treat a pass as “none that match these patterns”.

A prompt to start with

I am moving this project out of Bolt. List every variable in .env and say which are safe in the browser. List every secret my server functions use and every file in supabase/functions. Do not change anything.

Compare the answer with what you see in the unzipped folder.

The Get AI Native ebook goes deeper on this. It is free, and the expected launch is around Christmas. Join the waitlist on the homepage.

Comments