Click the button below to deploy to Vercel with one click:
Before deploying, make sure you have:
- MongoDB database URL (get free tier at MongoDB Atlas)
- Google Gemini API key (get from Google AI Studio)
- NextAuth secret (generate:
openssl rand -base64 32)
- Click the "Deploy with Vercel" button above
- Sign in to Vercel with GitHub
- Add required environment variables:
DATABASE_URL=mongodb+srv://... GOOGLE_GENERATIVE_AI_API_KEY=AIza... NEXTAUTH_SECRET=your_secret_here NEXTAUTH_URL=https://your-app.vercel.app (will be provided after initial deploy) - Click "Deploy"
- Wait ~2 minutes for build
- Update
NEXTAUTH_URLwith your deployment URL - ✅ Done! Your app is live
- Go to Netlify
- Click "Add new site" → "Import an existing project"
- Connect your GitHub repository
- Build settings:
- Build command:
npm run build - Publish directory:
.next
- Build command:
- Add environment variables (same as Vercel)
- Deploy!
# Build
docker build -t promptr .
# Run
docker run -p 3000:3000 \
-e DATABASE_URL="your_mongodb_url" \
-e GOOGLE_GENERATIVE_AI_API_KEY="your_api_key" \
-e NEXTAUTH_SECRET="your_secret" \
promptr| Variable | Where to Get | Required |
|---|---|---|
DATABASE_URL |
MongoDB Atlas | ✅ Yes |
GOOGLE_GENERATIVE_AI_API_KEY |
Google AI Studio | ✅ Yes |
NEXTAUTH_SECRET |
Generate: openssl rand -base64 32 |
✅ Yes |
NEXTAUTH_URL |
Your deployed app URL | ✅ Yes (production) |
After deploying:
- ✅ Test authentication at
/sign-in - ✅ Test AI chat at
/dashboard - ✅ Verify all pages load correctly
- ✅ Check mobile responsiveness
- ✅ Set up custom domain (optional)
Build fails?
- Check all environment variables are set correctly
- Try adding
SKIP_ENV_VALIDATION=trueto build environment
Database connection fails?
- Verify MongoDB connection string is correct
- Check IP whitelist in MongoDB Atlas (allow all:
0.0.0.0/0)
NextAuth errors?
- Ensure
NEXTAUTH_URLmatches your deployed URL exactly - Regenerate
NEXTAUTH_SECRETif needed
This repository includes a GitHub Actions workflow for automated deployment to Vercel.
-
Add these secrets to your GitHub repository (Settings → Secrets and variables → Actions):
VERCEL_TOKEN- Get from Vercel account settingsVERCEL_ORG_ID- Runvercel linkin your local repo to get thisVERCEL_PROJECT_ID- Also fromvercel linkcommand
-
Push to
mainbranch to trigger automatic deployment
The workflow is configured in .github/workflows/deploy.yml
Happy Deploying! 🎉