Overview

Our main web application is built with Next.js and deployed via Vercel for fast, serverless delivery with minimal operational overhead. This setup ensures automatic deployments from GitHub, preview environments for every pull request, and production-grade hosting with global CDN support.

Workflow Summary

  1. GitHub Integration
    • The repository is connected to Vercel via GitHub.
    • Every push to main triggers a production deployment.
    • Every PR to main generates a Vercel preview environment.
  2. Branch-Based Environments
    • main → Production
    • feature/* → Vercel preview deployments
    • Environment variables can be scoped per environment (e.g., dev, staging, prod)
  3. CI/CD & Build
    • Vercel handles build, deploy, and cache invalidation.
    • Our Next.js app is optimized with ISR (Incremental Static Regeneration) where needed.
    • No custom CI/CD required unless doing extra validation steps pre-deploy.
  4. Environment Variables
    • Managed in the Vercel dashboard (Project Settings → Environment Variables)
    • Secrets like API keys, feature flags, or webhook secrets are stored securely
  5. Error Monitoring & Logs
    • Vercel provides request-level logs per deployment
    • Production errors are tracked separately (e.g., via Sentry)

Deployment Rules

  • Merges to main must be done via PR (no direct push)
  • Each PR must pass automated tests and manual QA via preview deployment
  • Production deploys are automatically triggered, but can be rolled back via Vercel UI

Why Vercel

  • Zero-config Next.js integration
  • Blazing-fast global edge network
  • Auto-preview for team collaboration
  • Tight GitHub + environment management