Vibe Coding: build real apps with AI · Episode 22. Everything in the Lovable and Bolt sections is from real recordings made on 14 November 2026 (09:30–09:45 India time) in a signed-in browser, on the free plan of each tool, with the same prompt typed word for word. The account owner's name, e-mail and avatar are blurred in the screenshots. v0 was not recorded, so it appears only from its own docs.
The agent review is a real run of Claude Code 2.1.325 (claude -p --permission-mode acceptEdits) on 14 November 2026 in /home/asha/projects/tip-export. It could edit files but was not allowed to run commands. Every node result below was run by us. The tip-maths lines from Bolt and Lovable are copied from their code views. We tested those lines, not the live apps' input boxes, which may block some inputs (for example a minus sign).
Sources fetched on 14 November 2026: Lovable "Plans and credits" (docs.lovable.dev/introduction/subscription-plans) and "GitHub integration" (docs.lovable.dev/integrations/github); Bolt pricing (bolt.new/pricing), "Git" (support.bolt.new/integrations/git) and "Projects and files" (support.bolt.new/building/using-bolt/projects-files); v0 "Pricing" (v0.app/docs/pricing, updated 12 Nov 2026) and "FAQs" (v0.app/docs/faqs). Free plans change often: check the tool's own page on the day you start.
Asha and her friends are fictional.
The problem: a bill, five friends, no laptop
Every Friday Asha and four friends eat out: one bill, a tip on top, split five ways. On a phone calculator that's bill × 1.15 ÷ 5, and someone always types it wrong. In episode 8 we built a tip calculator in an editor. Today Asha is on a borrowed college laptop: no installs, and she wants a link to send the group tonight.
Can a website write the app, run it and put it online, all from one chat? Yes: that's an AI app builder.
What an app builder is
An AI app builder is a website where you describe the app you want in a chat box. It:
- takes your prompt (the instructions you type),
- writes all the code,
- runs it inside the page as a preview (your app working, before anyone else can see it),
- publishes it: its servers keep the app online at a link (hosting).
The AI work isn't unlimited. Plans give you credits or tokens; each message uses some. A token is a small piece of text, about three quarters of a word, that the AI reads or writes.
Well-known builders: Lovable, Bolt, v0 (by Vercel), Replit Agent (the map of tools is in episode 2).
| Your mobile plan | An app builder |
|---|---|
| 1.5 GB a day, then it stops till midnight | Credits / tokens: a daily or monthly limit |
| A carrier-locked phone: cheap, one network only | Lock-in: their hosting, database and editor |
| Number portability: change network, keep your number | Export the code: GitHub sync or a download |
The obvious way: one prompt, ship it
The prompt, typed word for word into both tools:
Build a simple tip calculator web app. Inputs: bill amount, tip buttons for 10%, 15% and 20%,
and number of people. Show the tip amount and the total per person, updating live.
Clean, mobile-friendly design with large readable numbers.

Lovable showed "Considering the tip calculator layout and totals" while it planned, and about a minute later there was a working app (bill, 10/15/20% buttons, a − / + counter for people, big tip and total per person). Its message said: "On a phone-sized screen, I tested a ₹1,250 bill with a 20% tip split 3 ways: it showed ₹83.33 tip and ₹500.00 total per person" and "I picked the rupee sign (₹) because you're in India."

Bolt, same prompt: a different app. A teal theme, a dollar sign, and an extra "Custom tip %" box that nobody asked for.

