How to build a web app using vibe coding and natural language prompts

Greg Foster
Greg Foster
Graphite software engineer
Try Graphite

Table of contents

Vibe coding is an AI-assisted programming approach where developers describe what they want in natural language, and an AI generates the corresponding source code. Coined in 2025 by Andrej Karpathy, the term reflects a shift from manual coding to guiding and refining AI-generated code. Instead of hand-coding every feature, developers talk to an AI that writes the implementation. For more on AI-assisted development, see our guide on adopting AI tools in your development workflow.

Vibe coding uses natural language prompts to generate software. Developers describe what they want, and the AI—powered by large language models trained on code—produces working code in response. For example:

Prompt: "Write JavaScript code to estimate Pi using the Monte Carlo method."

Terminal
function estimatePi(numSamples) {
let insideCircle = 0;
for (let i = 0; i < numSamples; i++) {
const x = Math.random();
const y = Math.random();
if (x * x + y * y <= 1) {
insideCircle++;
}
}
return (insideCircle / numSamples) * 4;
}

The developer can now review and refine this code. The workflow is iterative: you prompt, evaluate, and adjust.

Let's walk through building a to-do list app:

  1. Choose a vibe-friendly environment: Use tools like Replit Ghostwriter, or Cursor. For more on AI pair programming, see our best practices guide.

  2. Describe the app: Outline the features. Example: "A to-do app with task input, checkboxes for completion, and delete buttons. Clean design."

  3. Prompt the AI: Paste your description into the AI interface. The system will generate HTML, CSS, and JS files.

  4. Review generated code: Check that the HTML has inputs and buttons, CSS styles the layout, and JS adds interactivity. Learn more about how to review code written by AI.

  5. Test the app: Run it and confirm functionality. Check task addition, completion toggles, and deletion.

  6. Iterate via prompts: If needed, describe changes like: "Add a button to clear completed tasks." The AI will update the code accordingly.

  7. Review with Graphite Diamond: After generating code, use Graphite's AI reviewer, Diamond, to check for bugs or bad practices. Diamond provides immediate, actionable feedback on your code changes.

  8. Deploy: Use built-in deploy tools or export your code to platforms like Vercel or Netlify.

AspectVibe coding (AI-assisted)Traditional coding
Code creationNatural language prompts generate codeDeveloper writes code manually
Development speedFast prototyping, minimal boilerplateSlower, especially for full-stack apps
Required expertiseLower barrier to entryRequires programming knowledge
Control and flexibilityLess granular control; needs prompt tuningFull control over architecture and implementation
Code reviewNeeds tools like Graphite Diamond to assess qualityHuman code review, linters, and tests ensure quality

Graphite Diamond is an AI code reviewer that integrates with your pull request process. Once you've generated your app code, commit it and open a PR. Diamond analyzes the diff, then:

  • Flags logical errors
  • Suggests improvements
  • Identifies potential security issues

This complements vibe coding by validating the AI's output. It acts as an expert reviewer, helping maintain professional code quality. For more on implementing AI code review in your workflow, see our implementation and best practices guide.

Vibe coding allows you to build functional apps by describing what you want in natural language. It speeds up development and lowers entry barriers. However, code quality still matters—tools like Graphite Diamond make sure the AI's output meets professional standards. By combining vibe coding with robust review workflows, developers can ship faster without compromising on reliability. For more on AI-assisted development, explore our comprehensive guide to AI tools in development.

Git inspired
Graphite's CLI and VS Code extension make working with Git effortless.
Learn more

Built for the world's fastest engineering teams, now available for everyone