# DSS Environment Variables Configuration
# Copy this file to .env and fill in your values

# =============================================================================
# Server Configuration
# =============================================================================
# REST API server port (default: 3456)
PORT=3456

# MCP server configuration
DSS_MCP_PORT=3457
DSS_MCP_HOST=127.0.0.1

# MCP encryption key for storing credentials (generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())")
DSS_ENCRYPTION_KEY=

# MCP context cache TTL in seconds (default: 300 = 5 minutes)
DSS_CONTEXT_CACHE_TTL=300

# Redis configuration for MCP worker pool
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

# Node environment (development/production)
NODE_ENV=development

# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=info

# =============================================================================
# Figma Integration
# =============================================================================
# Get your token from: https://www.figma.com/developers/api#access-tokens
# Requires: Figma Pro/Organization account for Variables API
FIGMA_TOKEN=

# Figma API cache TTL in seconds (default: 300 = 5 minutes)
FIGMA_CACHE_TTL=300

# =============================================================================
# Claude AI Chat Integration
# =============================================================================
# Get your API key from: https://console.anthropic.com/settings/keys
# Required for the Chat page in the admin UI
ANTHROPIC_API_KEY=

# =============================================================================
# Database & Storage
# =============================================================================
# Path to SQLite database file
DATABASE_PATH=.dss/dss.db

# Cache directory
DSS_CACHE_DIR=.dss/cache

# =============================================================================
# Security (Future Use)
# =============================================================================
# JWT secret for authentication (generate with: openssl rand -hex 32)
JWT_SECRET=

# =============================================================================
# Optional Integrations
# =============================================================================
# Storybook (if running locally)
# STORYBOOK_PORT=6006
# STORYBOOK_URL=http://localhost:6006

# GitHub integration
# GITHUB_TOKEN=

# Chromatic visual testing
# CHROMATIC_PROJECT_TOKEN=

# =============================================================================
# Atlassian Integration (Jira & Confluence)
# =============================================================================
# These are user-scoped and stored encrypted in the database
# Set these as defaults or leave empty for per-user configuration
# JIRA_URL=https://your-domain.atlassian.net
# JIRA_USERNAME=
# JIRA_API_TOKEN=

# CONFLUENCE_URL=https://your-domain.atlassian.net/wiki
# CONFLUENCE_USERNAME=
# CONFLUENCE_API_TOKEN=

# Circuit breaker settings for external APIs
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5
CIRCUIT_BREAKER_TIMEOUT_SECONDS=60
