Course Lessons

JAVASCRIPT FOUNDATIONS + AI MINDSET

Back to Course

Deploying Your App to Vercel

JAVASCRIPT... Lesson 28 of 41 9 min

Deploying Your App to Vercel

From Local Code to Live URL in Minutes

By AI Learning Assistant  ·  Git  ·  GitHub  ·  Vercel  ·  CI/CD

🤖 YOUR KIND AI LEARNING ASSISTANT

Congratulations! You've built amazing React apps. Now it's time to share them with the world. Today we're learning how to deploy your app to Vercel — a free platform that turns your GitHub repository into a live website in seconds. I'll explain Git, GitHub, deployment, and CI/CD step by step. Let's get your app online! 🌐

What Does "Deploying" Mean?

TAKING YOUR CODE FROM YOUR COMPUTER TO THE INTERNET

Right now, your React app only runs on your computer (http://localhost:3000). No one else can see it. Deployment is the process of moving your code from your local machine to a server — a powerful computer that is always online. Once deployed, anyone with the URL can visit your app, from anywhere in the world, 24/7.

Think of deployment like this: your computer is your private workshop where you build furniture. A deployed server is a public showroom where customers can see and use your furniture. Vercel is a platform that gives you a free showroom.

🎯 WHY DEPLOYMENT MATTERS

Share projects with employers, friends, and family. Add live links to your portfolio and resume. Get feedback from real users. Build a professional online presence. Deploying is the final step that turns your code into a real product.

What Are Git and GitHub?

VERSION CONTROL · CODE HOSTING · COLLABORATION

Git is a tool that tracks changes to your code over time. Think of it as a "time machine" for your files. Every time you git commit, you take a snapshot of your project. If you break something later, you can go back to a working snapshot.

GitHub is a website where you upload your Git repositories to the cloud. It's like Google Drive for code, but with powerful collaboration features. GitHub stores your code safely online, lets you share it with others, and — most importantly for us — connects directly to Vercel for automatic deployment.

📌 BASIC GIT COMMANDS (EXPLAINED)

git init                // Creates a new Git repository in your project folder
git add .               // Stages all files — tells Git which changes to track
git commit -m "message" // Takes a snapshot with a description
git push                // Uploads your commits to GitHub
git pull                // Downloads latest changes from GitHub
    

Step-by-Step Deployment to Vercel

FROM CODE TO LIVE URL IN 5 MINUTES

Prerequisites:

  • A React app ready to deploy
  • A free GitHub account (github.com)
  • A free Vercel account (vercel.com)
  • Git installed on your computer (git-scm.com)

Step 1 — Initialize Git and Commit Your Code

# Navigate to your project folder
cd webbo3-project

# Initialize Git (creates a hidden .git folder)
git init

# Stage all files (prepare them for the snapshot)
git add .

# Take the snapshot with a message describing what changed
git commit -m "Webbo3 JS Mastery - my first full project"
    

💡 The `-m` flag means "message". Always write meaningful commit messages so future you knows what changed!

Step 2 — Create a Repository on GitHub

  • Go to github.com and sign in
  • Click the green "New" button
  • Name your repository (e.g., `webbo3-project`)
  • Keep it Public (free for everyone to see)
  • Do NOT initialize with a README (we already have code)
  • Click "Create repository"

Step 3 — Connect Your Local Repository to GitHub

# Add the remote repository (replace YOUR_USERNAME with your GitHub username)
git remote add origin https://github.com/YOUR_USERNAME/webbo3-project.git

# Push your code to GitHub (upload it)
git push -u origin main
    

Step 4 — Deploy to Vercel (The Magic Step)

  • Go to vercel.com and sign in with GitHub (so Vercel can see your repositories)
  • Click "New Project" or "Add New" → "Project"
  • Find your repository (`webbo3-project`) and click "Import"
  • Vercel automatically detects it's a React app and fills in the build settings
  • Click "Deploy"
  • Wait 20‑60 seconds…
  • 🎉 Your app is live at `your-project.vercel.app`!

🎉 SUCCESS! AFTER DEPLOYMENT

Vercel gives you a URL like https://webbo3-project.vercel.app. Share this link anywhere! Every time you push new commits to GitHub, Vercel automatically rebuilds and redeploys your app.

🌐 Simulated Deployment Demo

📦 Building webbo3-project...

✅ Build completed in 18.3s

🚀 Deploying to Vercel edge network...

✨ Live at: https://webbo3-project.vercel.app

✨ This simulates the Vercel deployment log. In reality, you'll see this in your Vercel dashboard!

What is CI/CD?

CONTINUOUS INTEGRATION · CONTINUOUS DEPLOYMENT

CI/CD is a fancy term for "automatic updates". When you push code to GitHub, Vercel automatically:

  1. Detects the new code (Continuous Integration)
  2. Builds the project (`npm run build`)
  3. Deploys the built files to their servers (Continuous Deployment)
  4. Makes the new version live immediately

Without CI/CD, you'd have to manually upload files every time you make a change — slow and error-prone. With CI/CD, deployment happens automatically, often within a minute of pushing to GitHub.

📌 WHAT HAPPENS WHEN YOU PUSH A NEW COMMIT?

1. You run: git add . && git commit -m "fixed button styling" && git push
2. GitHub receives the new commit
3. Vercel detects the change (via webhook)
4. Vercel downloads the latest code
5. Vercel runs: npm install (if dependencies changed)
6. Vercel runs: npm run build
7. Vercel uploads the build folder to their CDN
8. Your live site updates (usually within 60 seconds)
    

💬 ASK YOUR KIND AI ASSISTANT

"What is CI/CD and how does Vercel's automatic deployment work?"

🗣️ YOU ASK THE AI:

"What is CI/CD and how does Vercel's automatic deployment from GitHub work? What happens when I push a new commit to my repo after deploying?"

🤗 YOUR KIND AI ASSISTANT RESPONDS:

CI/CD stands for Continuous Integration / Continuous Deployment. It's a practice that automates the process of testing and releasing software. Think of it as an assembly line for your code — every change automatically goes through the same pipeline and ends up live on the internet.

How Vercel's automatic deployment works:

  • Webhooks: When you push code to GitHub, GitHub sends a secret notification (webhook) to Vercel saying "Hey, new code arrived!"
  • Build Process: Vercel spins up a cloud computer, runs `npm install` and `npm run build`, just like you do locally, but much faster and in a consistent environment.
  • CDN Deployment: The built files (static HTML, CSS, JS) are uploaded to Vercel's global Content Delivery Network (CDN) — hundreds of servers around the world. Users get files from the server closest to them, making your app fast everywhere.

What happens when you push a new commit after deploying? The exact same pipeline runs again. Your old version stays live until the new build finishes, then Vercel swaps to the new version instantly. Your users never see a "down for maintenance" page. This is called atomic deployment — zero downtime.

Why this matters for you: You can deploy 100 times a day if you want — each push triggers a fresh build. Every small improvement, bug fix, or new feature goes live automatically. This is how professional developers work. You're now using the same tools as Netflix, Nike, and Starbucks!

📝 YOUR LEARNING JOURNAL

Today I deployed my first React app to the internet! I learned that Git tracks changes, GitHub stores code in the cloud, and Vercel builds and hosts it automatically. CI/CD means every push creates a new live version — no manual uploading. My app now lives at a real URL that anyone can visit. I feel like a real developer. Next, I'll buy a custom domain and connect it to Vercel. 🌐

Professional GitHub README with AI

STAND OUT TO EMPLOYERS

Your GitHub repository is your coding portfolio. A great README tells visitors what your project does, how to run it, and why it matters. Use AI to generate a professional README in seconds.

# AI Prompt for README (copy and paste to ChatGPT)

Create a professional GitHub README for my React project called "Webbo3 JS Mastery".
Include:
- Project title and description
- Live demo link (my Vercel URL)
- Technologies used (React, Tailwind CSS, etc.)
- Setup instructions (clone, npm install, npm start)
- Screenshot placeholder
- Features list
- Author section

Make it look modern with badges and emojis.
    

🤖 SAMPLE AI-GENERATED README

# 🚀 Webbo3 JS Mastery

A 30‑day JavaScript and React mastery course — build real projects with modern tools.

🔗 Live Demo: https://webbo3-project.vercel.app

⚙️ Tech Stack: React 18, Tailwind CSS, OpenAI API, Vercel

📦 Setup: git clone ... && npm install && npm start

Features: AI chat assistant, interactive countdown, student cards, responsive design

Quick Reference — Git Commands

CommandWhat It Does
git initCreates a new Git repository in current folder
git add .Stages all changes for commit
git commit -m "message"Takes a snapshot with description
git push origin mainUploads commits to GitHub
git pull origin mainDownloads latest changes from GitHub
git log --onelineShows commit history
git statusShows which files have changed

Challenges to Solidify Your Skills

BUILD YOUR DEPLOYMENT PORTFOLIO

  • Challenge 1: Deploy your AI Chat Assistant from Day 25 to Vercel.
  • Challenge 2: Set up a custom domain (buy one for $10/year) and connect it to Vercel.
  • Challenge 3: Add a `.gitignore` file to exclude `node_modules` before your first commit.
  • Challenge 4: Make a small change to your app, push to GitHub, and verify the live site updates automatically.
  • Challenge 5: Use AI to generate a README for your project, add screenshots, and push to GitHub.

🤗 YOUR KIND AI ASSISTANT — FINAL WORDS

💬 "My deployment failed on Vercel" → Check the build logs. Common issues: missing environment variables or a missing `vercel.json` if you have custom routes.

💬 "My images don't show after deploy" → Vercel is case‑sensitive with file names. Make sure your imports match exactly.

💬 "How do I see my deployment history?" → In your Vercel dashboard, click on your project → Deployments tab. Every push creates a new entry.

You did it! Your React app is now live on the internet. You've mastered Git, GitHub, Vercel, and CI/CD. This is a huge milestone — celebrate! Share your URL with friends, family, and in the Webbo3 community. I'm so proud of your journey. See you at the finish line! 🎉

AI-Assisted JavaScript Learning · Deploying Your App to Vercel · Go Live!

Complete this lesson

Mark as complete to track your progress