LogoNEXTDEVKIT Docs

Overview

Configure environment variables for different deployment platforms

NEXTDEVKIT requires several environment variables to function properly across different deployment platforms. This guide explains how to set them up for each supported platform.

🚀 Quick Start

Create a .env file in the root directory of your project, and never commit it to version control.

You can copy the example file as a starting point, then modify as needed:

cp .env.example .env
cp .env.example .env.production

Use the .env file for local development environment variables, and the .env.production file for production environment variables. You can copy these environment variables to cloud platforms like Vercel.

📋 Platform-Specific Configuration

NEXTDEVKIT supports multiple deployment platforms, each with its own environment configuration requirements:

Next.js Deployment

Perfect for Vercel, traditional hosting, Docker deployments, or development environments.

Cloudflare Workers

Ideal for edge computing with global distribution and cost-effective scaling.

SST AWS

Enterprise-grade infrastructure with AWS services and compliance requirements.

🔒 Security Best Practices

  • Never commit environment variables to version control
  • Use different values for development, staging, and production environments
  • Rotate secrets regularly, especially API keys and database credentials
  • Use environment-specific configurations for different deployment stages

📚 Common Environment Variables

Most environment variables are shared across platforms, with some platform-specific additions:

  • Authentication: Better Auth configuration and OAuth providers
  • Database: Connection strings and credentials
  • Payment: Stripe integration for billing
  • Email: Email service provider configuration
  • Storage: File upload and storage configuration

Select your target deployment platform above to get detailed configuration instructions.