Why the same prompt gives different apps
- A large language model (LLM) picks each next word with a little randomness, so even the same tool gives a slightly different app each time.
- Each tool wraps your prompt in its own hidden instructions and starter project.
- Anything you didn't say, it guesses: currency, colours, extra features.
- Extra features are extra code: extra places for bugs.
Fix: the spec habit from episode 5: say it ("rupees, no other inputs, round money to 2 decimals"), or check it after.
Check what you got
Test with numbers you can work out by hand: bill 1250, 20%, 3 people.
tip = 1250 × 20 / 100 = 250
total = 1250 + 250 = 1500
each = 1500 / 3 = 500.00
tip/pp = 250 / 3 = 83.33
Both apps showed 83.33 and 500.00 (₹ in Lovable, $ in Bolt). Correct, for a normal bill. A normal bill is the easy case.
Editing: prompts and clicks
1. A follow-up prompt (one small change at a time):
Change the accent colour from orange to teal, and add a 5% tip button before 10%.
Lovable did it, and its message checked the new button: "a ₹1,250 bill at 5% split 3 ways came out right: ₹20.83 tip and ₹437.50 total per person." Our check: 1250 × 5% = 62.50; 62.50 / 3 = 20.83; 1312.50 / 3 = 437.50. Correct.
2. Visual editing: click an element on the page and the chat box changes to "1 selection, Ask Lovable to modify the selected element", so "make this bigger" goes to exactly that element. Great for looks (text, colours, spacing); it can't show you the maths behind the numbers.

