diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..f5d520b --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,116 @@ +# DebateAI Backend Environment Configuration +# Copy this file to .env and fill in your actual values + +# ============================================================================= +# SERVER CONFIGURATION +# ============================================================================= +# Port number for the backend server +SERVER_PORT=1313 + +# Application environment (development, staging, production) +APP_ENV=development + +# Configuration file path (optional, defaults to ./config/config.prod.yml) +CONFIG_PATH=./config/config.prod.yml + +# ============================================================================= +# DATABASE CONFIGURATION +# ============================================================================= +# MongoDB connection string +# For MongoDB Atlas: mongodb+srv://:@/ +# For local MongoDB: mongodb://localhost:27017/debateai +DATABASE_URI=mongodb://localhost:27017/debateai + +# ============================================================================= +# AI SERVICE CONFIGURATION +# ============================================================================= +# Google Gemini API Key +# Get from: https://ai.google.dev/gemini-api/docs/api-key +GEMINI_API_KEY=your_gemini_api_key_here + +# OpenAI API Key (if using OpenAI models) +# Get from: https://platform.openai.com/api-keys +OPENAI_API_KEY=your_openai_api_key_here + +# ============================================================================= +# JWT CONFIGURATION +# ============================================================================= +# Secret key for JWT token signing (generate with: openssl rand -hex 32) +JWT_SECRET=your_jwt_secret_key_here + +# JWT token expiry time in minutes (1440 = 24 hours) +JWT_EXPIRY=1440 + +# ============================================================================= +# EMAIL CONFIGURATION (SMTP) +# ============================================================================= +# SMTP server configuration for sending emails +SMTP_HOST=smtp.gmail.com +SMTP_PORT=587 + +# Email credentials +SMTP_USERNAME=your_email@gmail.com +SMTP_PASSWORD=your_app_password_here + +# Sender information +SENDER_EMAIL=your_email@gmail.com +SENDER_NAME="DebateAI Team" + +# ============================================================================= +# GOOGLE OAUTH CONFIGURATION +# ============================================================================= +# Google OAuth Client ID for social login +# Get from: Google Cloud Console > APIs & Services > Credentials +GOOGLE_OAUTH_CLIENT_ID=your_google_oauth_client_id_here + +# ============================================================================= +# AWS COGNITO CONFIGURATION (if using AWS Cognito) +# ============================================================================= +# AWS Cognito configuration +COGNITO_APP_CLIENT_ID=your_cognito_app_client_id +COGNITO_APP_CLIENT_SECRET=your_cognito_app_client_secret +COGNITO_USER_POOL_ID=your_cognito_user_pool_id +COGNITO_REGION=us-east-1 + +# ============================================================================= +# REDIS CONFIGURATION (Optional - for real-time features) +# ============================================================================= +# Redis connection URL (optional, for real-time debate features) +# For local Redis: redis://localhost:6379 +# For Redis Cloud: redis://username:password@host:port +REDIS_URL=redis://localhost:6379 + +# Redis password (if required) +REDIS_PASSWORD= + +# Redis database number (default: 0) +REDIS_DB=0 + +# ============================================================================= +# DEVELOPMENT/TESTING +# ============================================================================= +# Set to true to enable debug endpoints and test features +DEBUG_MODE=true + +# ============================================================================= +# INSTRUCTIONS +# ============================================================================= +# 1. Copy this file to .env: cp .env.example .env +# 2. Fill in your actual values for each variable +# 3. Never commit the .env file to version control +# 4. Make sure to add .env to your .gitignore file +# +# Required for basic functionality: +# - DATABASE_URI +# - GEMINI_API_KEY (for AI features) +# - JWT_SECRET +# - SMTP credentials (for email features) +# +# Optional but recommended: +# - REDIS_URL (for real-time debate features) +# - GOOGLE_OAUTH_CLIENT_ID (for social login) +# +# For production deployment: +# - Set APP_ENV=production +# - Use strong, unique values for all secrets +# - Use environment-specific database and Redis instances