Skip to main content

Pre-Deployment Checklist

Ensure your application is ready for production deployment:

Environment Configuration

  • API key is properly configured
  • Namespace is set up and documents are uploaded
  • Appearance configuration is finalized
  • Environment variables are set for production

Build & Testing

  • Application builds successfully
  • All tests pass
  • Chat functionality works correctly
  • Responsive design works on all devices

Security & Performance

  • API keys are not exposed in client-side code
  • Environment variables are properly configured
  • Images and assets are optimized
  • Bundle size is reasonable
Deploy to Vercel with one click for the best Next.js experience.

One-Click Deploy

Deploy with Vercel

Click here to deploy directly to Vercel

Manual Deployment

If you prefer manual deployment:
1

Push to Repository

Push your code to GitHub, GitLab, or Bitbucket
2

Connect to Vercel

Connect your repository to Vercel
3

Configure Environment Variables

Set environment variables in Vercel dashboard
4

Deploy

Deploy automatically on every push

Environment Variables

Set these in your Vercel project settings:

Netlify Deployment

Alternative deployment option with Netlify.

Build Configuration

Create a netlify.toml file in your project root:

Deployment Steps

1

Push to Repository

Push your code to a Git repository
2

Connect to Netlify

Connect your repository to Netlify
3

Set Build Command

Set build command: npm run build
4

Set Publish Directory

Set publish directory: .next
5

Configure Environment Variables

Set environment variables in Netlify dashboard
6

Deploy

Deploy your application

Environment Variables

Set in Netlify dashboard under Site settings → Environment variables:

Environment Configuration

Configure your application for different environments.

Environment Files

Create environment-specific configuration files:

Next.js Configuration

Update your next.config.js:

Post-Deployment

Steps to take after successful deployment:

1. Verify Deployment

  • Check that your application loads correctly
  • Verify chat functionality works
  • Test responsive design on different devices
  • Confirm environment variables are loaded

2. Performance Monitoring

  • Monitor Core Web Vitals
  • Check bundle size and loading times
  • Monitor API response times
  • Set up error tracking (e.g., Sentry)

3. Security & Maintenance

  • Regularly update dependencies
  • Monitor for security vulnerabilities
  • Backup configuration files
  • Set up automated deployments

Troubleshooting

Common deployment issues and solutions:

Build Failures

Common Issues:
  • Missing environment variables
  • TypeScript compilation errors
  • Missing dependencies
  • Node.js version incompatibility

Runtime Errors

Common Issues:
  • API key not accessible
  • CORS issues
  • Missing API configuration
  • Environment variable loading issues

Debugging Steps

1

Check Build Logs

Review build logs for errors
2

Verify Environment Variables

Ensure all required variables are set
3

Test API Connectivity

Verify API endpoints are accessible
4

Check Browser Console

Look for client-side errors
5

Verify Configuration Files

Ensure all config files are present

Continuous Deployment

Set up automated deployments for seamless updates.

GitHub Actions

Create .github/workflows/deploy.yml:

Required Secrets

Set these secrets in your GitHub repository:
  • NEXT_PUBLIC_MOORCHEH_API_KEY - Your production API key
  • VERCEL_TOKEN - Vercel deployment token
  • VERCEL_ORG_ID - Vercel organization ID
  • VERCEL_PROJECT_ID - Vercel project ID

Performance Optimization

Bundle Optimization

  • Use dynamic imports for large components
  • Optimize images with Next.js Image component
  • Enable compression and minification
  • Remove unused dependencies

Caching Strategy

  • Implement proper caching headers
  • Use CDN for static assets
  • Cache API responses when appropriate
  • Optimize database queries

Monitoring

  • Set up performance monitoring
  • Track Core Web Vitals
  • Monitor API response times
  • Set up error tracking

Security Best Practices

Environment Variables

  • Never commit API keys to version control
  • Use environment-specific configurations
  • Rotate keys regularly
  • Use secure key management

API Security

  • Implement rate limiting
  • Use HTTPS for all communications
  • Validate all inputs
  • Implement proper error handling

Application Security

  • Keep dependencies updated
  • Use security headers
  • Implement proper authentication
  • Regular security audits

Support

Need help with deployment?

Get Support

Contact our support team for deployment assistance