# =============================================================================
# GoodGo Platform - Local Environment Template
# =============================================================================
# EN: Copy this file to both `.env` and `.env.local` before running docker compose.
# VI: Sao chép file này thành cả `.env` và `.env.local` trước khi chạy docker compose.
#
#   cp env.local.example .env
#   cp env.local.example .env.local
#
# EN: Never commit real credentials.
# VI: Không commit thông tin nhạy cảm thật.
# =============================================================================

# -----------------------------------------------------------------------------
# Runtime
# -----------------------------------------------------------------------------
ASPNETCORE_ENVIRONMENT=Development
NODE_ENV=development
LOG_LEVEL=Information
API_VERSION=v1

# -----------------------------------------------------------------------------
# JWT / Auth (shared across services)
# -----------------------------------------------------------------------------
JWT_SECRET=replace-with-min-32-char-secret
JWT_REFRESH_SECRET=replace-with-min-32-char-secret
JWT_ID_SECRET=replace-with-min-32-char-secret
JWT_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
JWT_ID_EXPIRES_IN=1h
JWT_ISSUER=goodgo-platform
JWT_AUDIENCE=goodgo-services
JWT_ACCESS_TOKEN_EXPIRY_MINUTES=15
JWT_REFRESH_TOKEN_EXPIRY_DAYS=7

# -----------------------------------------------------------------------------
# Security / Encryption
# -----------------------------------------------------------------------------
ENCRYPTION_KEY=replace-with-64-char-hex-key

# -----------------------------------------------------------------------------
# Redis
# -----------------------------------------------------------------------------
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=replace-with-redis-password
REDIS_DATABASE=0
REDIS_CONNECTION_STRING=redis:6379,password=replace-with-redis-password

# -----------------------------------------------------------------------------
# MinIO / Object storage
# -----------------------------------------------------------------------------
MINIO_ENDPOINT=minio:9000
MINIO_ACCESS_KEY=replace-with-minio-access-key
MINIO_SECRET_KEY=replace-with-minio-secret-key

# -----------------------------------------------------------------------------
# RabbitMQ
# -----------------------------------------------------------------------------
RABBITMQ_USERNAME=guest
RABBITMQ_PASSWORD=replace-with-rabbitmq-password

# -----------------------------------------------------------------------------
# IAM feature flags / misc
# -----------------------------------------------------------------------------
FEATURE_SWAGGER_ENABLED=true
FEATURE_DETAILED_ERRORS=true
CORS_ORIGIN=http://localhost:3000,http://localhost:3001,http://localhost,http://admin.localhost
TRACING_ENABLED=false
JAEGER_ENDPOINT=http://jaeger:14268/api/traces
METRICS_ENABLED=true
SEQ_URL=http://localhost:5341

# -----------------------------------------------------------------------------
# Service database connection strings
# -----------------------------------------------------------------------------
IAM_DATABASE_URL=Host=your-neon-host;Port=5432;Database=iam_service;Username=your-user;Password=your-password;SSL Mode=Require
STORAGE_DATABASE_URL=Host=your-neon-host;Port=5432;Database=storage_service;Username=your-user;Password=your-password;SSL Mode=Require
MEMBERSHIP_DATABASE_URL=Host=your-neon-host;Port=5432;Database=membership_service;Username=your-user;Password=your-password;SSL Mode=Require
MERCHANT_DATABASE_URL=Host=your-neon-host;Port=5432;Database=merchant_service;Username=your-user;Password=your-password;SSL Mode=Require
WALLET_DATABASE_URL=Host=your-neon-host;Port=5432;Database=wallet_service;Username=your-user;Password=your-password;SSL Mode=Require
CHAT_DATABASE_URL=Host=your-neon-host;Port=5432;Database=chat_service;Username=your-user;Password=your-password;SSL Mode=Require
SOCIAL_DATABASE_URL=Host=your-neon-host;Port=5432;Database=social_service;Username=your-user;Password=your-password;SSL Mode=Require
MINING_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mining_service;Username=your-user;Password=your-password;SSL Mode=Require
MISSION_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mission_service;Username=your-user;Password=your-password;SSL Mode=Require
PROMOTION_DATABASE_URL=Host=your-neon-host;Port=5432;Database=promotion_service;Username=your-user;Password=your-password;SSL Mode=Require
CATALOG_DATABASE_URL=Host=your-neon-host;Port=5432;Database=catalog_service;Username=your-user;Password=your-password;SSL Mode=Require
ORDER_DATABASE_URL=Host=your-neon-host;Port=5432;Database=order_service;Username=your-user;Password=your-password;SSL Mode=Require
INVENTORY_DATABASE_URL=Host=your-neon-host;Port=5432;Database=inventory_service;Username=your-user;Password=your-password;SSL Mode=Require
FNB_ENGINE_DATABASE_URL=Host=your-neon-host;Port=5432;Database=fnb_engine;Username=your-user;Password=your-password;SSL Mode=Require
BOOKING_DATABASE_URL=Host=your-neon-host;Port=5432;Database=booking_service;Username=your-user;Password=your-password;SSL Mode=Require
ADS_MANAGER_DATABASE_URL=Host=your-neon-host;Port=5432;Database=ads_manager_service;Username=your-user;Password=your-password;SSL Mode=Require
ADS_ANALYTICS_DATABASE_URL=Host=your-neon-host;Port=5432;Database=ads_analytics_service;Username=your-user;Password=your-password;SSL Mode=Require
ADS_SERVING_DATABASE_URL=Host=your-neon-host;Port=5432;Database=ads_serving_service;Username=your-user;Password=your-password;SSL Mode=Require
ADS_BILLING_DATABASE_URL=Host=your-neon-host;Port=5432;Database=ads_billing_service;Username=your-user;Password=your-password;SSL Mode=Require
ADS_TRACKING_DATABASE_URL=Host=your-neon-host;Port=5432;Database=ads_tracking_service;Username=your-user;Password=your-password;SSL Mode=Require
MKT_FACEBOOK_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mkt_facebook_service;Username=your-user;Password=your-password;SSL Mode=Require
MKT_WHATSAPP_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mkt_whatsapp_service;Username=your-user;Password=your-password;SSL Mode=Require
MKT_X_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mkt_x_service;Username=your-user;Password=your-password;SSL Mode=Require
MKT_ZALO_DATABASE_URL=Host=your-neon-host;Port=5432;Database=mkt_zalo_service;Username=your-user;Password=your-password;SSL Mode=Require
