2025-12-25 18:17:40 +09:00
|
|
|
# =============================================================================
|
|
|
|
|
# Customer Portal BFF - Development Environment
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Copy this file to .env in apps/bff/:
|
|
|
|
|
# cp .env.example .env
|
|
|
|
|
#
|
|
|
|
|
# For environment-specific overrides, use:
|
|
|
|
|
# .env.development - development defaults
|
|
|
|
|
# .env.development.local - local dev overrides (gitignored)
|
|
|
|
|
# .env.local - local overrides for any environment (gitignored)
|
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Database (Required)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
DATABASE_URL=postgresql://dev:dev@localhost:5432/portal_dev?schema=public
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Security (Required)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Generate with: openssl rand -base64 32
|
|
|
|
|
JWT_SECRET=dev-secret-change-in-production-min-32-chars
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Redis
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
REDIS_URL=redis://localhost:6379
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Server
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
BFF_PORT=4000
|
|
|
|
|
APP_BASE_URL=http://localhost:3000
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# CORS
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
CORS_ORIGIN=http://localhost:3000
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Logging
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
LOG_LEVEL=debug
|
|
|
|
|
PRETTY_LOGS=true
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Rate Limiting (relaxed for development)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
RATE_LIMIT_LIMIT=1000
|
|
|
|
|
AUTH_RATE_LIMIT_LIMIT=10
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Dev Bypasses (NEVER enable in production!)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# DISABLE_CSRF=true
|
|
|
|
|
# DISABLE_RATE_LIMIT=true
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# External Services (Optional - configure when testing integrations)
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# --- WHMCS (Billing) ---
|
|
|
|
|
# WHMCS_BASE_URL=
|
|
|
|
|
# WHMCS_API_IDENTIFIER=
|
|
|
|
|
# WHMCS_API_SECRET=
|
|
|
|
|
|
|
|
|
|
# --- Salesforce (CRM) ---
|
|
|
|
|
# SF_LOGIN_URL=
|
|
|
|
|
# SF_CLIENT_ID=
|
|
|
|
|
# SF_USERNAME=
|
|
|
|
|
# SF_PRIVATE_KEY_PATH=./secrets/sf-private.key
|
|
|
|
|
|
|
|
|
|
# --- Freebit (SIM Management) ---
|
|
|
|
|
# FREEBIT_BASE_URL=
|
|
|
|
|
# FREEBIT_OEM_KEY=
|
|
|
|
|
|
2026-01-14 16:25:06 +09:00
|
|
|
# --- Email (SendGrid) ---
|
|
|
|
|
# SENDGRID_API_KEY= # Required: Your SendGrid API key
|
|
|
|
|
# EMAIL_FROM=no-reply@example.com # Required: Sender email address
|
|
|
|
|
# EMAIL_FROM_NAME=Customer Portal # Optional: Sender display name
|
|
|
|
|
# EMAIL_ENABLED=true # Enable/disable email sending
|
|
|
|
|
# EMAIL_USE_QUEUE=true # Use BullMQ queue (recommended)
|
|
|
|
|
# SENDGRID_SANDBOX=false # Enable sandbox mode for testing
|
|
|
|
|
|
|
|
|
|
# --- Email Templates (Optional - SendGrid Dynamic Templates) ---
|
|
|
|
|
# EMAIL_TEMPLATE_OTP_VERIFICATION= # Template ID for OTP emails
|
|
|
|
|
# EMAIL_TEMPLATE_RESET= # Template ID for password reset
|