Skip to content
mentoor

From vibe-coded MVP to production

For engineers

A founder's AI-built booking app gets real users and real payments: scope it, secure it, test it and hand it over.

A prototype that works in a demo is not yet a product that holds other people's data and money. Moving from one to the other is a short, ordered job: protect what is exposed, make it recoverable, prove it with tests, then decide who owns the code.

The case

Tidyhaul is a booking app for a small home-cleaning company. The founder, who is not an engineer, built it in three weekends with an AI app builder, a hosted Postgres database (Supabase) and Stripe. She accepted every change without reading it. It works, 140 beta users have signed up, and she now wants to take card deposits for real. She hires an engineer for two weeks.

This is a common path. The speed is real: a working app in days. The risk is that nobody has read the code, so nobody can say how it handles logins, who may read which rows, or what happens when two payments arrive at once.

Why this matters

Vibe coding, as the term was coined in 2025, means accepting AI-written code without reviewing it. That is fine for a throwaway demo. It stops being fine at the moment the app holds customers' addresses and takes money, because mistakes now harm other people. Models write code that runs. They also skip ownership checks, leave test keys in the front end and report success without proof.

How to do it

1. Scope before you harden. Decide the one assumption the release tests and the number that decides success. For Tidyhaul: customers will pay a deposit online, measured as the share of the first 50 booking starters who pay. Everything not needed for that waits.

2. Make it recoverable first. Put the code in Git and turn on database backups, and test one restore. Hardening means changing a lot of code, and you need a way back.

3. Close the exposure, in order of risk. Check every table for row level security, find keys that ship to the browser, and rotate any secret that was ever committed. Then review each endpoint for an ownership check and each query for string building. Verify Stripe webhooks with the signing secret.

4. Test what the money and the data depend on. Ask the agent for tests, then read them. A test is worth keeping only if it fails when the code is wrong. Run real Postgres for access rules, keep a few end-to-end tests on the flows that earn money, and freeze the clock instead of adding retries.

5. Hand it over properly. Write down what the app does, what is known broken and what has never been checked. The engineer decides from that whether to harden or rebuild.

Before and after

Before: the builder says "payment is done and tested". The log shows the Paid label came from the browser's return page, and no webhook request arrived. After: the webhook verifies the signature, an end-to-end test in Stripe test mode confirms the booking turns Paid from the webhook alone, and the founder knows what was checked.

-- before: the public key can read every row
create table bookings (id uuid primary key, user_id uuid, address text);

-- after: only the owner can see a row
alter table bookings enable row level security;
create policy "owner reads own" on bookings
  for select using (user_id = auth.uid());

What goes wrong

  • Trusting the tool's report. "I tested the full flow" can mean the page loaded. Ask for the evidence: a log line, a failing test that now passes.
  • Hardening in the wrong order. Teams tidy code and add monitoring while a table is open and a live key is public. Fix exposure first.
  • Tests that cannot fail. Agents write expected values from the same constant as the code, mock away the very rule under test, or add retries to a flaky test. High coverage can hide all of this.
  • Rebuilding by reflex. A rewrite adds untested code and keeps exposed data open for weeks. Rebuild only when the structure cannot be fixed.

Each step names a skill: vibe coding limits, security flaws in generated code, testing strategy and building an MVP. The questions below ask you to judge real artefacts from this case.

Steps

  1. Scope the smallest release

    Skill: founder-mvp

    Cut the wish list to one release that tests one assumption: customers pay a deposit online. Write the success measure first, for example 20 of the first 50 people who start a booking pay.

    Tidyhaul first release

    Goal: Test whether customers pay a deposit online

    1. Online booking form for one city
    2. Stripe deposit at booking
    3. Success: 20 of the first 50 booking starters pay
    4. Cut: cleaner app, loyalty points, chat, referrals
  2. Make the project recoverable

    Skill: code-vibe

    Connect the code to a Git repository, turn on daily database backups, and restore one backup into a scratch database to prove it works. Do this before any hardening prompt, because a bad change then costs minutes, not data.

  3. Close the exposure by risk

    Skill: aicode-security

    Check row level security on every table, remove any secret from front-end variables, rotate any key that was ever committed, verify the Stripe webhook signature, and add an ownership check to every endpoint that returns a record by id.

    Policy that limits rows to their owner
    alter table profiles enable row level security;create policy "owner reads own" on profiles  for select using (id = auth.uid());
  4. Review what the agent wrote and claims

    Skill: aicode-security

    Read each diff for the flaw classes in the checklist: string-built queries, missing ownership checks, unsafe file names, wide CORS. Treat claims such as "locked down" or "secrets are safe" as unverified until the diff and history show it.

  5. Test the risks that cost money or data

    Skill: eng-testing

    Pick the cheapest test level for each risk. Access rules need real Postgres and two users. Deposit maths needs literal expected values. Three end-to-end flows cover booking and paying, seeing only your own bookings, and cancelling. Replace retries with a fixed clock.

  6. Write the handover and decide

    Skill: founder-mvp

    Hand the engineer a note covering what the app does, how to run it, what is known broken and what was never checked. From it, decide to harden or rebuild: keep the code if its structure is sound and the gaps are fixable, rebuild only when they are not.

    Handover note

    Known broken

    Deposit can be charged twice on fast double clicks.

    Never checked

    Row level security on profiles, webhook signature, backup restore, any automated tests.

Skills this scenario uses

Where to study