Vibe coding means building software by describing what you want to an AI tool in everyday language and letting it write the code. You test the result, say what to change, and repeat. It's a fast way to turn an idea into a working app, and this guide shows how to do it well: what vibe coding is good for, where it goes wrong, a workflow you can follow alone or in a team, and what to check before real users touch your app.
What is vibe coding?
The term comes from Andrej Karpathy, a founding member of OpenAI and former head of AI at Tesla. In a post on X in February 2025 he described "a new kind of coding I call vibe coding", where you "fully give in to the vibes" and "forget that the code even exists". He talked to the AI, accepted its changes without reading them and pasted error messages back until things worked. He also said it suited throwaway weekend projects. The phrase spread fast, and Collins Dictionary named "vibe coding" its Word of the Year for 2025.
Today people use the term more loosely, for any app built mainly by prompting an AI tool. The tools range from chat assistants such as ChatGPT and Claude, to code editors with AI built in such as Cursor, to app builders such as Lovable, Bolt and Replit that create and host a whole app from a description.
It helps to keep two styles apart. In pure vibe coding you never look at the code. In AI-assisted development you still let the AI write most of it, but you read it, run it and understand it before you keep it. The first is fine for a toy. Anything that will hold real data needs the second.
What vibe coding is good for
- Prototypes. You can show a client, a manager or an investor a clickable version of an idea in a day instead of a month.
- Internal tools. A small dashboard, a form that feeds a spreadsheet or a script that cleans a file every week, used by a few people you know.
- Learning. Asking the AI to build something and then explain each part is a good way to learn a new language or framework, as long as you do the explaining back in your own words.
- Testing an idea cheaply. If nobody wants the product, you've lost a weekend instead of a budget.
Where it goes wrong
The trouble starts when a prototype quietly becomes a product. The AI writes code that works for the happy path you described, and it doesn't know about the cases you didn't mention. These problems come up again and again in AI-built apps:
- API keys and passwords written straight into the code, sometimes into code that runs in the visitor's browser.
- Databases open to anyone who knows the address, because access rules were never switched on.
- Pages that check whether you're logged in but never check whether the record you're opening belongs to you.
- Code that grows so tangled that each new prompt breaks something that used to work.
- No backups, no tests and no record of what changed when.
We cover the security side in detail, with real examples, in Security risks of AI-generated code: what to check.
A practical vibe coding workflow
1. Describe the app before you prompt
Write one short page first. Who uses the app, what are the three or four things they need to do, what data does it store, and who may see which data? Paste it into the AI at the start and keep it in the project, for example as a README file. A clear description saves hours of fixing guesses.
2. Build in small steps
Ask for one feature at a time: the login page, then the list of orders, then the form to add an order. Small requests give smaller changes that you can actually check. If you ask for the whole app in one prompt, you get a lot of code you can't review.
3. Read and run what the AI writes
Run the app after every change and click through it yourself. Read the code too, even slowly. When you don't understand a part, ask the AI to explain it line by line. If it can't give a clear reason for a piece of code, that piece is a good candidate for removal.
4. Use Git from the first hour
Version control lets you go back when a prompt breaks your app, and AI tools will break it sooner or later. Commit each time something works:
git init
git add .
git commit -m "Login page works"
# try a new feature on its own branch
git switch -c add-orders
# see exactly what the AI changed
git diff
# throw away changes you don't want
git restore .
Push the project to a private repository on GitHub, GitLab or Bitbucket so you have a copy outside your laptop.
5. Keep secrets out of the code
Put API keys, database passwords and tokens in environment variables, usually a .env file on your machine and the hosting platform's settings in production. Tell Git never to save that file by adding it to .gitignore before your first commit:
.env
.env.local
node_modules/
Keys that belong to a paid service or give write access must stay on the server. Anything that's sent to the browser can be read by anyone who opens the page.
6. Add a few tests
A test is a small program that checks your code still does what it should. You don't need many. Start with the parts where a mistake costs money or data, such as prices, totals and who can see what. Here's a complete example with the test runner built into Node.js:
// price.mjs
export function orderTotal(subtotal, vatRate) {
return Math.round(subtotal * (1 + vatRate) * 100) / 100;
}
// price.test.mjs
import { test } from "node:test";
import assert from "node:assert/strict";
import { orderTotal } from "./price.mjs";
test("adds VAT to the subtotal", () => {
assert.equal(orderTotal(100, 0.11), 111);
});
test("a free order stays free", () => {
assert.equal(orderTotal(0, 0.11), 0);
});
Run node --test in the project folder after every change. When a test fails after a prompt, you know straight away which change broke it. You can ask the AI to write tests too, but read them: a test that checks nothing will always pass.
7. Check input on the server
Never trust what arrives from a form or an API call, even if the page in the browser already checks it, because anyone can send a request without your page. A small server-side check looks like this:
function readQuantity(value) {
const quantity = Number(value);
if (!Number.isInteger(quantity) || quantity < 1 || quantity > 100) {
throw new Error("Quantity must be a whole number from 1 to 100");
}
return quantity;
}
Vibe coding in a team
When several people prompt AI tools on the same project, the code can drift in different directions within days. A few habits keep it together:
- Keep one shared repository and give each feature its own branch. Merge through pull requests, and have a teammate read every pull request before it's merged.
- Write the project rules down once: the framework, the folder structure, how errors are handled, naming. Most AI coding tools can read a rules or instructions file in the repository, so every teammate's AI follows the same conventions.
- Split the work by area so two people aren't asking their AI to rewrite the same files at the same time.
- Keep pull requests small. Nobody reviews a change of 3,000 lines properly, whoever wrote it.
- Make one person responsible for the database structure and the access rules. Those are the parts that are hardest to fix later.
- Show the app working to the team every few days. Demos catch misunderstandings faster than messages do.
Checklist before real users touch your app
A prototype with fake data can be rough. Once the app holds real customer data, takes payments or is open to the public, go through this list:
- Login and access rules. Every page and API route checks who the user is and whether this record belongs to them. Try opening another user's record by changing the ID in the address bar.
- Secrets. No keys or passwords in the code or in the Git history. If one was ever committed, revoke it with the provider and create a new one.
- Input validation. The server checks every value it receives: type, length, allowed range. Database queries use parameters instead of text glued together.
- Database rules. If you use Supabase, Firebase or a similar service, row level security or security rules are switched on for every table and tested with a normal user account.
- Dependencies. Every package the AI added really exists and is the one you meant. Run
npm auditor the equivalent for your language and update what it flags. - Error handling. Users see a friendly message. Error details, stack traces and database messages stay in your logs.
- Backups. Automatic backups of the database, stored away from the main system, and one test restore to prove they work.
- Costs. Spending limits and alerts on your hosting and AI API accounts, and rate limits on any feature that calls a paid service, so a bot can't run up your bill overnight.
For a quick self-check of whether a system is ready, try our free go-live check.
Practice projects for learners
Pick something small enough to finish, then take it all the way to the checklist above:
- A personal expense tracker with login, categories and a monthly chart. Good practice for access rules, since each user must see only their own expenses.
- A booking page for a small shop with time slots and an email confirmation. You'll deal with dates, time zones and double bookings.
- A shared to-do board for a team of three, built as a team, with branches and pull requests.
- A small inventory app that imports products from a CSV file. It teaches input validation, because real files are full of surprises.
When the app works, ask a friend to try to break it and write down everything they find. Fixing that list teaches more than building the first version did.
Frequently asked questions
Do I need to know how to code to vibe code?
You can build a working prototype without coding experience. To take an app to real users safely, someone on the project needs to read and understand the code, so it's worth learning the basics as you go.
Which tool is best for vibe coding?
App builders such as Lovable, Bolt and Replit are the quickest way to a hosted prototype. Code editors with AI such as Cursor, or assistants like Claude and ChatGPT, give you more control over the code. The workflow in this guide works with any of them.
Is vibe coding safe for a real business app?
It can be, if you treat the AI's code like code from a new developer: review it, test it and check it against the list above before launch. The risk comes from launching code nobody has read.
Will vibe coding replace developers?
It changes what developers spend their time on. Less time goes into typing code and more into describing problems clearly, reviewing changes, designing data and keeping systems secure. Those skills matter more when AI writes the first draft.
How do I learn vibe coding properly?
Learn the basics of one language and of Git, then build the practice projects above with an AI tool, reading every change it makes. Courses where an experienced engineer reviews your work speed this up a lot.
Learn it with Winners Academy
Winners Academy is NavyBits' hands-on training for students and fresh graduates. Its courses are built on real projects, and NavyBits engineers mentor the students and review their work as they build. There are no courses running right now, and new ones are expected soon. Send us a message and we'll let you know when the next course opens.
If your business already runs an app built with AI, our AI code assessment checks its security, code quality and readiness for production, from $1,000. To talk it through, book a free 30-minute call.