# ==============================================
# my.experimenta.science - Environment Variables
# ==============================================
# Copy this file to .env and fill in your values
# Never commit .env to git!

# ==============================================
# APPLICATION
# ==============================================
NODE_ENV=development
APP_URL=http://localhost:3000

# ==============================================
# DATABASE (PostgreSQL)
# ==============================================
# For local development with docker-compose.dev.yml:
DATABASE_URL=postgresql://dev:dev_password_change_me@localhost:5432/experimenta_dev

# For production, use separate values:
# DB_HOST=db
# DB_PORT=5432
# DB_NAME=experimenta
# DB_USER=experimenta_user
# DB_PASSWORD=xxx

# ==============================================
# REDIS (Sessions, Queues, Cache)
# ==============================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# For production: Set REDIS_PASSWORD

# ==============================================
# SESSION ENCRYPTION (nuxt-auth-utils)
# ==============================================
# Generate with: openssl rand -hex 32
# This variable is automatically used by nuxt-auth-utils for session encryption
NUXT_SESSION_PASSWORD=generate-with-openssl-rand-hex-32

# ==============================================
# CIDAAS (OAuth2/OIDC Authentication)
# ==============================================
# Get these from Cidaas Admin Panel
CIDAAS_BASE_URL=https://experimenta-staging.cidaas.de
CIDAAS_CLIENT_ID=...
CIDAAS_CLIENT_SECRET=...
CIDAAS_REDIRECT_URI=http://localhost:3000/api/auth/callback

# Computed URLs (no need to change):
CIDAAS_AUTHORIZE_URL=${CIDAAS_BASE_URL}/authz-srv/authz
CIDAAS_TOKEN_URL=${CIDAAS_BASE_URL}/token-srv/token
CIDAAS_USERINFO_URL=${CIDAAS_BASE_URL}/users-srv/userinfo
CIDAAS_JWKS_URL=${CIDAAS_BASE_URL}/.well-known/jwks.json
CIDAAS_ISSUER=${CIDAAS_BASE_URL}

# ==============================================
# PAYPAL (Payment Gateway)
# ==============================================
# Sandbox credentials for development
PAYPAL_CLIENT_ID=your-sandbox-client-id
PAYPAL_CLIENT_SECRET=your-sandbox-client-secret
PAYPAL_MODE=sandbox
# For production: Set PAYPAL_MODE=live and use live credentials

# ==============================================
# X-API (NAV ERP Integration)
# ==============================================
# HTTP Basic Authentication credentials
X_API_BASE_URL=https://x-api-dev.experimenta.science
X_API_USERNAME=shop_user_dev
X_API_PASSWORD=xxx

# Staging:
# X_API_BASE_URL=https://x-api-stage.experimenta.science
# X_API_USERNAME=shop_user_stage
# X_API_PASSWORD=xxx

# Production:
# X_API_BASE_URL=https://x-api.experimenta.science
# X_API_USERNAME=shop_user_prod
# X_API_PASSWORD=xxx

# ==============================================
# NAV ERP (Incoming Product Sync)
# ==============================================
# API Key for NAV ERP to push products to us
NAV_ERP_API_KEY=your-secure-api-key-for-nav-erp

# ==============================================
# EMAIL (Transactional Emails)
# ==============================================
# Option A: SMTP Server
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-smtp-username
SMTP_PASSWORD=your-smtp-password
SMTP_FROM=noreply@experimenta.science

# Option B: SendGrid
# SENDGRID_API_KEY=your-sendgrid-api-key

# Option C: Postmark
# POSTMARK_SERVER_TOKEN=your-postmark-token

# ==============================================
# MONITORING & LOGGING (Optional)
# ==============================================
# SENTRY_DSN=https://xxx@sentry.io/xxx
# SENTRY_ENVIRONMENT=development

# ==============================================
# INTERNAL PAGES (Styleguide, Admin)
# ==============================================
# HTTP Basic Auth credentials for /internal/* routes
INTERNAL_AUTH_ENABLED=true
INTERNAL_AUTH_USERNAME=experimenta
INTERNAL_AUTH_PASSWORD=change-me-to-secure-password

# ==============================================
# SHOPPING CART
# ==============================================
# Cart session cookie name
CART_SESSION_COOKIE_NAME=cart-session

# Cart expiry in days (for both user and guest carts)
CART_EXPIRY_DAYS=30

# ==============================================
# DEVELOPMENT TOOLS
# ==============================================
# Enable Nuxt DevTools
NUXT_DEVTOOLS_ENABLED=true

# Enable verbose logging
# DEBUG=nuxt:*
