Quick Deploy
Deploy to Vercel with one click:Replace the repository URL with your actual GitHub repository.
Manual Deployment
Prerequisites
Vercel Account
Create a free account at vercel.com.
Deploy to Production
- Builds the Next.js application
- Uploads to Vercel’s edge network
- Assigns a production URL
- Runs post-deployment checks
Environment Configuration
Required Environment Variables
Set these in Vercel dashboard (Settings → Environment Variables):- Production
- Staging
Optional Environment Variables
Configure feature flags and integrations:Environment Scope
Set variables for specific environments:- Production - Production deployments only
- Preview - Pull request previews
- Development - Local development (
.env.local)
Vercel automatically populates
VERCEL_URL with the deployment URL. Use this for dynamic redirects.Vercel KV Setup
TechCal uses Vercel KV for rate limiting and caching:Create KV Database
In Vercel dashboard:
- Navigate to Storage → Create Database
- Select KV (Redis)
- Name it (e.g.,
techcal-kv) - Select region (same as your deployment)
Cron Jobs
TechCal uses Vercel Cron for scheduled tasks. Configuration invercel.json:
vercel.json
Cron Schedule
- Ingestion - Runs daily at 2:00 AM UTC
- Enrichment - Runs daily at 3:00 AM UTC
Cron Authentication
Cron endpoints require theCRON_SECRET header:
src/app/api/cron/ingestion/route.ts
Manual Cron Trigger
Test cron jobs manually:Manual triggers require admin authentication. See the ingestion documentation for details.
Feature Flags
Toggle features without redeploying:Scoring Strategy
Reranking Strategy
Client-Side Flags
Build Configuration
Next.js Build
Vercel automatically detects Next.js and uses:- Framework: Next.js
- Build Command:
npm run build - Output Directory:
.next - Install Command:
npm install - Node Version: Detected from
package.jsonengines (20.9+)
Build Environment Variables
Some variables are needed at build time:Build Optimizations
TechCal includes optimizations:- Bundle analyzer - Run
npm run build:analyzelocally - Image optimization - Automatic via Next.js Image component
- Font optimization - Automatic font subsetting
- Code splitting - Route-based and lazy loading
Post-Deployment Verification
Automated Verification
Run the verification suite after deployment:- Production config - Environment variables and API endpoints
- Budget filtering - Event filtering logic
- Analytics - Telemetry integration
Always run
verify:all before merging to main. This catches configuration drift and algorithm regressions.Manual Verification Checklist
Core Flows
Test critical user journeys:
- ✅ Sign up / Sign in
- ✅ Complete onboarding
- ✅ View discovery feed
- ✅ Navigate to calendar
- ✅ View dashboard analytics
API Endpoints
Verify key endpoints:
- ✅
/api/events/filtered - ✅
/api/events/recommendations - ✅
/api/dashboard/analytics
Cron Jobs
Check Vercel dashboard:
- ✅ Cron jobs are scheduled
- ✅ View recent execution logs
- ✅ No errors in cron output
Monitoring
Verify Sentry integration:
- ✅ Errors appear in Sentry dashboard
- ✅ Breadcrumbs are captured
- ✅ Source maps are uploaded
E2E Tests Against Production
Run E2E tests against staging/production:playwright.staging.config.ts:
Rollback Strategy
If deployment fails:Instant Rollback
Vercel keeps previous deployments. Rollback instantly:- Go to Vercel dashboard → Deployments
- Find the last working deployment
- Click “Promote to Production”
Revert Git Commit
Revert code and redeploy:CI/CD Integration
GitHub Integration
Vercel automatically deploys:- Production - Commits to
mainbranch - Preview - Pull requests
Preview Deployments
Every PR gets a unique preview URL:- Design review
- QA testing
- Stakeholder demos
Deployment Protection
Enable protection rules in Vercel:- Production branch -
mainonly - Build checks - Tests must pass
- Preview comments - Auto-comment on PRs
Performance Monitoring
Vercel Analytics
Enable in Vercel dashboard:- Go to Analytics tab
- Enable Real Experience Score
- View Core Web Vitals, page performance, and user metrics
Sentry Performance
TechCal sends performance data to Sentry:sentry.server.config.ts
- API response times
- Page load performance
- Database query duration
Troubleshooting
Build Failures
Check Vercel build logs:- Navigate to Deployments → Failed deployment
- View build logs
- Common issues:
- Missing environment variables
- TypeScript errors
- Dependency conflicts
Runtime Errors
Check Vercel function logs:- Navigate to Deployments → Active deployment
- Click “Functions” tab
- View real-time logs
Environment Variable Issues
Verify variables are set:Next Steps
Monitoring
Set up comprehensive monitoring and telemetry
Environment Variables
Complete environment variable reference