# Chatty Application Environment Configuration # Copy this file to .env and fill in your actual values # ============================================================================= # REQUIRED CONFIGURATION # ============================================================================= # Flask Secret Key - MUST be changed in production # Generate with: python -c "import secrets; print(secrets.token_hex(32))" SECRET_KEY=your-secret-key-here-change-in-production # MongoDB Connection # For MongoDB Atlas, use the connection string from your cluster MONGODB_URL=mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority&appName=YourApp MONGODB_DATABASE=Atlas # ============================================================================= # ENVIRONMENT CONFIGURATION # ============================================================================= # Application Environment (development, production, testing) FLASK_ENV=development # ============================================================================= # SECURITY CONFIGURATION # ============================================================================= # Session Configuration SESSION_LIFETIME_HOURS=24 SESSION_COOKIE_SECURE=false # Set to true in production with HTTPS CSRF_TIME_LIMIT=3600 WTF_CSRF_SSL_STRICT=false # Set to true in production with HTTPS # Rate Limiting MAX_LOGIN_ATTEMPTS=5 # Maximum failed login attempts before rate limiting RATE_LIMIT_WINDOW=900 # Rate limit window in seconds (15 minutes) # ============================================================================= # API CONFIGURATION # ============================================================================= # External API Settings API_URL=https://findEthics-Atlas.hf.space/chat API_TIMEOUT=30 # ============================================================================= # LOGGING CONFIGURATION # ============================================================================= # Logging Level (DEBUG, INFO, WARNING, ERROR, CRITICAL) LOG_LEVEL=INFO # Log File (optional - if not set, logs to console) # LOG_FILE=/var/log/chatty/app.log # ============================================================================= # PRODUCTION-SPECIFIC CONFIGURATION # ============================================================================= # Port for deployment (Hugging Face Spaces uses 7860) PORT=7860 # SSL/TLS Configuration (for MongoDB compatibility) OPENSSL_CONF=/dev/null # ============================================================================= # TESTING CONFIGURATION # ============================================================================= # Test Database (used when FLASK_ENV=testing) TEST_MONGODB_DATABASE=Atlas_test