What is Vercel?
Vercel is the company behind Next.js and the best hosting platform for Next.js apps. The free plan includes:
- Unlimited personal projects
- 100 GB bandwidth/month
- Automatic HTTPS
- Global CDN
- GitHub integration (auto-deploys on every push)
Step 1: Push to GitHub
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/your-username/my-app.git
git push -u origin main
Step 2: Connect to Vercel
- Go to vercel.com and sign in with GitHub
- Click "New Project"
- Select your GitHub repo
- Click "Deploy"
Your project will be live in a few minutes! 🎉
Environment Variables
# .env.local (never commit to Git!)
DATABASE_URL="postgresql://..."
NEXTAUTH_SECRET="your-secret"
STRIPE_SECRET_KEY="sk_live_..."
NEXT_PUBLIC_API_URL="https://api.yourdomain.com"
💡 NEXT_PUBLIC_ prefix: Variables that need to be accessible in the browser must start with
NEXT_PUBLIC_. All others are server-only.
Automatic Preview Deployments
Every GitHub pull request automatically gets a unique preview URL from Vercel. Test your changes before merging to production.
Custom Domain
- Vercel dashboard → your project → Settings → Domains
- Add your domain (e.g. my-site.com)
- Add the CNAME record Vercel shows you in your DNS provider
Önemli Noktalar
- Vercel free plan is sufficient for personal projects
- Every push to GitHub triggers an automatic deployment
- NEXT_PUBLIC_ env vars are accessible in the browser; others are server-only
- Every PR gets an automatic preview URL