# RevampIT Unified Environment Configuration # Copy this file to .env and fill in your values # ========================================== # MAIN APPLICATION (Next.js Frontend) # ========================================== # NextAuth.js Configuration NEXTAUTH_URL=http://localhost:3000 # Generate a secure secret: openssl rand -base64 64 NEXTAUTH_SECRET=your-super-secret-nextauth-key-change-in-production-min-32-chars # Database for NextAuth (same as CMS API) AUTH_DB_HOST=localhost AUTH_DB_PORT=5433 AUTH_DB_NAME=revampit_cms AUTH_DB_USER=postgres AUTH_DB_PASSWORD=postgres # Medusa Configuration MEDUSA_DB_HOST=localhost MEDUSA_DB_PORT=5435 MEDUSA_DB_NAME=medusa_db MEDUSA_DB_USER=medusa MEDUSA_DB_PASSWORD=medusa_password MEDUSA_REDIS_URL=redis://localhost:6380 # Optional Redis for Auth rate limiter/lockout REDIS_URL=redis://localhost:6380 ENABLE_REDIS_RATE_LIMITER=true # Generate a secure secret: openssl rand -base64 32 MEILI_MASTER_KEY=masterKey_change_in_production MEILI_PORT=7700 # ========================================== # CMS API (Express Backend) # ========================================== # Server Configuration PORT=3001 NODE_ENV=development # Database Configuration DB_HOST=localhost DB_PORT=5433 DB_NAME=revampit_cms DB_USER=postgres DB_PASSWORD=postgres # JWT Configuration # Generate a secure secret: openssl rand -base64 64 JWT_SECRET=your-super-secret-jwt-key-change-in-production-min-32-chars JWT_EXPIRES_IN=24h # CORS Configuration FRONTEND_URL=http://localhost:3000 # Feature flags ENABLE_CMS=false NEXT_PUBLIC_ENABLE_ROLE_SELECTION_ON_REGISTER=false # Admin Setup (Optional - for setup scripts) # If not set, secure random passwords will be generated # ADMIN_PASSWORD=your-secure-admin-password-here # MEDUSA_ADMIN_PASSWORD=your-secure-medusa-admin-password-here # ADMIN_PASSWORD_FILE=/path/to/secure/password/file (optional - for saving generated passwords) # Email Configuration (Production) SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=your-email@gmail.com SMTP_PASS=your-app-password SMTP_FROM=noreply@revamp-it.ch # Email Configuration (Development - uses Ethereal) ETHEREAL_USER=test@example.com ETHEREAL_PASS=test # File Upload Configuration UPLOAD_DIR=./uploads MAX_FILE_SIZE=10485760 # ========================================== # SECURITY NOTES # ========================================== # # 1. NEVER commit .env files to version control # 2. Use strong, unique passwords for all services # 3. Generate JWT secrets using: openssl rand -base64 32 # 4. Use different databases for different environments # 5. Configure proper firewall rules in production # 6. Use HTTPS in production (required for secure cookies) # 7. Set NODE_ENV=production in production # 8. Use environment-specific database names # # ==========================================