Overview
Argument Cartographer is optimized for deployment on Vercel, leveraging Next.js 15’s server-side rendering capabilities and edge functions. This guide walks you through the complete deployment process.Prerequisites
Before deploying, ensure you have:- A GitHub account with your repository pushed
- A Vercel account (free tier works)
- All required API keys (see Environment Variables)
- Firebase project configured (see Firebase Setup)
Deployment Steps
Prepare Your Repository
Ensure your code is pushed to GitHub:
The project uses TypeScript with
ignoreBuildErrors: true in next.config.ts. While this allows flexible development, consider fixing type errors before production deployment.Import Project to Vercel
- Go to vercel.com and sign in
- Click “Add New Project”
- Import your GitHub repository
- Vercel will automatically detect Next.js configuration
Vercel automatically configures:
- Build command:
npm run build(orNODE_ENV=production next build) - Output directory:
.next - Install command:
npm install - Development command:
npm run dev
Configure Environment Variables
In the Vercel project settings, add all required environment variables:AI Configuration:
GOOGLE_GENAI_API_KEY- Your Google Gemini API key
FIRECRAWL_API_KEY- Firecrawl API for web scrapingTWITTER_BEARER_TOKEN- Twitter API v2 bearer token
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_STORAGE_BUCKETNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDNEXT_PUBLIC_FIREBASE_APP_ID
SERVICE_ACCOUNT_PROJECT_IDSERVICE_ACCOUNT_CLIENT_EMAILSERVICE_ACCOUNT_PRIVATE_KEY
Deploy
Click “Deploy” and Vercel will:
- Install dependencies (
npm install) - Run the build process (
next build) - Deploy to edge network
- Provide a production URL
Verify Deployment
After deployment completes:
- Visit your production URL
- Test authentication flow
- Create a test argument analysis
- Verify AI flows are working
- Check Firestore data persistence
If you encounter issues, check the Troubleshooting guide.
Build Configuration
The project uses Next.js 15 with the following configuration:next.config.ts
Automatic Deployments
Vercel automatically deploys:- Production: Every push to
mainbranch - Preview: Every pull request gets a unique preview URL
- Rollbacks: Instant rollback to any previous deployment
Preview deployments are useful for testing changes before merging to production.
Custom Domain Setup
Configure DNS
Add the provided DNS records to your domain registrar:
- A record pointing to
76.76.21.21 - CNAME for
wwwpointing tocname.vercel-dns.com
Performance Optimization
Vercel provides:- Edge Network: Global CDN for static assets
- Automatic Caching: Optimized caching for Next.js pages
- Image Optimization: Automatic image resizing and WebP conversion
- Analytics: Built-in performance monitoring (available in Pro plan)
Monitoring
After deployment, monitor your application:- Vercel Dashboard: View deployment logs and runtime logs
- Firebase Console: Monitor Firestore usage and authentication
- API Usage: Track Firecrawl, Twitter, and Google AI API credits
Next Steps
Environment Variables
Complete reference for all configuration variables
Firebase Setup
Configure Firebase Authentication and Firestore
Common Issues
Troubleshoot deployment problems
API Errors
Debug API integration issues
