Toolstools / vercel

Vercel

What this is

Vercel deploys web apps and websites from a GitHub repository.

It is commonly used for Next.js projects.

Why it matters

Learners need to see their work live, not just running locally.

A live deployment also makes testing and sharing easier.

What to do

Core idea

Flow

GitHub push -> Vercel build -> live URL

Every push to GitHub can trigger a new deployment.

Connect GitHub

  1. Go to vercel.com.
  2. Sign in with GitHub.
  3. Allow Vercel access to the learner's repository.
  4. Click Add New then Project.
  5. Import the correct GitHub repo.

Visual checkpoint:

Terminal command
Vercel Import Project
  Repository: correct project
  Framework Preset: detected
  Root Directory: default unless project is nested
  Environment Variables: only if project needs them

Deploy

  1. Keep the detected framework settings.
  2. Add environment variables only if the project uses them.
  3. Click Deploy.
  4. Wait for the build to finish.
  5. Open the live URL.
  6. Test the main page and any forms/buttons.

Core features to understand

FeatureMeaningBeginner action
ProjectVercel's connection to one GitHub repoOne class project = one Vercel project.
DeploymentOne built version of the siteOpen the newest deployment after pushing.
ProductionMain live versionUsually comes from the main branch.
PreviewTemporary version for another branch/commitUseful later, not needed for Vibe 101.
Build logsTerminal output from VercelRead the first red error, not the whole page.
Environment variablesSecret settings stored on VercelAdd them in Vercel, not in GitHub.
DomainsCustom URLsUse later after the default URL works.

Environment variables

If the local project uses .env.local, Vercel needs matching variables in the project settings.

Example:

Setting

NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...

After adding new environment variables, redeploy. Old deployments do not magically rebuild with new values.

If deployment fails

Check in this order:

  1. Does npm run build work locally?
  2. Did the learner push the latest code to GitHub?
  3. Is Vercel connected to the correct repo?
  4. Did the build log mention a missing env variable?
  5. Did the project rely on files ignored by Git?

Use this prompt:

Copy prompt
My Vercel deployment failed.

Localhost status:
[working / not working]

GitHub repo:
[link]

Build error:
[paste first red error]

Help me fix only the next step.

Common mistakes

  • Deploying a project that fails local build.
  • Forgetting required environment variables.
  • Sharing the preview URL before checking the page.
  • Importing the wrong repository.
  • Ignoring build logs and guessing.
  • Adding env variables after deploy but not redeploying.

Next step

Go to Supabase.