Deploying to Vercel - vm5lab/SaaSKit GitHub Wiki
๐ Deploying to Vercel
SaaSKit is optimized for instant deployment using Vercel, the platform built by the creators of Next.js. With zero-config support for Next.js 15.3 (App Router and Server Actions), Vercel makes it seamless to go from local to live in minutes.
โ Requirements
Before deploying, make sure you have:
- A GitHub account with your SaaSKit repo pushed
- A Vercel account
- Supabase project set up and ready
- Environment variables copied to Vercel
๐ฆ 1. Push to GitHub
Initialize your Git repo if you havenโt already:
git init
git remote add origin https://github.com/your-username/saaskit.git
git add .
git commit -m "Initial commit"
git push -u origin main
โ๏ธ 2. Import to Vercel
- Visit https://vercel.com/import
- Select GitHub and choose your
saaskit
repository - Vercel will auto-detect that itโs a Next.js project
- Click Continue
๐ 3. Set Environment Variables
Youโll need to add the following environment variables in Vercel:
Key | Description |
---|---|
SUPABASE_URL |
Your Supabase project URL |
SUPABASE_ANON_KEY |
Public Supabase anon key |
NEXT_PUBLIC_SITE_URL |
The domain URL (e.g. vercel.app) |
You can find these in your local .env.local
file.
Go to: Project Settings โ Environment Variables โ Add
Set for both Production and Preview environments.
๐ 4. Deploy
Click Deploy.
Vercel will:
- Install dependencies
- Build your Next.js app
- Deploy to a public URL (e.g.
saaskit.vercel.app
) - Set up preview environments for every pull request
๐ค 5. Preview & Production
Vercel automatically creates:
- Preview URLs for each Git branch or PR
- Production URL from your
main
branch
You can:
- Roll back deployments
- View build logs
- Add a custom domain (e.g.
app.yourdomain.com
)
๐ง Optional: GitHub Integration
You can enable GitHub integration from Vercelโs dashboard:
- Auto-preview with every commit or PR
- Auto-deploy
main
to production - CI checks for build success
๐ Tips
- Ensure that Prisma schema is already pushed (
npx prisma db push
) - Use
.env.production
in local tests to match production - Add Vercel analytics or error tracking (e.g. Sentry) if needed
โ Summary
- Deploy to Vercel in minutes with zero configuration
- Add your Supabase environment variables
- Get preview environments out of the box
- Custom domain, CI, and scaling all handled by Vercel
Next: Learn about securing your backend with Row Level Security.