Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -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://<username>:<password>@<cluster-url>/<database-name>
# 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
[email protected]
SMTP_PASSWORD=your_app_password_here

# Sender information
[email protected]
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