Vibe coding a SaaS MVP: the step-by-step guide

Our playbook for going from idea to a deployed SaaS MVP with AI doing most of the typing. Seven steps, copy-paste prompts for each, and the traps that sink most vibe-coded apps.

By the AY Automate team · Updated Nov 21, 2026 · 5 min read

Time
A weekend for a tight scope
Level
Intermediate
Stack
Next.js, Supabase, Stripe, Vercel
Main risk
Open data and leaked keys

Inside this playbook

  • 7prompts, templates and code to copy
  • 1diagrams and real screenshots
  • 7steps, start to finish

Diagram

The playbook at a glance

  1. One-line idea

    who, problem, done

  2. Mini PRD

    AI interviews you

  3. Stack + rules file

    boring tools, written rules

  4. Scaffold + deploy

    a live URL on day 1

  5. One flow end to end

    UI, logic, data

  6. Security pass + ship

    auth, secrets, smoke test

Idea to deployed MVP: the seven steps below, grouped into six moves. Ship a URL on day one, then grow it one flow at a time.

In short

  • Vibe coding means you describe what you want and an AI writes the code. It works for MVPs when you keep scope tiny, write things down (a mini PRD and a rules file the agent reads every session), build one flow at a time, and commit after every working step. It fails when you prompt your way through a big app with no plan, no git and no security pass.
  • You end up with: A deployed MVP with one core flow working end to end, real auth, and a URL you can send to users.

Who it is for: Founders and product people who can read code a little, or devs who want to ship faster.

Overview

At a glance

Two routes. Both are fine. Pick by how much control you want.
  • Tools

    One-shot route
    Lovable, Bolt, Replit
    Guided route
    Claude Code, Cursor
  • You get

    One-shot route
    A working app fast, less control
    Guided route
    Code you understand, more control
  • Best for

    One-shot route
    Simple apps, demos, validation
    Guided route
    Apps you will keep growing
  • Watch out for

    One-shot route
    Hitting a wall when logic gets complex
    Guided route
    Slower first day
  • Our default

    One-shot route
    To test an idea with users
    Guided route
    For anything that will take payments

Before you start

Before you start

  • An idea you can say in one sentence
  • A GitHub account (git is your seatbelt)
  • One AI coding tool: Claude Code or Cursor, or Lovable, Bolt or Replit
  • Free accounts on Vercel and Supabase (or your chosen host and database)
  • Two hours of focus for day one
  • Three people who would try the MVP next week

Step 1 · 1 hour

Define the idea and get a mini PRD

Write the app in one or two lines: who it is for, what problem it fixes, and what "done" looks like for v1. Then let the AI interview you. Its questions catch the gaps you skip when you write alone.

Prompt

Kickoff prompt

I want to build [your app idea] for [who].
Ask me simple questions, one at a time, to pin down:
- the users and the one job they hire this app for
- the single thing v1 must do well
- how someone uses it from start to finish
Then summarize in plain bullets and list open questions.

Prompt

Mini PRD prompt

Write a short PRD (under 2 pages) from our conversation:
1) Goals and non-goals
2) Target users and main job-to-be-done
3) MVP features and the main user flow
4) Key screens, with empty, loading and error states
5) Data model: entities, fields, relationships
6) Risks and assumptions
End with a checklist I can review. Save it as docs/PRD.md.

Step 2 · 30 minutes

Choose a boring stack that will not fight you

Pick popular tools with lots of examples. The AI has seen them thousands of times, so it writes better code for them and you find answers faster when it breaks.

  • Web app

    Our default
    Next.js + TypeScript + Tailwind
    Why
    Huge example base, types catch AI mistakes
  • Database + auth

    Our default
    Supabase
    Why
    Postgres, auth and storage in one, with row level security
  • Payments

    Our default
    Stripe
    Why
    Best docs, test mode from day one
  • Hosting

    Our default
    Vercel
    Why
    Preview URL per branch, deploys on push
  • Coding agent

    Our default
    Claude Code or Cursor
    Why
    Plans, edits many files, runs your commands

Step 3 · 20 minutes

Write the rules file the agent reads every session

This step was missing from the first version of this playbook, and it is the one that saves the most pain. Agents forget everything between sessions. A rules file (CLAUDE.md for Claude Code, AGENTS.md or Cursor rules elsewhere) gives every session the same memory: stack, conventions, commands and the things it must never do.

Template

CLAUDE.md / AGENTS.md starter

# [App name]
[One-line description.] Full spec: docs/PRD.md

## Stack
Next.js (App Router) + TypeScript + Tailwind. Supabase (Postgres, auth).
Stripe for payments. Deployed on Vercel.

## Commands
- dev: npm run dev
- check: npm run lint && npm run typecheck
- test: npm test

## Rules
- Plan first. Show the plan, wait for "go", then edit.
- Small changes. One feature per branch. Commit when it works.
- Never put secrets in code. Use .env.local and list keys in .env.example.
- Every table has row level security on. No exceptions.
- Every screen has loading, empty and error states.
- If a fix fails twice, stop and explain what you think is wrong.

Step 4 · 1 to 2 hours

Scaffold it and deploy on day one

Get a skeleton running and live. A deployed empty app beats a perfect local one: you catch hosting and env problems while the app is still tiny.

Prompt

Scaffold prompt (guided route)

