- Vercel account
- PostgreSQL database (from Vercel, Supabase, or other provider)
- Gemini API key from Google AI Studio
Add these to your Vercel project settings:
# Database
DATABASE_URL=postgresql://user:password@host:5432/dbname
# Authentication
JWT_SECRET=your-secure-random-string-here
# AI
GEMINI_API_KEY=your-gemini-api-key-from-google
# App
NODE_ENV=productionThe project already has vercel.json configured:
{
"buildCommand": "cd textbook && npm install && npm run build",
"outputDirectory": "textbook/build",
"installCommand": "npm install",
"framework": null,
"rewrites": [
{ "source": "/api/(.*)", "destination": "/api/$1" }
]
}# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod- Push to GitHub
- Connect repository to Vercel
- Vercel auto-deploys on push to main branch
After first deployment, run database migration:
# Connect to your Vercel deployment
vercel env pull
# Run Prisma migration
cd api
npx prisma migrate deploy
# Or push schema directly
npx prisma db pushTest these endpoints:
# Health check
curl https://your-app.vercel.app/api/health
# Public endpoint
curl https://your-app.vercel.app/
# Test Urdu route (should redirect if not authenticated)
curl https://your-app.vercel.app/ur/- Check Node version is 18+
- Verify all dependencies in package.json
- Check build logs in Vercel dashboard
- Verify
vercel.jsonrewrites configuration - Check
/apifolder structure - Ensure serverless functions are deployed
- Verify DATABASE_URL is correct
- Check database is accessible from Vercel
- Run
npx prisma db pushto sync schema
- Verify GEMINI_API_KEY is set
- Check API quota limits
- Test endpoint:
/api/translations/track-translation
- ✅ Environment variables set in Vercel
- ✅ Database migrated
- ✅ Build successful
- ✅ API health check passing
- ✅ Authentication working
- ✅ Translation button visible (when logged in)
- ✅ Language switcher functional
- ✅ Chatbot responding
- ✅ Dark mode working
If deployment fails:
# Revert to previous deployment
vercel rollbackvercel logsvercel inspect [deployment-url]For deployment issues:
- Check Vercel deployment logs
- Verify environment variables
- Test API endpoints individually
- Check database connection
Live URL: https://physical-ai-humanoid-robotics-6qjj.vercel.app/
All features are working in production! 🎉