# ========================================
# OpenCCB Environment Configuration
# Producción - AWS EC2
# ========================================

# ----------------------------------------
# Database Configuration (Docker)
# Las URLs usan 'db' como hostname (contenedor PostgreSQL)
# Puerto interno de Docker: 5432
# ----------------------------------------
DB_PASSWORD=CHANGE_ME_GENERATE_SECURE_PASSWORD
CMS_DATABASE_URL=postgresql://user:CHANGE_ME_GENERATE_SECURE_PASSWORD@db:5432/openccb_cms
LMS_DATABASE_URL=postgresql://user:CHANGE_ME_GENERATE_SECURE_PASSWORD@db:5432/openccb_lms
DATABASE_URL=postgresql://user:CHANGE_ME_GENERATE_SECURE_PASSWORD@db:5432/openccb_cms

# ----------------------------------------
# JWT Secret (64 caracteres mínimo)
# ----------------------------------------
JWT_SECRET=CHANGE_ME_GENERATE_SECURE_SECRET

# ----------------------------------------
# Logging
# ----------------------------------------
RUST_LOG=info

# ----------------------------------------
# Environment
# ----------------------------------------
ENVIRONMENT=prod

# ----------------------------------------
# AI Configuration
# ----------------------------------------
AI_PROVIDER=local
OPENAI_API_KEY=

# Local AI (Ollama & Whisper)
LOCAL_WHISPER_URL=http://t-800.norteamericano.cl:9000
LOCAL_OLLAMA_URL=http://t-800.norteamericano.cl:11434

# Model Configuration
LOCAL_LLM_MODEL=llama3.2:3b
LOCAL_LLM_MODEL_COMPLEX=qwen3.5:9b
LOCAL_LLM_MODEL_ADVANCED=gpt-oss:latest

# Embeddings
EMBEDDING_MODEL=nomic-embed-text

# Audio transcription (Whisper)
WHISPER_MODEL=whisper-large-v3

# ----------------------------------------
# External Database Integration (SAM)
# ----------------------------------------
MYSQL_DATABASE_URL=mysql://db_user:db_password@host:3306/database_name
EXTERNAL_TABLE_GRADES=notas
EXTERNAL_ID_TIPO_NOTA=1

# ----------------------------------------
# Mercado Pago Configuration
# ----------------------------------------
MP_ACCESS_TOKEN=
MP_PUBLIC_KEY=
MP_WEBHOOK_SECRET=
MP_BACK_URL_SUCCESS=https://${NEXT_PUBLIC_LEARNING_DOMAIN}/payments/success
MP_BACK_URL_FAILURE=https://${NEXT_PUBLIC_LEARNING_DOMAIN}/payments/failure
MP_NOTIFICATION_URL=

# ----------------------------------------
# Branding Defaults
# ----------------------------------------
DEFAULT_ORG_NAME="Norteamericano"
DEFAULT_PLATFORM_NAME="Norteamericano Learning"
DEFAULT_LOGO_URL=""
DEFAULT_FAVICON_URL=""
DEFAULT_PRIMARY_COLOR="#3B82F6"
DEFAULT_SECONDARY_COLOR="#8B5CF6"

# ----------------------------------------
# Let's Encrypt Configuration
# true = Staging (certificados de prueba)
# false = Production (certificados reales)
# ----------------------------------------
LETSENCRYPT_STAGING=true

# ----------------------------------------
# Frontend URLs (para producción con SSL)
# Dominios configurables - cambiar aquí para mover a otro dominio
# ----------------------------------------
NEXT_PUBLIC_STUDIO_DOMAIN=studio.norteamericano.com
NEXT_PUBLIC_LEARNING_DOMAIN=learning.norteamericano.com
NEXT_PUBLIC_CMS_API_URL=https://studio.norteamericano.com
NEXT_PUBLIC_LMS_API_URL=https://learning.norteamericano.com