Read CLAUDE.md and docs/PRD.md. Plan first, then set up:
- Next.js + TypeScript + Tailwind, App Router
- folders: components/, lib/, app/api/
- .env.example with placeholders for every key we will need
- a home page with the app name and one-line purpose
When done, print the exact commands to run it and a 5-point
checklist to confirm it works. Do not add features yet.
  • Runs locally with no errors
  • Pushed to GitHub, first commit "setup ok"
  • Connected to Vercel, preview URL loads
  • Env vars set in Vercel, not in code

Step 5 · Half a day

Build one flow end to end

Pick the one flow from your PRD that delivers the value. Build it thin through every layer: screen, logic, data. Start with fake data, then swap in the real source. Think lego: one block, see it work, commit, next block.

Diagram

The build loop for each block. Commit at every green check.

  1. Screen

    with empty and error states

  2. Action

    button calls a function

  3. Mock data

    a local JSON file first

  4. Real data

    API or database

  5. Commit

    "flow X works"

Prompt

Feature prompt

Build the [flow name] flow from docs/PRD.md.
- Screen: [inputs], one primary button, loading/empty/error states
- On submit: call [function] in lib/[file].ts
- Start with mock data from data/[file].json
- Return typed results and render them as a list
Plan first. Keep the change small. Tell me how to test it by hand.

Prompt

Bug fix prompt

Bug: [what you did] -> [what happened] (expected: [what should happen]).
Reproduce it, explain the cause in plain words, propose the smallest fix,
show the diff, and add a test that fails before and passes after.

Step 6 · 1 day

Add auth, real data and payments

This is where vibe-coded apps get into trouble, because the happy path works while the data is wide open. Do these in order and test each one as a logged-out user and as a second account.

  • Auth

    Do this
    Supabase auth with email or magic link
    Test it by
    Logging out and opening a private URL
  • Tables

    Do this
    Row level security on every table, policies per user
    Test it by
    Reading user A's data while logged in as user B
  • Secrets

    Do this
    Service keys only on the server, never in client code
    Test it by
    Searching the built JS for your key names
  • Payments

    Do this
    Stripe checkout in test mode, webhook updates the plan
    Test it by
    A test card, then a failed card
  • Limits

    Do this
    Rate limit any route that calls a paid API
    Test it by
    Hitting it 50 times in a loop

Step 7 · 2 hours

Run the security pass, smoke test and ship

Prompt

Security review prompt

Review this repo as a security engineer before launch. Check:
- secrets or keys in client code, git history or logs
- tables without row level security, or policies that are too open
- API routes without auth checks or input validation
- routes that call paid APIs without rate limits
- error messages that leak internals
List findings by severity with file and line. Fix only after I say go.
  • Click every flow in production, logged in and logged out
  • Error boundary and a friendly fallback page
  • Basic analytics on signup and the core action
  • A way for users to reach you from inside the app
  • Follow-ups written down, not fixed tonight

Then send the URL to your three people. Their first five minutes teach you more than another week of prompting.

Watch out

What breaks, and the fix

  • The doom loop: the agent breaks one thing while fixing another

    Fix: Revert to the last good commit, shrink the task, and add a rule: stop after two failed fixes and explain.

  • API keys shipped in client code

    Fix: Server-only keys, .env.example for names, and the security prompt in step 7 before launch.

  • Anyone can read everyone's data

    Fix: Turn on row level security on every Supabase table and test with a second account.

  • Huge prompts that ask for the whole app

    Fix: One flow per prompt. The PRD holds the big picture, the prompt holds one block.

  • No git, so no way back

    Fix: Commit after every working step. Branches for anything risky.

  • Scope creep before the first user

    Fix: Write nice-to-haves in docs/later.md and ship v1 without them.

Results

How to measure it

  • Time to first deploy

    How to track it
    Hours from first prompt to a live URL
    What good looks like
    Day one
  • Core flow working end to end

    How to track it
    Manual run in production, logged in
    What good looks like
    Yes, with no console errors
  • Security pass findings

    How to track it
    Step 7 prompt output
    What good looks like
    Zero high-severity items open at launch
  • First users who finish the core action

    How to track it
    Analytics event on the core action
    What good looks like
    Most of your first testers
  • Reverts per week

    How to track it
    Git log
    What good looks like
    Falling as your rules file improves

Questions

FAQ

Can you build a real SaaS with vibe coding?

You can build a real MVP: one core flow, auth, payments, deployed. Past that, the code needs someone who can read it, review it and keep it secure. That is when it pays to bring in an engineer.

Which vibe coding tool is best for a SaaS MVP?

Lovable, Bolt or Replit to test an idea fast. Claude Code or Cursor if you will keep growing the app and want to own the code. Our vibe coding tools roundup compares them.

Do I need to know how to code?

Not to start. You do need to read errors, use git, and test like a user. The guided route teaches you the code as you go.

What is a CLAUDE.md or AGENTS.md file?

A plain text file at the root of your repo that the coding agent reads at the start of each session: stack, commands, conventions and rules. It is the cheapest way to make AI output consistent.

Is vibe-coded code secure?

Not by default. The usual holes are keys in client code, open database tables and routes without auth. Run the security pass in step 7 before real users sign up.

How long does it take to vibe code an MVP?

A tight scope can be live in a weekend. Payments, integrations and a security pass add days. Shipping one flow first keeps it short.

Sources

AI Engineers

Want an engineer to build this with you?

Built the MVP and now need it production-ready, reviewed and secure? An AI engineer joins your team in 10 days and builds it with you, in your stack.

From $3,000/month. Starting price, your quote may be higher. First month money-back.