# LeoCRM v1.0 - Environment Variables Template

# === REQUIRED ===
DATABASE_URL=postgresql+asyncpg://leocrm:leocrm@localhost:5432/leocrm
REDIS_URL=redis://localhost:6379/0

# === OPTIONAL (with defaults) ===

# Environment: development | production | testing
ENVIRONMENT=development

# Log level: DEBUG | INFO | WARNING | ERROR
LOG_LEVEL=INFO

# Database pool
DB_POOL_SIZE=10
DB_MAX_OVERFLOW=20
DB_ECHO=false

# Session settings
SESSION_TTL_SECONDS=28800
SESSION_COOKIE_NAME=leocrm_session
SESSION_COOKIE_SECURE=false
SESSION_COOKIE_SAMESITE=strict
SESSION_COOKIE_HTTPONLY=true

# Password hashing
BCRYPT_ROUNDS=12
PASSWORD_RESET_EXPIRY_HOURS=1

# CORS allowed origins (comma-separated, NO wildcards)
CORS_ORIGINS=http://localhost:5173,http://localhost:3000

# Secret Key (for signing, sessions — use a secure random string ≥32 chars in prod)
SECRET_KEY=change-me-in-production-use-a-secure-random-string

# Storage (file uploads, DMS)
STORAGE_PATH=/tmp

# SMTP / Email
SMTP_HOST=localhost
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=noreply@leocrm.local
SMTP_USE_TLS=true

# Rate limiting
RATE_LIMIT_LOGIN_MAX=5
RATE_LIMIT_LOGIN_WINDOW=900
RATE_LIMIT_RESET_MAX=3
RATE_LIMIT_RESET_WINDOW=3600
RATE_LIMIT_RESET_CONFIRM_MAX=5
RATE_LIMIT_RESET_CONFIRM_WINDOW=3600
RATE_LIMIT_GENERAL_MAX=60
RATE_LIMIT_GENERAL_WINDOW=60

# === AI / Search ===
# Ollama Cloud API Key (für LiteLLM)
API_KEY_OLLAMA_CLOUD=
# Embedding Modell (default: ollama/nomic-embed-text)
SEARCH_EMBEDDING_MODEL=ollama/nomic-embed-text
# LLM Modell für Query Understanding (default: ollama/deepseek-v4)
SEARCH_LLM_MODEL=ollama/deepseek-v4
