M8: Deployment
Deploy your React application to production with Vercel and share it with the world
The final step! Take your completed booking application from local development to production and share it with the world.
Overview
You've built an incredible React application with authentication, state management, routing, forms, and API integration. Now it's time to deploy it to production so anyone can access it on the internet!
In this short but exciting module, you'll learn how to deploy your React app using Vercel - one of the most popular and developer-friendly hosting platforms for modern web applications.
What makes Vercel great:
✨ Zero-configuration deployment
⚡ Automatic HTTPS and CDN
� Git integration for continuous deployment
📊 Built-in analytics and monitoring
🌍 Global edge network
🆓 Generous free tierWhy Deployment Matters
Share your work:
Local development → Only you can see it
Production deployment → Anyone can access itYour portfolio needs live projects, not just code. Deployed applications:
- Demonstrate real-world experience
- Allow others to test your work
- Prove you understand the full development lifecycle
- Make you stand out in job applications
Professional workflow:
Development → Staging → Production
(Local) (Test) (Live Users)Understanding deployment is essential for any web developer. You need to know how to:
- Build optimized production bundles
- Configure environment variables
- Handle production errors
- Monitor application performance
- Update applications safely
What You'll Deploy
By the end of this module, your application will be:
🌐 Live on the internet with a public URL like your-app.vercel.app
🔒 Secure with automatic HTTPS encryption
⚡ Fast with global CDN distribution
📱 Accessible from any device, anywhere in the world
🔄 Ready for updates with simple redeployment workflow
Deployment Overview
The deployment process (simplified):
Step 1: Install Vercel CLI
→ Command-line tool for deployment
→ Authenticates your account
→ Manages your projects
Step 2: Deploy Application
→ Vercel builds your app
→ Optimizes assets for production
→ Uploads to global CDN
→ Provides live URL
Step 3: Celebrate!
→ Share your portfolio project
→ Show it to potential employers
→ Continue building and improvingUnderstanding Production Builds
Development vs Production:
// Development build (npm run dev)
- Fast rebuilds (HMR)
- Readable error messages
- Source maps included
- Large bundle size (~5MB)
- Not optimized
// Production build (npm run build)
- Optimized and minified
- Tree-shaking (removes unused code)
- Code splitting
- Small bundle size (~500KB)
- Obfuscated codeWhat happens during production build:
- Minification: Remove whitespace, shorten variable names
- Tree-shaking: Eliminate unused code
- Code splitting: Break into smaller chunks for faster loading
- Asset optimization: Compress images, fonts, CSS
- Source maps: Optional debugging files
Size comparison:
Development:
main.js: 1.2 MB
vendor.js: 3.8 MB
Total: 5.0 MB
Load time: ~8 seconds
Production:
main.[hash].js: 45 KB
vendor.[hash].js: 380 KB
chunks: 75 KB
Total: 500 KB
Load time: ~1 secondVercel Platform Features
What Vercel provides automatically:
1. Continuous Deployment:
git push origin main
↓
GitHub/GitLab webhook
↓
Vercel auto-builds
↓
Deploy to production
↓
New version live!2. Preview Deployments:
Pull Request created
↓
Vercel deploys preview
↓
Get unique preview URL
↓
Test before merging3. Environment Variables:
Development: .env.local (on your machine)
Production: Vercel dashboard (encrypted)4. Analytics:
- Page views
- User sessions
- Performance metrics
- Error tracking
- Geographic distribution5. Edge Network:
Request from Tokyo → Served from Tokyo edge
Request from London → Served from London edge
Request from NYC → Served from NYC edge
Result: Fast load times globallyLearning Objectives
By the end of this module, you will:
Prerequisites
Before starting Module 8, you should have:
✅ Completed Module 7: Full authentication system with protected routes
✅ Working local application: All features functional in development
✅ GitHub account: For connecting to Vercel (optional but recommended)
✅ Node.js and npm: Already installed for React development
✅ Terminal access: Comfortable running command-line commands
What You'll Need
Required:
- Vercel account (free tier is perfect)
- Terminal/Command Prompt access
- Completed React application from previous modules
Optional:
- Custom domain (if you want a branded URL)
- GitHub repository (for automatic deployments)
- Credit card (only if you exceed free tier limits)
Estimated Time
⏱️ 30 minutes total:
- Lesson 1: Install Vercel CLI (~10 minutes)
- Lesson 2: Deploy Application (~20 minutes)
This is the shortest module because you've done all the hard work building the application!
Module Roadmap
Lesson 1: Install Vercel CLI
- Create Vercel account
- Install CLI tool globally
- Authenticate your account
- Verify installation
Lesson 2: Deploy to Vercel
- Configure project settings
- Run deployment command
- Set environment variables
- Access live application
- Celebrate completion! 🎉
Important Notes
Free Tier Limits: Vercel's free tier is generous and perfect for personal projects and learning. You get unlimited deployments, automatic HTTPS, and 100 GB bandwidth per month.
Environment Variables: Never commit .env files with secrets to Git. Use Vercel's dashboard to set production environment variables securely.
Deployment is NOT Scary: With modern platforms like Vercel, deployment is as simple as running a single command. You'll be amazed how easy it is!
What Happens After Deployment?
Your application goes live:
Before: http://localhost:5173
After: https://your-project.vercel.app
Anyone can access it!You can:
- Add it to your resume
- Share on LinkedIn
- Show to potential employers
- Get feedback from real users
- Continue improving and redeploying
Next steps (beyond this course):
- Set up custom domain
- Configure CI/CD pipeline
- Add monitoring and analytics
- Implement error tracking (Sentry)
- Optimize performance
- Add SEO metadata
- Implement A/B testing
Course Completion Ahead! 🏆
Module 8 is the final module of the React course. After completing it, you will have:
✅ Built a full-stack booking application (8 modules of work!)
✅ Mastered React fundamentals and advanced patterns
✅ Deployed a production application to the internet
✅ Portfolio project to showcase your skills
✅ Professional development experience from start to finish
You're about to become a React developer! 🚀
Let's deploy your application and celebrate your achievement!