This guide will help you deploy Repo Wrapped to Vercel.
- A GitHub account
- A Vercel account (sign up at https://vercel.com)
- Access to this repository
You need to create a GitHub OAuth App for production:
- Go to https://github.com/settings/developers
- Click "New OAuth App"
- Fill in the details:
- Application name:
Repo Wrapped (Production) - Homepage URL:
https://your-app-name.vercel.app(you'll update this after deployment) - Authorization callback URL:
https://your-app-name.vercel.app/api/auth/callback/github
- Application name:
- Click "Register application"
- Copy the Client ID - you'll need this
- Click "Generate a new client secret" and copy it immediately (you won't see it again!)
Run this command to generate a secure random secret:
openssl rand -base64 32Copy the output - you'll need this for the NEXTAUTH_SECRET environment variable.
-
Go to https://vercel.com/new
-
Click "Import Git Repository"
-
Select
augmentcode/augment-repo-wrapped -
Configure the project:
- Framework Preset: Next.js (auto-detected)
- Root Directory:
./(default) - Build Command:
npm run build(default) - Output Directory:
.next(default)
-
Add Environment Variables:
GITHUB_CLIENT_ID- Your production GitHub OAuth Client IDGITHUB_CLIENT_SECRET- Your production GitHub OAuth Client SecretNEXTAUTH_SECRET- The secret you generated in Step 2NEXTAUTH_URL-https://your-app-name.vercel.app(use your actual Vercel URL)NODE_ENV-production
-
Click "Deploy"
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy (follow prompts)
vercel
# Add environment variables
vercel env add GITHUB_CLIENT_ID production
vercel env add GITHUB_CLIENT_SECRET production
vercel env add NEXTAUTH_SECRET production
vercel env add NEXTAUTH_URL production
vercel env add NODE_ENV production
# Deploy to production
vercel --prodAfter deployment, Vercel will give you a production URL (e.g., https://repo-wrapped.vercel.app).
- Go back to your GitHub OAuth App settings: https://github.com/settings/developers
- Update the Homepage URL to your Vercel URL
- Update the Authorization callback URL to:
https://your-vercel-url.vercel.app/api/auth/callback/github - Save changes
- Go to your Vercel project settings
- Navigate to Environment Variables
- Update
NEXTAUTH_URLto match your actual Vercel URL - Redeploy the app (Vercel → Deployments → Redeploy)
- Visit your Vercel URL
- Click "Continue with GitHub"
- Authorize the app
- Test the wrapped feature with a repository
| Variable | Description | Example |
|---|---|---|
GITHUB_CLIENT_ID |
GitHub OAuth App Client ID | Ov23liABC123... |
GITHUB_CLIENT_SECRET |
GitHub OAuth App Client Secret | abc123def456... |
NEXTAUTH_SECRET |
Random secret for NextAuth | D8hVCajguMG2... |
NEXTAUTH_URL |
Your production URL | https://repo-wrapped.vercel.app |
NODE_ENV |
Node environment | production |
- Make sure the callback URL in your GitHub OAuth App exactly matches:
https://your-vercel-url.vercel.app/api/auth/callback/github - No trailing slashes!
- Double-check your
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRETin Vercel environment variables - Make sure you're using the production OAuth app credentials, not local development ones
- Add
NEXTAUTH_URLenvironment variable in Vercel - Make sure it matches your actual Vercel deployment URL
- Redeploy after adding the variable
- Check the build logs in Vercel dashboard
- Make sure all dependencies are in
package.json - Verify Node.js version compatibility (this app uses Node 18+)
Once set up, Vercel will automatically deploy:
- Production: Every push to
mainbranch - Preview: Every pull request
You can configure this in Vercel project settings → Git.
To use a custom domain:
- Go to Vercel project settings → Domains
- Add your custom domain
- Update DNS records as instructed by Vercel
- Update
NEXTAUTH_URLto your custom domain - Update GitHub OAuth App callback URL to your custom domain
- Redeploy
For issues with:
- Vercel deployment: https://vercel.com/docs
- GitHub OAuth: https://docs.github.com/en/apps/oauth-apps
- NextAuth: https://next-auth.js.org/getting-started/introduction