# Application
NODE_ENV=development
PORT=3000
LOG_LEVEL=debug
JSON_BODY_LIMIT=24mb

# Required signing secrets. Generate unique random values before startup.
JWT_SECRET=
JWT_EXPIRES_IN=7d
ADMIN_TOKEN_SECRET=
ADMIN_TOKEN_TTL_SECONDS=28800

# Administrator bootstrap is disabled by default.
ADMIN_BOOTSTRAP_ENABLED=false
ADMIN_USERNAME=
ADMIN_PASSWORD=
ADMIN_NICKNAME=

# Local storage mode
USE_MEMORY_STORAGE=true
USE_FILE_REDIS=true
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# MySQL (optional in local memory mode)
DB_HOST=
DB_PORT=3306
DB_USERNAME=
DB_PASSWORD=
DB_NAME=

# Email (required for verification and password reset)
EMAIL_HOST=
EMAIL_PORT=465
EMAIL_SECURE=true
EMAIL_USER=
EMAIL_PASS=
EMAIL_FROM=
MAIL_PROVIDER=
NOVAMAILIO_MAIL_API_BASE=
NOVAMAILIO_MAIL_CREDENTIAL=
NOVAMAILIO_MAIL_FROM_NAME=
NOVAMAILIO_MAIL_ORIGIN=
NOVAMAILIO_MAIL_REFERER=
NOVAMAILIO_MAIL_USER_AGENT=

# Zulip integration
ZULIP_CONFIG_MODE=dynamic
ZULIP_SERVER_URL=
ZULIP_BOT_EMAIL=
ZULIP_BOT_API_KEY=
ZULIP_API_KEY_ENCRYPTION_KEY=
ZULIP_DEGRADED_MODE_ENABLED=true
ZULIP_AUTO_RECONNECT_ENABLED=true
ZULIP_MAX_RECONNECT_ATTEMPTS=5
ZULIP_RECONNECT_BASE_DELAY=5000
ZULIP_API_TIMEOUT=30000
ZULIP_MAX_RETRIES=3
ZULIP_MAX_CONNECTIONS=100
ZULIP_SESSION_TIMEOUT=30
ZULIP_CLEANUP_INTERVAL=5
ZULIP_MESSAGE_RATE_LIMIT=10
ZULIP_MESSAGE_MAX_LENGTH=10000
ZULIP_CONTENT_FILTER_ENABLED=true

# Realtime server
# The native WebSocket server listens separately from the REST API.
WEBSOCKET_PORT=3001
WEBSOCKET_NAMESPACE=/game
WEBSOCKET_PING_INTERVAL=25000
WEBSOCKET_PING_TIMEOUT=5000

# Generated account assets and optional skin generation
ACCOUNT_ASSET_DIR=generated/account-assets
SKIN_GENERATION_OUTPUT_DIR=generated/skins
SKIN_GENERATION_SCRIPT_PATH=scripts/skin_generation/generate_skin_from_prompt.py
SKIN_GENERATION_PYTHON=python3
NOVAMAILIO_API_KEY=

# Optional cafe companion defaults
CAFE_COMPANION_DEFAULT_OPENAI_BASE_URL=
CAFE_COMPANION_DEFAULT_OPENAI_API_KEY=
CAFE_COMPANION_DEFAULT_OPENAI_MODEL=

# Monitoring and maintenance
MONITORING_HEALTH_CHECK_INTERVAL=60000
MONITORING_ERROR_RATE_THRESHOLD=0.1
MONITORING_RESPONSE_TIME_THRESHOLD=5000
MONITORING_MEMORY_THRESHOLD=0.9
MAINTENANCE_MODE=false
MAINTENANCE_REASON=
MAINTENANCE_RETRY_AFTER=300
