Deployment Overview
The VibeCode Platform consists of two main components that can be deployed independently or together.
Platform Components
Section titled “Platform Components”Astro Documentation Site
Section titled “Astro Documentation Site”Static documentation site built with Astro and Starlight theme.
- Build Time: ~4.12 seconds
- Total Pages: 96 pages
- Build Output: Static HTML/CSS/JS (~13 MB)
- Search: Pagefind static search (95 pages indexed)
- Deployment: Any static hosting (Vercel, Netlify, GitHub Pages, CloudFlare Pages)
Quick Deploy:
cd docsnpm installnpm run buildNext.js Application
Section titled “Next.js Application”Full-stack web application with AI integration.
- Framework: Next.js 15 with React 19
- Runtime: Node.js 18.18.0 - 24.x
- Database: PostgreSQL 16 with pgvector extension
- Cache: Valkey/Redis for session and API caching
- AI Providers: OpenAI, Anthropic, Google AI
- Monitoring: Datadog APM and RUM
- Deployment: Vercel, Docker, Kubernetes, Cloud platforms
Quick Deploy:
npm installnpm run buildnpm start# Runs on: http://localhost:3000View Next.js Deployment Guide →
Deployment Scenarios
Section titled “Deployment Scenarios”Scenario 1: Documentation Only
Section titled “Scenario 1: Documentation Only”Deploy just the Astro documentation site for public-facing docs.
Best For: Open source projects, public documentation Platforms: GitHub Pages, Netlify, Vercel, CloudFlare Pages Cost: Free (most platforms)
Scenario 2: Full Platform
Section titled “Scenario 2: Full Platform”Deploy both documentation and application together.
Best For: Complete development platform with docs Platforms: Kubernetes, Docker Compose, Cloud platforms Cost: Variable based on usage
Scenario 3: Hybrid
Section titled “Scenario 3: Hybrid”Deploy docs to static hosting and app to container platform.
Best For: Optimal cost/performance balance Platforms: Docs on GitHub Pages, App on Kubernetes/Cloud Run Cost: Mixed (free docs, paid app hosting)
Prerequisites
Section titled “Prerequisites”For Documentation Deployment
Section titled “For Documentation Deployment”- Node.js 18.18.0+
- npm 9.0.0+
- Git (for GitHub Pages)
For Application Deployment
Section titled “For Application Deployment”- Node.js 18.18.0 - 24.x
- PostgreSQL 16+ with pgvector extension
- Redis/Valkey for caching
- API keys for AI providers (OpenAI, Anthropic, or Google AI)
For Container Deployment
Section titled “For Container Deployment”- Docker 24.0+
- Docker Compose 2.20+ (optional)
- kubectl 1.28+ (for Kubernetes)
- Helm 3.12+ (for Kubernetes)
Deployment Guides
Section titled “Deployment Guides”Platform-Specific Guides
Section titled “Platform-Specific Guides”Astro Docs
Deploy static documentation to hosting providers
- Vercel, Netlify, GitHub Pages
- CDN configuration
- Search optimization
<a href="/deployment/nextjs/" style="text-decoration: none;"> <div style="border: 1px solid var(--sl-color-gray-5); border-radius: 0.5rem; padding: 1.5rem; background: var(--sl-color-bg-nav);"> <h3 style="margin-top: 0; color: var(--sl-color-white);">Next.js App</h3> <p style="color: var(--sl-color-gray-2);">Deploy full-stack application with database</p> <ul style="font-size: 0.9rem; color: var(--sl-color-gray-3);"> <li>Vercel, Docker, Kubernetes</li> <li>Database setup</li> <li>Environment configuration</li> </ul> </div></a>Infrastructure Guides
Section titled “Infrastructure Guides”Additional deployment resources available in the repository:
- Docker Production - Complete Docker Compose setup with NGINX, PostgreSQL, and monitoring
- Kubernetes Production - High-availability Kubernetes deployment with auto-scaling
- Production Checklist - Pre-deployment verification checklist
- Monitoring Setup - Datadog and observability configuration
- Security Hardening - Production security best practices
- Disaster Recovery - Backup and recovery procedures
Environment Variables
Section titled “Environment Variables”Documentation (Optional)
Section titled “Documentation (Optional)”# Datadog RUM monitoring (optional)PUBLIC_DATADOG_CLIENT_TOKEN=your_tokenPUBLIC_DATADOG_APPLICATION_ID=your_app_idApplication (Required)
Section titled “Application (Required)”# ApplicationNODE_ENV=productionNEXTAUTH_URL=https://your-domain.comNEXTAUTH_SECRET=<generate-with-openssl-rand-base64-32>
# DatabaseDATABASE_URL=postgresql://user:pass@host:5432/vibecode
# CacheREDIS_URL=redis://:password@host:6379/0
# AI Provider (at least one required)OPENAI_API_KEY=sk-...ANTHROPIC_API_KEY=sk-ant-...GOOGLE_AI_API_KEY=...
# Monitoring (optional)DD_API_KEY=your_datadog_keyDD_ENV=productionGenerate secure secrets:
# NEXTAUTH_SECRETopenssl rand -base64 32
# Database passwordopenssl rand -base64 24Quick Start Commands
Section titled “Quick Start Commands”Documentation Deployment
Section titled “Documentation Deployment”# Build locallycd docsnpm installnpm run buildnpm run preview
# Deploy to Vercelnpx vercel --prod
# Deploy to Netlifynpx netlify deploy --prod --dir=dist
# Deploy to GitHub Pages (automatic on push to main)git push origin mainApplication Deployment
Section titled “Application Deployment”# Local production buildnpm installnpm run buildnpm start
# Docker deploymentdocker build -t vibecode:latest .docker run -p 3000:3000 --env-file .env.production vibecode:latest
# Kubernetes deploymenthelm install vibecode ./helm/vibecode -f values.production.yamlHealth Checks
Section titled “Health Checks”Documentation
Section titled “Documentation”After deployment, verify:
- Homepage loads in < 1 second
- Search functionality works
- All navigation links work
- Images load correctly
- Mobile layout is responsive
- HTTPS is enabled
Test with:
# Check HTTP statuscurl -I https://your-docs-site.com
# Run Lighthouse auditnpx lighthouse https://your-docs-site.com --viewApplication
Section titled “Application”Health check endpoints:
GET /api/health- Basic health checkGET /api/health/ready- Readiness probe (checks database)GET /api/health/live- Liveness probe
Test with:
# Health checkcurl http://localhost:3000/api/health
# Readiness check (includes database)curl http://localhost:3000/api/health/ready
# Expected response:# {"status":"healthy","database":"connected","uptime":123}Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Documentation Build Fails
Section titled “Documentation Build Fails”# Clear cache and rebuildcd docsrm -rf node_modules dist .astronpm installnpm run build
# Increase memory if neededNODE_OPTIONS="--max-old-space-size=4096" npm run buildApplication Build Succeeds but Fails to Start
Section titled “Application Build Succeeds but Fails to Start”Check:
- Environment variables are set correctly
- Database is accessible
- Required ports are available
- Memory limits are sufficient
# Test database connectionpsql "$DATABASE_URL" -c "SELECT version();"
# Check port availabilitylsof -i :3000
# View logsdocker logs vibecode-app# orkubectl logs -f deployment/vibecode-webguiSearch Not Working
Section titled “Search Not Working”# Ensure Pagefind ran during buildcd docsnpm run build
# Verify search index existsls -la dist/_pagefind/
# If missing, check build logs for errorsGetting Help
Section titled “Getting Help”- Documentation Issues: GitHub Issues
- Deployment Support: See
/deployment/directory for detailed guides - Production Readiness: Review Production Checklist
Performance Benchmarks
Section titled “Performance Benchmarks”Documentation Site
Section titled “Documentation Site”- Build Time: 4.12 seconds
- Page Load Time: < 1 second (first load)
- Page Load Time: < 200ms (cached)
- Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO)
- Search Response: < 100ms
Application
Section titled “Application”- API Response Time: < 200ms (p50)
- API Response Time: < 500ms (p95)
- Database Query Time: < 100ms (p95)
- Cold Start Time: < 30 seconds
- Memory Usage: 2-4 GB (typical)
- CPU Usage: 1-2 cores (typical)
Security Considerations
Section titled “Security Considerations”Production Checklist
Section titled “Production Checklist”- HTTPS enabled with valid certificate
- Security headers configured (CSP, HSTS, etc.)
- Environment variables not committed to git
- Database uses SSL/TLS connections
- API rate limiting enabled
- Secrets rotated regularly
- Dependencies updated and audited
- Monitoring and alerting configured
See Security Hardening Guide for complete checklist.
Monitoring & Observability
Section titled “Monitoring & Observability”Recommended Monitoring
Section titled “Recommended Monitoring”Documentation:
- Uptime monitoring (Pingdom, UptimeRobot)
- Real User Monitoring (Datadog RUM)
- Analytics (Google Analytics, Plausible)
Application:
- APM (Datadog, New Relic)
- Log aggregation (Datadog Logs, CloudWatch)
- Error tracking (Sentry)
- Database monitoring (Datadog DBM)
- Infrastructure monitoring (Datadog Infrastructure)
Key Metrics to Monitor
Section titled “Key Metrics to Monitor”- Application uptime (target: 99.9%)
- API response time (target: p95 < 500ms)
- Error rate (target: < 0.1%)
- Database query performance (target: p95 < 100ms)
- Memory usage (target: < 80%)
- CPU usage (target: < 70%)
Cost Optimization
Section titled “Cost Optimization”Documentation Hosting
Section titled “Documentation Hosting”Free Tiers:
- GitHub Pages: Free for public repos
- Netlify: 100 GB bandwidth/month free
- Vercel: 100 GB bandwidth/month free
- CloudFlare Pages: Unlimited bandwidth free
Application Hosting
Section titled “Application Hosting”Cost-Effective Options:
- Vercel: $20/month (Pro plan)
- DigitalOcean: $24/month (4 GB droplet + managed database)
- AWS: ~$50/month (Fargate + RDS)
- GCP: ~$45/month (Cloud Run + Cloud SQL)
- Self-Hosted: $10-20/month (VPS)
Cost Optimization Tips:
- Use auto-scaling to match demand
- Enable HTTP caching with Redis
- Use CDN for static assets
- Right-size database instance
- Set up billing alerts
Next Steps
Section titled “Next Steps”- Choose your deployment platform
- Review platform-specific deployment guide
- Set up required infrastructure (database, cache)
- Configure environment variables
- Deploy and test
- Set up monitoring and alerts
- Configure automated backups
- Document runbooks for your team
Ready to deploy? Start with the Astro Deployment Guide or Next.js Deployment Guide.