Vibe Coding: build real apps with AI · Episode 35. Everything below is real. The deploys were recorded on 14 November 2026 (10:00 to 12:25 India time) on the channel owner's Mac: a brand-new Firebase project, syntaxpilot-demo-site (free Spark plan), and a new Netlify site, syntaxpilot-tip-splitter, both made only for this lesson. The owner's e-mail, avatar, name, home folder, Netlify team name, account ID and login ticket are hidden. Outputs are quoted exactly and shortened where they show "...".
The agent runs are real too: Claude Code 2.1.325 (model claude-opus-5-5) in print mode (claude -p --permission-mode acceptEdits) on 14 November 2026, in /home/asha/projects/tip-splitter, a small Vite 8 app written for this video. Every build, grep, curl and the Firebase Hosting emulator test below were run by us. The exchange-rate API (api.exchangerate.example) is a placeholder and demo-key-NOT-REAL-4821 is not a real key. Asha and her friends are fictional.
Vercel was not recorded (its login needed an e-mail code from the owner). Everything about Vercel here comes from its docs.
Sources fetched on 14 November 2026 (free plans and features change: check the page and its date before you rely on a number):
- Vercel: Instant Rollback (updated 7 Jul 2026), Hobby plan (12 Nov 2026), Environment variables (17 Sep 2026), Deploying GitHub projects (17 Sep 2026)
- Netlify: Project visibility (7 Oct 2026), Understand builds and deploys (10 Nov 2026), Manage deploys (30 Sep 2026), How credits work (12 Aug 2026), Environment variables overview (10 Nov 2026), April 2026 pricing update
- Firebase: Manage live and preview channels, releases and versions (12 Nov 2026), Hosting usage, quotas and pricing (5 Sep 2025)
- Vite: Env Variables and Modes
The problem: "here's my app!"
Asha built a Tip Splitter: type the bill, pick a tip (5, 10, 15 or 20%), enter the number of people, and it shows what each person pays. She runs it with the dev server (the small web server Vite runs on your laptop while you build):
$ npm run dev
VITE v8.3.8 ready in 141 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
$ curl -s -o /dev/null -w "HTTP %{http_code}\n" http://localhost:5173/
HTTP 200
She sends http://localhost:5173 to her friends. Nobody can open it.
Why it fails
localhost means "this very device". On Asha's laptop that's where the app runs. On a friend's phone, localhost is the phone itself, and nothing runs there:
$ curl -sS http://localhost:5173/
curl: (7) Failed to connect to localhost port 5173 after 0 ms: Couldn't connect to server
(curl is a command-line tool that requests a web address and prints the answer.) To share an app, you deploy it: put its built files on a host, a company's computers that are always on and reachable at a public address.
Real-life example: a tiffin service
| A tiffin service | Deploying an app |
|---|---|
| Cooking at home: only your family eats | Dev server: npm run dev, only you see localhost |
| Packing sealed tiffins, ready to serve | Build: npm run build makes the final files in dist/ |
| A delivery service reaching every office | Host + CDN: a public URL, served from near each visitor |
| Tasting first; keeping yesterday's recipe | Preview link before going live; rollback if it goes wrong |
The build
- Build: turning your project into the final files a browser needs.
- Bundle: joining many source files into a few (your
main.jsplus everything it imports becomes one.jsfile). - Minify: removing spaces and shortening names so the files are smaller.
dist/(short for distribution): the output folder. This is what you upload.
$ npm run build
> vite build
vite v8.3.8 building client environment for production...
✓ 5 modules transformed.
dist/index.html 0.83 kB │ gzip: 0.45 kB
dist/assets/index-CW4K0J7b.css 0.47 kB │ gzip: 0.29 kB
dist/assets/index-DZoNy3bd.js 1.36 kB │ gzip: 0.72 kB
✓ built in 57ms
$ ls dist dist/assets
dist: assets favicon.svg index.html
dist/assets: index-CW4K0J7b.css index-DZoNy3bd.js
The random letters (CW4K0J7b) are a hash, a fingerprint of the file's content: change one line and the file name changes. That's what makes long caching safe (see "The cache surprise").
Every host asks two questions: build command (npm run build) and publish directory (dist).
Static site vs server
- Static site: the same ready-made files for every visitor (HTML, CSS, JavaScript). The Tip Splitter does all its maths in the visitor's browser, so it's static.
- Server: code that runs on each request and then answers, like a chef cooking to order. A bank balance can't be a ready-made file: it depends on who's asking.
- Serverless function: a small piece of server code you write and the host runs for you whenever it's called (Netlify Functions, Vercel Functions, Cloud Functions for Firebase).
The rule that follows: every file of a static site is public. A secret can only live on the server side.
The secret key: the obvious way fails (real)
Asha wants the total in US dollars too. An exchange-rate service needs an API key (a secret password that identifies your account to a service). She puts it in .env (a local text file of settings and secrets, NAME=value per line) and calls the service from the page:
# .env
RATES_API_KEY=demo-key-NOT-REAL-4821
# src/main.js: the obvious way, call the rates API from the page
fetch('https://api.exchangerate.example/latest?base=INR&symbols=USD', {
headers: { 'X-Api-Key': import.meta.env.RATES_API_KEY },
})
$ npm run build && grep -o "X-Api-Key[^}]*" dist/assets/*.js
X-Api-Key":void 0
void 0 means undefined: the key never arrived. Vite only passes .env values whose names start with VITE_ to the page. So the beginner "fix":
VITE_RATES_API_KEY=demo-key-NOT-REAL-4821
headers: { 'X-Api-Key': import.meta.env.VITE_RATES_API_KEY },
$ npm run build && grep -o "X-Api-Key[^}]*" dist/assets/*.js
X-Api-Key":`demo-key-NOT-REAL-4821`
$ grep -rl "demo-key-NOT-REAL" dist
dist/assets/index-C8OZq3Vz.js
It works, and it leaks. Vite pasted the key into a JavaScript file every visitor downloads. Anyone can press F12 (the browser's developer tools) and copy it. Vite's docs: "VITE_* variables should not contain sensitive information such as API keys."
Agent run A: the key stays on the server (real)
claude -p "Add a line under the totals that shows the total per person in US dollars too. Use the exchange rate API at https://api.exchangerate.example/latest?base=INR&symbols=USD, which needs my key in the header X-Api-Key. The key is in .env as RATES_API_KEY. I'm going to deploy this to Netlify as a static site, so keep it simple."
From its reply: "The key stays off the site. If the page called the exchange-rate API itself, your key would be in the public JavaScript and anyone could copy it from the browser. So the call happens in a small Netlify Function instead." It also added .env to .gitignore (".env is currently untracked, so a git add . would have committed your key") and said: "In Netlify, go to Site settings → Environment variables and add RATES_API_KEY. Netlify doesn't read your local .env."
The function it wrote (netlify/functions/rate.mjs):
// Server-side proxy so RATES_API_KEY never reaches the browser.
export default async () => {
const res = await fetch('https://api.exchangerate.example/latest?base=INR&symbols=USD', {
headers: { 'X-Api-Key': process.env.RATES_API_KEY },
})
if (!res.ok) return new Response('Rate unavailable', { status: 502 })
const data = await res.json()
return Response.json(
{ usd: data.rates?.USD },
{ headers: { 'Cache-Control': 'public, max-age=3600' } },
)
}
export const config = { path: '/api/rate' }
The page now calls fetch('/api/rate'); the key is added on the server and only the rate comes back.
Environment variables in production
An environment variable is a named setting stored outside your code (RATES_API_KEY=...). The same code reads a different value on your laptop, in a preview and on the live site.
| Source | What it says |
|---|---|
| Vite | VITE_* values are bundled into the page at build time: never API keys. |
| Netlify | Values per context: Production, Deploy Previews, Branch deploys. The Functions scope is for "API keys and tokens". |
| Vercel | Production, Preview, Development. "Any change you make to environment variables are not applied to previous deployments, they only apply to new deployments." |
Rules: a secret goes server-side only; set it in the host's dashboard; changed a value? deploy again.
Deploy 1: Firebase Hosting (real)
The recorded site is a one-file version of the Tip Splitter (no API key, purely static). npx downloads and runs a command-line tool without installing it.
$ npx -y firebase-tools@14 deploy --only hosting --project syntaxpilot-demo-site --non-interactive
=== Deploying to 'syntaxpilot-demo-site'...
i deploying hosting
i hosting[syntaxpilot-demo-site]: beginning deploy...
i hosting[syntaxpilot-demo-site]: found 1 files in public
i hosting: uploading new files [0/1] (0%)
i hosting: upload complete
✔ hosting[syntaxpilot-demo-site]: file upload complete
i hosting[syntaxpilot-demo-site]: finalizing version...
✔ hosting[syntaxpilot-demo-site]: version finalized
i hosting[syntaxpilot-demo-site]: releasing new version...
✔ hosting[syntaxpilot-demo-site]: release complete
✔ Deploy complete!
Hosting URL: https://syntaxpilot-demo-site.web.app
A version is one uploaded set of files; a release is the moment a version goes live.
Is it really live? Check from outside
$ curl -sI https://syntaxpilot-demo-site.web.app
HTTP/2 200
cache-control: max-age=3600
content-type: text/html; charset=utf-8
last-modified: Sat, 14 Nov 2026 04:32:35 GMT
strict-transport-security: max-age=31556926; includeSubDomains; preload
x-served-by: cache-del-vibw2260032-DEL
x-cache: MISS
...
content-length: 2906
-I asks only for the headers (notes the server sends before the page). 200 = OK; x-served-by: cache-del-... = a CDN (content delivery network: copies of your files on servers in many cities) answered from Delhi. cache-control: max-age=3600 lets browsers keep the page for one hour. The page said "Version 1".
Preview links (real)
Production is the live site. A preview is the same kind of build at its own separate address, for testing and sharing before it goes live. Firebase: preview channel. Netlify: draft deploy (CLI) or Deploy Preview (pull requests). Vercel: Preview deployment.
$ npx -y firebase-tools@14 hosting:channel:deploy preview-v2 --expires 7d --project syntaxpilot-demo-site --non-interactive
✔ hosting:channel: Channel preview-v2 has been created on site syntaxpilot-demo-site.
...
✔ Deploy complete!
⚠ hosting:channel: Unable to add channel domain to Firebase Auth. Visit the Firebase Console at https://console.firebase.google.com/project/syntaxpilot-demo-site/authentication/providers
⚠ hosting:channel: Unable to sync Firebase Auth state.
✔ hosting:channel: Channel URL (syntaxpilot-demo-site): https://syntaxpilot-demo-site--preview-v2-4r30wb51.web.app [expires 2026-11-21 10:03:56]
# the live site still shows version 1
Version 1
The two warnings concern Firebase Auth (Firebase's login service), which this site doesn't use. Preview channels expire after 7 days by default and "can be up to 30 days" (Firebase docs).
Then version 2 went live, with a message, and both channels show:
$ npx -y firebase-tools@14 deploy --only hosting --project syntaxpilot-demo-site --non-interactive --message "v2: add a 5% tip button"
✔ Deploy complete!
Version 2
$ npx -y firebase-tools@14 hosting:channel:list --project syntaxpilot-demo-site
┌────────────┬─────────────────────┬────────────────────────────────────────────────────────────┬─────────────────────┐
│ Channel ID │ Last Release Time │ URL │ Expire Time │
├────────────┼─────────────────────┼────────────────────────────────────────────────────────────┼─────────────────────┤
│ live │ 2026-11-14 10:04:12 │ https://syntaxpilot-demo-site.web.app │ never │
├────────────┼─────────────────────┼────────────────────────────────────────────────────────────┼─────────────────────┤
│ preview-v2 │ 2026-11-14 10:04:01 │ https://syntaxpilot-demo-site--preview-v2-4r30wb51.web.app │ 2026-11-21 10:03:56 │
└────────────┴─────────────────────┴────────────────────────────────────────────────────────────┴─────────────────────┘
Deploy 2: Netlify (real)
$ npx -y netlify-cli@latest deploy --create-site syntaxpilot-tip-splitter --dir public --prod --message v1
Creating new site: syntaxpilot-tip-splitter (using team: [team name hidden])
...
❯ Context
production
...
✔ Deploying 2 files
✔ Found 2 files to upload
✔ Finished uploading 2 assets
✔ Deploy is live!
(Netlify Build completed in 4.2s)
Production URL: <https://syntaxpilot-tip-splitter.netlify.app>
Unique deploy URL: <https://6af803add567fcac9c8c37af--syntaxpilot-tip-splitter.netlify.app>
The unique deploy URL is a permalink: Netlify's docs say "The web content at this URL never changes."
Version 2 without --prod became a draft deploy:
$ npx -y netlify-cli@latest deploy --dir public --message "v2: add a 5% tip button"
✔ Deploying 2 files
✔ Found 1 file to upload
✔ Deploy is live!
Draft URL: <https://6af803b6a2da1c3ad93a225f--syntaxpilot-tip-splitter.netlify.app>
If everything looks good on your draft URL, deploy it to your main project URL with the --prod flag:
netlify deploy --prod
$ npx -y netlify-cli@latest deploy --dir public --prod --message "v2: add a 5% tip button"
✔ Everything is uploaded
✔ Deploy is live!
Production URL: <https://syntaxpilot-tip-splitter.netlify.app>
Surprise: private by default (real)
Friends got HTTP 401 (unauthorized). Netlify's docs: on credit-based plans, "Teams created on or after July 28, 2026 start with this default setting: Private for new projects", and "Previews stay private unless you change the preview visibility setting."

Fix: Project configuration → General → Visitor access → Customize this project's visibility → Private, applies to Previews only. Production becomes public; previews stay private.

Proof as a stranger, without logging in:
$ curl -s -o /dev/null -w "HTTP %{http_code}\n" https://syntaxpilot-tip-splitter.netlify.app/?c=1794639086
HTTP 200
Version 1
$ curl -s -o /dev/null -w "HTTP %{http_code}\n" https://6af803b6a2da1c3ad93a225f--syntaxpilot-tip-splitter.netlify.app
HTTP 401
(The live site says Version 1 because it had been rolled back by then; see below.)
Rollback (real)
Rollback = making an older version live again, in seconds. Hosts keep every deploy complete, so nothing is rebuilt or re-uploaded: the host switches which version the address points to. It does not undo database changes or calls to outside services. Habit: roll back first, find the bug after.
Firebase: Hosting → Release history → the old release's menu → Rollback. "By rolling back, you create a new release that serves the same version of content as a previous release" (Firebase docs): the new 10:05 row re-uses the v1 files (hash d98b86).

Netlify: open the old deploy → Publish deploy → confirm. Netlify's docs: "This doesn't trigger a new deploy but instead publishes a previous atomic deploy ... Rollbacks are instantaneous." If the site auto-publishes from Git, the next Git deploy replaces the rollback; Lock to stop auto publishing pins it.
Vercel (docs): Instant Rollback. "Hobby users can roll back to the immediately previous deployment." After a rollback Vercel turns off auto-assignment of production domains, so new pushes don't go live until you promote a deployment ("Undo a rollback").
The cache surprise (real)
Right after the Firebase rollback, the owner's browser still showed Version 2:

The server already sent version 1:
# after the rollback in the console: what does the live site send now?
Version 1
# the plain URL can come from the CDN cache for a short while: look at the headers
cache-control: max-age=3600
last-modified: Sat, 14 Nov 2026 04:32:35 GMT
x-cache: MISS
Version 1
# the preview link keeps version 2 until it expires
Version 2
A cache is a saved copy kept to load things faster. max-age=3600 let the browser keep the page for an hour without asking. Fix: hard refresh (Ctrl+Shift+R / Cmd+Shift+R) or wait. Lesson: hashed files (index-DZoNy3bd.js) can be cached for a long time because their names change; the HTML page should be cached briefly or re-checked every time.
Reading deploy logs (real)
A deploy log is the record of what the host did: install, build, upload, go live.
| Deploy | Log line | Meaning |
|---|---|---|
| v1 | Found 2 files to upload |
first deploy: everything |
| v2 (draft) | Found 1 file to upload |
only the changed file |
v2 --prod |
Everything is uploaded |
the draft's files were already there |
A real failed build (one capital letter):
$ npm run build
vite v8.3.8 building client environment for production...
transforming...
✓ 4 modules transformed.
✗ Build failed in 53ms
error during build:
Build failed with 1 error:
[UNRESOLVED_IMPORT] Could not resolve './Style.css' in src/main.js
╭─[ src/main.js:1:8 ]
│
1 │ import './Style.css'
│ ──────┬──────
│ ╰──────── Module not found.
The file is style.css. macOS and Windows usually ignore the case of file names; Linux (here, and on many build servers) doesn't. Read the first real error line, fix it, rebuild; paste that exact line if you ask an AI.
Deploy from GitHub
Continuous deployment: you push code to GitHub, and the host builds and deploys it.
- Vercel: "Vercel for GitHub will deploy every push by default." Pushes to the production branch (usually
main) go live; each pull request (a proposed change, reviewed before merging) gets a preview URL posted as a comment. - Netlify: pull request #42 →
deploy-preview-42--mysitename.netlify.app. - Firebase: GitHub Actions (GitHub's automation) with
FirebaseExtended/action-hosting-deploy.
Agent run D (real)
claude -p "Now set up automatic deploys from GitHub: every push to main should deploy to Firebase Hosting, and every pull request should get its own preview link. My Firebase project id is syntaxpilot-demo-site."
It wrote .github/workflows/firebase-hosting-merge.yml (push to main → channelId: live) and firebase-hosting-pull-request.yml (expires: 7d), with secrets read from GitHub (${{ secrets.FIREBASE_SERVICE_ACCOUNT_SYNTAXPILOT_DEMO_SITE }}, ${{ secrets.RATES_API_KEY }}). And it caught: "Your local branch is master, not main. ... The live-deploy workflow only fires on pushes to main". A secret in GitHub (Settings → Secrets and variables → Actions) is a value workflows can use but nobody can read back.
The AI mistake: free-plan facts from memory (real run F)
claude -p "Quick question before I pick a host for this app: what do the free plans of Vercel, Netlify and Firebase Hosting give me? A short table with the limits (bandwidth, storage, deploys) and what happens if I go over. Don't change any files."
It warned first: "I couldn't check live pricing because web search was denied in this session. These numbers come from what I already know ... check each pricing page." Then a confident table. Checked against the docs fetched the same day:
| Its claim | The docs (14 Nov 2026) | |
|---|---|---|
| Firebase Spark: "360 MB/day, about 10 GB/month"; over it, "The site stops serving until the daily quota resets." | "up to 10 GB/month"; after a short grace period sites are disabled "until the next month starts" | ✗ |
| Netlify: "Each GB costs about 10 credits, so roughly 30 GB" | 20 credits per GB (doubled in April 2026) → at most 15 GB from 300 credits | ✗ |
| Vercel Hobby: 100 GB/month, 100 deploys/day | 100 GB Fast Data Transfer, 100 deployments per day | ✓ |
| Netlify: ~15 credits per production deploy | 15 credits per successful production deploy | ✓ |
| (not mentioned) | New Netlify projects private by default since 28 Jul 2026 | missing |
The lesson: the mistake wasn't bad code, it was old facts said confidently. Prices, limits and free tiers change every few months: read the provider's own page and its date.
Free plans at a glance (from the docs above, 14 Nov 2026)
| Firebase Hosting (Spark) | Netlify (Free, credit plan) | Vercel (Hobby) | |
|---|---|---|---|
| Price | no cost | free, 300 credits/month | free |
| Transfer | 10 GB/month | 20 credits per GB | 100 GB Fast Data Transfer |
| Deploys | (storage 10 GB) | 15 credits per production deploy; previews 0 | 100 per day |
| Over the limit | sites disabled until next month | all projects paused ("Site not available") | wait until 30 days have passed |
| Rollback | any earlier release | Publish deploy on any deploy | the immediately previous deployment |
Checklist
- [ ]
npm run buildworks on your machine; you know the publish folder (dist). - [ ] No secret in the page:
grep -r "<your key>" distfinds nothing. - [ ] Environment variables set in the host's dashboard, per environment; redeploy after changes.
- [ ] Preview first, then production.
- [ ] Open the live site as a stranger (incognito window or a friend's phone).
- [ ] Know where the rollback button is before you need it.
- [ ] Free-plan limits from the provider's docs, with a date.
Common mistakes (real)
| Mistake | Exact error / symptom | Why | Fix |
|---|---|---|---|
| Sharing a localhost link | curl: (7) Failed to connect to localhost port 5173 after 0 ms: Couldn't connect to server |
localhost = the friend's own device |
Deploy and share the public URL |
Key without VITE_ |
X-Api-Key":void 0 |
Vite hides non-VITE_ values from the page |
Call the API from a serverless function |
Key with VITE_ |
key found in dist/assets/index-C8OZq3Vz.js |
bundled into a public file | Server side only; rotate a leaked key |
| New Netlify project | HTTP 401 for visitors |
private by default | Visibility: Previews only |
| Old page after rollback | browser shows Version 2 | cache-control: max-age=3600 |
hard refresh / short HTML cache |
| Wrong case in an import | Could not resolve './Style.css' in src/main.js |
the file is style.css |
match the exact file name |
Mini project
Deploy your own Tip Splitter (or any app from this course) to one free host:
npm run build; checkdist/.- Deploy to production; check it with
curl -sI <url>and in an incognito window. - Change one thing; deploy it to a preview (Firebase channel, Netlify draft) and open it on your phone.
- Promote it; then roll back; confirm with
curlwhich version is live. - Write down every URL, and the header that controls caching.
Practice questions
- Your friend opens
http://localhost:3000from your message and sees nothing. Explain in one sentence.
Answer
localhost always means the device you're on, so the friend's phone looks for a server on itself; the app only runs on your laptop until you deploy it.
- Which two settings does every host need to deploy a Vite app?
Answer
The build command (npm run build) and the publish directory (dist).
- You put
VITE_MAPS_KEY=...in.env. How do you check whether it reached the public files?
Answer
Build, then search the output: grep -r "<part of the key>" dist. Any match means the key is public; move the call into a serverless function and rotate (replace) the key.
- You changed an environment variable in Vercel's dashboard but the live site still uses the old value. Why?
Answer
Vercel applies environment variable changes only to new deployments; redeploy.
- After a rollback your browser still shows the new version, but
curlshows the old one. What's happening and what do you do?
Answer
The browser is showing its cached copy (allowed by cache-control: max-age=...). Hard refresh or wait; the rollback worked.
- Netlify visitors get
401on a brand-new site. What do you change?
Answer
Project visibility: make production public (e.g. "Previews only" so previews stay private).
Quiz
Asha's static site must call an API that needs a secret key. Where should the key go?
- A) In
.envasVITE_API_KEY - B) Hard-coded in
main.js, minified so nobody can read it - C) In a serverless function, with the key set in the host's dashboard
- D) In a hidden
<input>on the page
Answer
C. The function runs on the server, so the key never reaches the browser. A, B and D all put the key inside files every visitor downloads; minifying doesn't hide anything.
Interview questions
- "What's the difference between a static site and a server-rendered app, for deployment?" A static site is ready-made files served from a CDN; any per-request logic or secrets need server code (a server or serverless functions).
- "How do you keep an API key safe in a front-end app?" Never in the bundle: call the API from a serverless function or backend, store the key as an environment variable in the host, keep
.envin.gitignore, and rotate it if it ever leaked. - "Production is broken after a deploy. What do you do?" Roll back to the last good deploy first, confirm from outside (
curl -sI, incognito), then reproduce and fix on a preview, and promote again. - "Why do bundlers put hashes in file names?" So changed files get new URLs: assets can be cached for a long time, and a new deploy is picked up immediately because
index.htmlpoints to the new names.
Glossary
| Term | Meaning (with an example) |
|---|---|
| Deploy | Put your built files on a host so anyone can open them at a public URL. |
| Host | A company's always-on computers that serve your site (Firebase, Netlify, Vercel). |
localhost |
"This very device": http://localhost:5173 only works on the computer running the server. |
| Dev server | The small server npm run dev runs on your laptop while you build; never for the public. |
| Build | Turning your project into the final files a browser needs (npm run build). |
| Bundle | Many source files joined into a few (all your JS → index-DZoNy3bd.js). |
| Minify | Removing spaces and shortening names to make files smaller. |
dist/ |
The build output folder you upload (publish directory). |
| Hash (in a file name) | A fingerprint of the content (CW4K0J7b); changes when the file changes. |
| Static site | The same ready files for every visitor; no code runs on the server per request. |
| Server | Code that runs on each request and then answers (a bank balance page). |
| Serverless function | Small server code the host runs for you on demand (netlify/functions/rate.mjs). |
| API key | A secret password that identifies your account to a service (X-Api-Key: ...). |
.env file |
A local file of NAME=value settings and secrets; keep it out of Git. |
| Environment variable | A named setting stored outside the code, with a value per environment (RATES_API_KEY). |
VITE_ prefix |
Marks a Vite variable to be pasted into the page at build time: public, never secret. |
npx |
Runs a Node command-line tool without installing it (npx firebase-tools@14 deploy). |
| CLI | Command-line interface: a tool you use by typing commands. |
| Version / release (Firebase) | A version = one uploaded set of files; a release = a version going live. |
| Production | The live site everyone sees. |
| Preview link | The same build at a separate URL for testing before going live (preview channel, draft deploy, Deploy Preview, Preview deployment). |
| Promote | Make a tested deploy the production one. |
| Permalink | A deploy's own URL whose content never changes (6af803add...--site.netlify.app). |
| Project visibility | Who can open a Netlify project: public, private (team login) or password protected. |
| HTTP status 200 / 401 | 200 = OK; 401 = unauthorized: you must log in. |
| Headers | Notes a server sends before the page (cache-control, last-modified). |
| CDN | Content delivery network: copies of your files on servers in many cities (cache-del-... = Delhi). |
| Cache | A saved copy kept to load faster; can show an old page for a while. |
cache-control: max-age=3600 |
"You may keep this for 3600 seconds (1 hour) without asking again." |
| Hard refresh | Reload while ignoring the cache (Ctrl+Shift+R / Cmd+Shift+R). |
| Rollback | Make an older deploy live again, in seconds, without rebuilding. |
| Deploy log | The host's record of a deploy: install, build, upload, go live, or the error. |
| Continuous deployment | Every push to GitHub is built and deployed automatically. |
| Pull request | A proposed change on GitHub, reviewed before it is merged. |
| GitHub Actions | GitHub's automation that runs workflows (like deploys) on pushes and pull requests. |
| GitHub secret | A value stored in GitHub for workflows to use, which can't be read back. |
| Credits (Netlify) | Netlify's unit for usage on credit plans (Free: 300 a month). |
| Free tier | What a paid service gives for free, with limits that change over time. |
Summary
localhostis only your device. To share an app, build it (npm run build→dist/) and deploy the files to a host.- A static site's files are all public, so a secret key needs server code: the agent moved the key into a Netlify Function and reminded us to set it in the dashboard.
VITE_keys end up in the public JavaScript (we found one withgrep). - Environment variables are set per environment in the host; changes need a new deploy.
- We deployed for real on Firebase and Netlify, used preview links, promoted, and rolled back in seconds.
- Surprises: Netlify's new projects are private by default (401), and a browser cache showed the old version for up to an hour.
- Read deploy logs line by line; on failure, read the first real error.
- The AI mistake: free-plan limits from memory, two of them out of date. Check prices and limits in the provider's docs, with a date.
- Next: give the app your own name with custom domains and HTTPS (episode 36).