Under the hood: the real code
Every builder writes a real project.
Lovable's code view (free plan) says Read only with an Upgrade button. Lovable's plans page lists editing and downloading code under paid plans. Its tip maths lives in one function, with a comment it wrote: "Invalid or negative bills count as 0; people is clamped to at least 1." (Clamp = force a value into a safe range: below 0 becomes 0.)
export function calculateTip(bill: number, tipPercent: number, people: number): TipResult {
const safeBill = Number.isFinite(bill) && bill > 0 ? bill : 0;
const safePeople = Number.isFinite(people) && people >= 1 ? Math.floor(people) : 1;
const tipTotal = (safeBill * tipPercent) / 100;
const grandTotal = safeBill + tipTotal;
return { tipTotal, grandTotal, tipPerPerson: tipTotal / safePeople, totalPerPerson: grandTotal / safePeople };
}
Bolt built a full Vite + React + TypeScript project (package.json, vite.config, tailwind.config, tsconfig), with Vite running in a terminal at the bottom. Its maths (App.tsx, lines 13–19):
const bill = parseFloat(billAmount) || 0;
const people = Math.max(1, parseInt(numPeople) || 1);
const tip = tipPercent !== null ? tipPercent : parseFloat(customTip) || 0;
const totalTip = bill * (tip / 100);
const totalBill = bill + totalTip;
const tipPerPerson = totalTip / people;
- Vite: the tool that runs your project while you build it (and builds it for publishing).
- React: builds the page from components (episode 12).
- TypeScript: JavaScript with types, labels that say "this is a number, this is text".
- Tailwind: styling with short class names, like
text-xl. parseFloat: reads text and turns it into a number (parseFloat("12.5")→ 12.5).
Nothing in Bolt's lines stops a negative bill.
Test the edges (real runs)
We copied Bolt's lines into the SyntaxPilot compiler (JavaScript, Node.js):
// Bolt's tip maths (App.tsx lines 13-19, copied from the screen)
function results(billAmount, tipPercent, customTip, numPeople) {
const bill = parseFloat(billAmount) || 0;
const people = Math.max(1, parseInt(numPeople) || 1);
const tip = tipPercent !== null ? tipPercent : parseFloat(customTip) || 0;
const totalTip = bill * (tip / 100);
const totalBill = bill + totalTip;
return [(totalTip / people).toFixed(2), (totalBill / people).toFixed(2)];
}
console.log("1250, 20%, 3 people:", results("1250", 20, "", "3"));
console.log("-1250, 20%, 3 people:", results("-1250", 20, "", "3"));
console.log("1250, custom -50%, 3:", results("1250", null, "-50", "3"));
Output:
1250, 20%, 3 people: [ '83.33', '500.00' ]
-1250, 20%, 3 people: [ '-83.33', '-500.00' ]
1250, custom -50%, 3: [ '-208.33', '208.33' ]
A negative bill gives negative money, and the custom tip box nobody asked for takes a −50% tip: each friend pays 208.33 instead of 500.
Lovable's function, copied the same way:
// Lovable's tip maths (src/lib, copied from the screen)
function calculateTip(bill, tipPercent, people) {
const safeBill = Number.isFinite(bill) && bill > 0 ? bill : 0;
const safePeople = Number.isFinite(people) && people >= 1 ? Math.floor(people) : 1;
const tipTotal = (safeBill * tipPercent) / 100;
const grandTotal = safeBill + tipTotal;
return [(tipTotal / safePeople).toFixed(2), (grandTotal / safePeople).toFixed(2)];
}
console.log("-1250, 20%, 3 people:", calculateTip(-1250, 20, 3));
const each = calculateTip(1000, 10, 3)[1];
console.log("1000, 10%, 3 people:", each, "each");
console.log("collected:", (each * 3).toFixed(2), "for a bill of 1100.00");
Output:
-1250, 20%, 3 people: [ '0.00', '0.00' ]
1000, 10%, 3 people: 366.67 each
collected: 1100.01 for a bill of 1100.00
The clamp works. But three people paying 366.67 collect 1100.01 for an 1100 bill. One paisa is nothing at dinner, a real bug in a payments app. Rounding money needs a rule, like the one in episode 27: give the leftover paisa to one person.
Edge case = an unusual input at the edge of what's allowed. Test: 0, negative, very large, decimals, text with commas, and the features nobody asked for.
Asking an agent to review (real run)
We saved Bolt's lines as bolt-tip.js and asked Claude Code:
claude -p "This file, bolt-tip.js, is the tip maths from a tip calculator an app builder (Bolt) generated for us. Before we ship it, review boltResults for bugs a real user could trigger by typing in the boxes (bill, custom tip %, number of people). Fix them with the smallest change, keep the function name and what it returns, and tell me each bug you found in one line."
Its reply (shortened where marked "..."):
I couldn't test it: running node needed an approval I didn't have, so I traced each case by hand.
- Negative bill: typing
-50gave negative tip and total per person. It now counts as 0.- Negative custom tip %: typing
-20cut the bill (100 became 80 total). It now counts as 0%.- Very large numbers: typing
1e400orInfinityin the bill or tip box showedInfinityper person, andInfinityin both boxes showedNaN. These now count as 0.Still there, your call: ...
1,250is read as a bill of 1 ... with no error shown.
Its change:
- const bill = parseFloat(billAmount) || 0;
+ const toAmount = (v) => { const n = parseFloat(v); return isFinite(n) && n > 0 ? n : 0; };
+ const bill = toAmount(billAmount);
const people = Math.max(1, parseInt(numPeople) || 1);
- const tip = tipPercent !== null ? tipPercent : parseFloat(customTip) || 0;
+ const tip = tipPercent !== null ? tipPercent : toAmount(customTip);
Our check: run what it only imagined
$ node check.js # tip per person / total per person
bill -1250 before: -83.33 / -500.00 after: 0.00 / 0.00
custom tip -50 before: -208.33 / 208.33 after: 0.00 / 416.67
bill and tip Infinity before: Infinity / Infinity after: 0.00 / 0.00
bill 1,250 before: 0.07 / 0.40 after: 0.07 / 0.40
Today's AI mistake
| It said | The real output |
|---|---|
"Infinity in both boxes showed NaN" |
Infinity / Infinity. Not NaN. |
It couldn't run the code, reasoned in its head, and one guess came out as a confident fact. Also, its fix turns bad input silently into 0: type −1250 by mistake and you just see zeros, with no message. A better app tells the user "Enter a bill above 0".
Its real catch was useful: parseFloat("1,250") is 1, so a bill of ₹1,250 typed with a comma becomes ₹1, and each friend pays 40 paise. We confirmed it, and it's still unfixed: strip commas, or use a number-only input.
The rule: "I tested it" from an AI, or from a builder's chat, is a claim. It counts only when you see the output yourself.
Free limits and how the code leaves (docs, 14 Nov 2026)
| Free plan | How the code leaves | |
|---|---|---|
| Lovable | 5 build credits a day, up to 30 a month; no custom domain; code view read-only (editing and downloading code on paid plans) | GitHub sync is included: two-way, one active branch. After disconnecting, "Your repository stays on GitHub." Paid plans: Download codebase. |
| Bolt | 1M tokens a month, 300K daily limit; "Bolt branding on websites"; hosting included; custom domain on Pro ($25/month) | Download as a zip (desktop); GitHub: new repo is private on main, a commit for every working change, pulls GitHub changes every 30 s, stays on main. |
| v0 | $0; 7 messages a day; credits depend on the current offer | "Vercel doesn't own the code generated." Bi-directional GitHub integration on branches and pull requests; Publish to Vercel; "can still export code and deploy elsewhere". |

