OptimAI
Next.js

Deployment

Deploy your Next.js project to Vercel or another Next.js-compatible host.

This guide explains how to deploy your Next.js project after you finish local customization.

Before deploying

Run these checks first:

  1. install dependencies successfully
  2. confirm bun run build, npm run build, yarn build, or pnpm build completes without errors
  3. review metadata and canonical URL values in utils/generateMetaData.ts
  4. verify any custom integrations or form handlers you added are production-ready

Build locally

Terminal
bun run build
# or
npm run build
# or
yarn build
# or
pnpm build

Then start the production server locally:

Terminal
bun run start
# or
npm run start
# or
yarn start
# or
pnpm start

This helps catch production-only issues before deployment.

Deploy to Vercel

Import the repository

  1. Sign in at vercel.com
  2. Click New Project
  3. Import your repository
  4. Set the project root to your Next.js project folder if your repo contains multiple templates

Configure build settings

For this template, use:

  • Framework preset: Next.js
  • Install command: bun install, npm install, yarn install, or pnpm install
  • Build command: bun run build, npm run build, yarn build, or pnpm build

Deploy

Click Deploy and wait for the build to finish.

Verify the production site

Check:

  1. homepage and major marketing routes
  2. blog list and at least one /blog/[slug] page
  3. use-case list and at least one /use-case/[slug] page
  4. images, icons, and fonts
  5. SEO metadata and social preview image ::::

Other hosting options

The template can also be deployed to any Node-compatible host that supports Next.js, such as:

  • Netlify
  • Railway
  • DigitalOcean App Platform
  • AWS Amplify

Make sure the host supports the same Node version range required by the project.

Environment variables

The current template does not depend on mandatory environment variables out of the box. If you add third-party auth, CMS, analytics, email, or API integrations, define their environment variables in your hosting dashboard before deploying.

Common issues

  • Build fails on the server: confirm the selected Node version is 20+
  • Wrong app deployed: make sure the deployment root points to your Next.js project folder
  • Dynamic content missing: verify your Markdown files remain in data/blog/ and data/use-cases/
  • Forms do nothing: the default login, signup, and contact forms are template-only until you connect them to real services
Copyright © 2026