Files
gh-hopeoverture-worldbuildi…/skills/env-config-validator/assets/.env.example
2025-11-29 18:46:15 +08:00

158 lines
4.9 KiB
Plaintext

# Environment Configuration Template
# Copy this file to .env.local for development
# DO NOT commit .env.local or .env.production to git
# ============================================
# ENVIRONMENT
# ============================================
NODE_ENV=development
# ============================================
# DATABASE
# ============================================
# PostgreSQL connection string
DATABASE_URL="postgresql://user:password@localhost:5432/worldbuilding_dev"
# Optional: Connection pool settings
# DATABASE_POOL_SIZE=10
# DATABASE_POOL_TIMEOUT=30000
# ============================================
# AUTHENTICATION
# ============================================
# JWT secret (generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
JWT_SECRET="your-jwt-secret-here-32-chars-minimum"
# NextAuth.js (if using)
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret-here-32-chars-minimum"
# OAuth providers (if using)
# GOOGLE_CLIENT_ID=""
# GOOGLE_CLIENT_SECRET=""
# GITHUB_CLIENT_ID=""
# GITHUB_CLIENT_SECRET=""
# ============================================
# APPLICATION URLs
# ============================================
# Public-facing application URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# API base URL (if different from app URL)
NEXT_PUBLIC_API_URL="http://localhost:3000"
# Application name
NEXT_PUBLIC_APP_NAME="Worldbuilding App"
# ============================================
# EXTERNAL APIs (Optional)
# ============================================
# OpenAI (for AI features)
# OPENAI_API_KEY="sk-..."
# OPENAI_ORG_ID="org-..."
# Anthropic Claude (alternative to OpenAI)
# ANTHROPIC_API_KEY="sk-ant-..."
# Google Maps (if using maps features)
# NEXT_PUBLIC_GOOGLE_MAPS_KEY="..." # Only if client-side
# GOOGLE_MAPS_SERVER_KEY="..." # For server-side geocoding
# Cloudinary (if using image hosting)
# CLOUDINARY_URL="cloudinary://..."
# NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="..."
# ============================================
# EMAIL (Optional)
# ============================================
# SMTP Configuration
# SMTP_HOST="smtp.gmail.com"
# SMTP_PORT=587
# SMTP_USER="your-email@gmail.com"
# SMTP_PASSWORD="your-app-specific-password"
# SMTP_FROM="noreply@example.com"
# Email service API (alternative to SMTP)
# SENDGRID_API_KEY="SG...."
# MAILGUN_API_KEY="..."
# ============================================
# PAYMENT (Optional)
# ============================================
# Stripe
# NEXT_PUBLIC_STRIPE_PUBLIC_KEY="pk_test_..." # Client-side
# STRIPE_SECRET_KEY="sk_test_..." # Server-side
# STRIPE_WEBHOOK_SECRET="whsec_..." # Webhook verification
# ============================================
# FILE STORAGE (Optional)
# ============================================
# AWS S3
# AWS_ACCESS_KEY_ID="..."
# AWS_SECRET_ACCESS_KEY="..."
# AWS_REGION="us-east-1"
# AWS_S3_BUCKET="your-bucket-name"
# ============================================
# MONITORING & LOGGING (Optional)
# ============================================
# Sentry (error tracking)
# SENTRY_DSN="https://...@sentry.io/..."
# SENTRY_ENVIRONMENT="development"
# SENTRY_AUTH_TOKEN="..." # For source maps upload
# LogRocket (session replay)
# NEXT_PUBLIC_LOGROCKET_APP_ID="..."
# Custom logging
# LOG_LEVEL="debug" # debug, info, warn, error
# ============================================
# RATE LIMITING (Optional)
# ============================================
# Redis (for rate limiting)
# REDIS_URL="redis://localhost:6379"
# Upstash Redis (managed Redis)
# UPSTASH_REDIS_REST_URL="https://..."
# UPSTASH_REDIS_REST_TOKEN="..."
# ============================================
# SEARCH (Optional)
# ============================================
# Algolia (if using search)
# NEXT_PUBLIC_ALGOLIA_APP_ID="..."
# NEXT_PUBLIC_ALGOLIA_SEARCH_KEY="..." # Search-only public key
# ALGOLIA_ADMIN_KEY="..." # Admin key (server-side only)
# Meilisearch (alternative to Algolia)
# MEILISEARCH_HOST="http://localhost:7700"
# MEILISEARCH_KEY="..."
# ============================================
# FEATURE FLAGS (Optional)
# ============================================
# NEXT_PUBLIC_FEATURE_AI_ASSISTANCE="false"
# NEXT_PUBLIC_FEATURE_COLLABORATIVE_EDITING="false"
# NEXT_PUBLIC_FEATURE_TIMELINE_VISUALIZATION="true"
# ============================================
# DEVELOPMENT TOOLS (Optional)
# ============================================
# Enable debug mode
# DEBUG="true"
# Disable telemetry
# NEXT_TELEMETRY_DISABLED=1
# ============================================
# NOTES
# ============================================
# 1. Copy this file to .env.local for local development
# 2. Generate strong secrets using:
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# 3. Never commit .env.local or .env.production to git
# 4. Use NEXT_PUBLIC_ prefix only for non-sensitive, client-accessible variables
# 5. Keep this template updated as you add new environment variables