Skip to content

Deploying to Vercel

Deploy your NexusOrbit SaaS app on Vercel for managed hosting, automatic scaling, and first-class Next.js integration. Vercel maintains Next.js, so builds and edge behavior align closely with what you run locally.

This guide covers linking your repository, environment variables, first deploy, custom domains, and continuous deployment.

1. Prepare your project

  • Commit your work to Git (GitHub, GitLab, or Bitbucket).
  • Ensure .env.example (or your internal checklist) lists every variable the app needs so nothing is missed on Vercel.
  • Do not commit secrets. Real values belong only in Vercel’s dashboard (or your CI secrets), not in the repo.

2. Connect to Vercel

Sign in

  1. Go to vercel.com and sign in, or create an account.

Import the project

  1. In the dashboard, choose Add New…Project.
  2. Install or select your Git provider and pick the NexusOrbit (or your fork) repository.

Framework detection

Vercel usually auto-detects Next.js and sets:

  • Build command (e.g. next build / framework default)
  • Output appropriate for App Router

You rarely need to change defaults unless you use a custom monorepo root or build script.

3. Configure environment variables

During import (or later under Project → Settings → Environment Variables):

  1. Add each variable from your local .env, for example:
    • DATABASE_URL
    • AUTH_URL, AUTH_SECRET
    • OAuth keys (e.g. AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET)
    • Email (AUTH_RESEND_KEY or equivalent)
    • Stripe (STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, …)
    • Storage (S3 or Cloudinary), and any other keys your config.ts expects
  2. Assign each key to the right scope: Production, Preview, and/or Development as needed (preview deploys often need the same keys as production, sometimes with test credentials).

TIP

You can add or edit variables anytime under Project → Settings → Environment Variables. Redeploy after changing secrets so new builds pick them up.

WARNING

Never commit API keys or database URLs to Git. Use Vercel’s UI (or your team’s secret manager) for production values.

4. Deploy

  1. Click Deploy to run the first production build.
  2. When the build finishes, Vercel assigns a URL such as https://your-app.vercel.app.
  3. Pushes to your connected branch (commonly main) trigger new deployments automatically.

Monitor builds and logs from the project’s Deployments tab.

5. Custom domain

  1. Open Project → Settings → Domains.
  2. Enter your domain (e.g. your-saas.com) and follow the prompts.
  3. DNS: either:
    • Point nameservers to Vercel (simplest), or
    • Keep your registrar and add the A / CNAME records Vercel shows.

After DNS propagates, Vercel verifies the domain and provisions HTTPS (Let’s Encrypt) automatically.

Ensure appConfig.domainUrl (or your canonical app URL in config) matches the live domain so auth callbacks, Stripe redirects, and emails use the correct origin.

6. Continuous deployment

Every push to the linked Git branch triggers a new build and deployment. You can:

  • Inspect build logs and runtime logs
  • Rollback to a previous deployment from the dashboard

For platform details and advanced options, see the Vercel documentation.

Built with Nexus Orbit