Once the code is in your own GitHub repository, you hold a full copy with its history: open it in any editor, run it on your laptop, host it anywhere.
Lock-in
Lock-in = leaving costs so much that you stay. What doesn't travel with the code:
- their database and logins: your users' data and accounts live on their side;
- their hosting, links and domain settings;
- their editor: visual edits and chat history.
Own three things from day one: the code (in your repo), a way to export your data, and your domain name (if you buy one).
When to move to your own editor
| Stay in the builder | Move to an editor + agent |
|---|---|
| A demo by tonight, a prototype, a simple page, learning | Credits run out on every small fix |
| You need tests, code review or a teammate | |
| The AI goes round in circles on one bug (episode 25) | |
| Real users, real money, private data |
Path: builder → GitHub sync → clone to your laptop → VS Code + an agent (Claude Code) + your tests → deploy yourself (episode 35).
Checklist
- [ ] Before you build: find the export option (GitHub sync / download) on your plan
- [ ] Say currency, rounding and "no extra inputs" in the prompt
- [ ] Check one case by hand
- [ ] Test edges: 0, negative, huge, decimals, "1,250", every box nobody asked for
- [ ] Read the code view: find the maths
- [ ] "I tested it" counts only with output you saw
- [ ] Own the code, the data export and the domain
Common mistakes (real)
| Mistake | What we saw | Why | Fix |
|---|---|---|---|
| Ship the first result | $ 0.00 in an app for India |
Unsaid = guessed | Say it in the prompt / spec |
| Test one normal bill | [ '-83.33', '-500.00' ] for −1250 |
Edges never tried | Test 0, negative, huge, text |
| Trust an extra feature | Custom −50% → 208.33 each, not 500 |
Nobody planned it | Test it, or ask to remove it |
| Rounding each share | collected: 1100.01 for a bill of 1100.00 |
Each share rounded up | A rounding rule (leftover paisa) |
| Trust "I tested it" | Said NaN; real: Infinity / Infinity |
It never ran the code | Run it yourself |
| A fix that hides errors | −1250 → 0.00 / 0.00, no message |
Bad input swallowed | Show "Enter a bill above 0" |
| Build first, exit later | Code read-only, data on their side | Lock-in | GitHub sync on day one |
Mini project
- In a free app builder, use today's prompt plus: "Use the rupee sign. No other inputs. Round money to 2 decimals, and if the shares don't add up to the total, the first person pays the leftover paisa."
- Test it with: bill 1250 / 20% / 3; −100; 0 people;
1,250; 1000 / 10% / 3. Write the expected answer first. - Open the code view and find the maths. Connect GitHub (or download), clone it, and add one test for the rounding rule.
Practice questions
- Why did Lovable and Bolt build different apps from the same prompt?
Answer
The LLM picks words with some randomness, each tool adds its own hidden instructions and starter template, and everything the prompt didn't say (currency, extra inputs, colours) is guessed.
- What does
Math.max(1, parseInt("0") || 1)give, and why?
Answer
parseInt("0")is 0, which is "falsy", so|| 1gives 1, andMath.max(1, 1)is 1. Zero people becomes one person.
- Bill 900, 10% tip, 7 people. What does each person pay, rounded to 2 decimals, and how much is collected?
Answer
990 / 7 = 141.428… → 141.43 each; 7 × 141.43 = 990.01, one paisa too much.
- An app builder's chat says "I tested it with ₹1,250 and it works." What do you do?
Answer
Treat it as a claim. Work one case out by hand and check it on screen, then try the edges yourself (negative, zero, huge, commas, extra features).
- Name three things that may not come with you when you export an app builder's code.
Answer
Your users' data and accounts in the builder's database and auth, the hosting and its link/domain settings, and the editor's visual edits and chat history.
Quiz
const bill = parseFloat("1,250") || 0;
console.log(bill);
- A) 1250
- B) 1
- C) 0
- D) NaN
Answer
B. parseFloat reads a number from the start of the text and stops at the first character it can't use, the comma. No error, just a wrong number.
Interview questions
- "You built this with an app builder. Do you understand the code?" Yes: show the maths function, explain each line, and show the edge-case tests you ran and the bugs you found (negative bill, rounding, commas).
- "How would you avoid vendor lock-in with a tool like Lovable or Bolt?" Sync to my own GitHub repo from day one, keep data exportable (or use my own database), own the domain, and keep the project runnable locally with
npm install && npm run dev. - "An AI reviewer says it tested your code. Is that enough?" No. I check whether it actually ran anything; I run the same inputs before and after its fix and read the output.
Glossary
| Term | Meaning (with an example) |
|---|---|
| AI app builder | A website that turns a chat prompt into a working app, runs it and hosts it (Lovable, Bolt, v0). |
| Prompt | The instructions you type for the AI ("Build a simple tip calculator..."). |
| Large language model (LLM) | The AI model that writes text and code by predicting the next word. |
| Token | A small piece of text (about ¾ of a word) the AI reads or writes; plans limit them. |
| Credits | A plan's allowance of AI work; each message uses some (Lovable Free: 5 a day). |
| Free tier / free plan | What you get without paying, with limits. |
| Preview | Your app running inside the builder, before anyone else sees it. |
| Publish / hosting | Putting the app on the builder's servers at a public link. |
| Follow-up prompt | Another message that changes the app ("add a 5% button"). |
| Visual editing | Clicking an element on the page to change exactly that element. |
| Code view | The builder's view of the files it wrote. |
| Read only | You can look, not change (Lovable's free code view). |
| Vite | A tool that runs a web project while you build it, and builds it for publishing. |
| React | A library that builds pages from components. |
| TypeScript | JavaScript with types: labels like number and string. |
| Tailwind | Styling with short class names in the HTML. |
package.json |
The file listing a JavaScript project's name, scripts and libraries. |
parseFloat |
Turns text into a decimal number; stops at the first character it can't use. |
NaN |
"Not a Number": what JavaScript gives when maths has no numeric answer. |
Infinity |
JavaScript's value for a number too big to store, e.g. parseFloat("1e400"). |
| Clamp | Force a value into a safe range (negative bill → 0; 0 people → 1). |
| Edge case | An unusual input at the edge of what's allowed: 0, negative, huge, text. |
| Rounding rule | How to split money so the shares add up exactly (the leftover paisa goes to one person). |
| Scope creep | Features nobody asked for (Bolt's "Custom tip %" box). |
| Export | Taking the code out of the tool: GitHub sync or a download. |
| GitHub sync | The builder keeps a copy of your code in your GitHub repository, updated as you work. |
| Repository (repo) | A project folder with its full history, e.g. on GitHub. |
| Two-way (bi-directional) sync | Changes in the builder go to GitHub, and changes pushed to GitHub come back. |
| Branch | A separate line of changes in a repo; main is the usual default. |
| Pull request (PR) | A request to merge one branch's changes into another, with a review. |
| Zip | One compressed file holding a whole folder (Bolt's download). |
| Lock-in | When leaving a tool costs so much that you stay. |
| Custom domain | Your own web address, like tipsplit.in, instead of the builder's link. |
| Agent | An AI that plans and edits files (and can run commands, if allowed), like Claude Code. |
Summary
- An AI app builder turns a prompt into code, a preview and a link: perfect for a demo by tonight.
- The same prompt gave two different apps (₹ vs $, an extra "Custom tip %" box): say it, or check it.
- Both were right for a normal bill. The edges told another story: Bolt's lines gave negative money for −1250 and half the bill for a −50% custom tip; Lovable's clamped bad input but collected 1100.01 for 1100.
- The agent's review found real bugs (and the
"1,250"→ 1 trap), but it never ran the code and claimedNaNwhere the output isInfinity; its fix also hid bad input as 0. Run it yourself. - Find the exit before you build: GitHub sync or a download, and own your code, data and domain.
- Move to your own editor when credits, tests, teammates, circles of bad fixes, or real users demand it.
- Next: episode 23, mobile apps with AI.