Get your API key

Lesson 1 of 5

Preview first, production second

Branches get their own preview link; only main goes live. Test on the preview, then merge.

8 min Free
One step at a time, like flipping pages.

By the end of this lesson you will test every change on its own preview link first, and send it to the live site only after it works.

You need: an app that already deploys to Vercel from GitHub (see Test and go live), Git save points (Never lose your work), your coding agent · Time: 8 minutes

  1. In this course we follow one real-looking app: a fee tracker for Sharma Coaching, a coaching institute with 120 students. Mr Sharma's office uses it every day, and parents open it to check what is due. You built it with Next.js and Supabase and deployed it like in Build your first web MVP.

    Right now every push to main goes live in a minute or two. That was fine for a demo. Now a small mistake at 9 am on fee day means a blank page and twenty phone calls.

    Vercel gives every deployment one of two jobs:

    • Production: the version on your main address. Vercel makes it when you push or merge into the production branch, usually main.
    • Preview: a full working copy of the app at its own address. Vercel makes one when you push any other branch or open a pull request. Real users never see it unless you send them the link.
    Diagram. The fee-reminder branch is pushed and becomes a preview deployment with its own vercel.app link. After the pull request is merged into main, main becomes the production deployment on www.sharmacoaching.in.
    Other branches become previews. Only main becomes production.
    Why?

    A preview is the live app minus the risk. You see the change on a real phone, on real Vercel servers, before a single parent sees it.