- Add bootstrap.ts as new entry point — resolves Key Vault secrets via DefaultAzureCredential before config/index.ts is evaluated, so all process.env reads pick up KV values (Azure CLI in dev, Managed Identity in prod). Falls back to .env if AZURE_KEYVAULT_URL is not set. - Define INVTTRDG_SECRETS mappings for Cosmos, Azure OpenAI, product-id - Add AZURE_OPENAI_ENDPOINT / KEY / DEPLOYMENT to config - aiClient: prefer AzureOpenAIProvider (AI Foundry) when Azure OpenAI config is present; falls back to direct OpenAI if not configured - Add @azure/identity, @azure/keyvault-secrets, @bytelyst/config deps - Update dev/start scripts to use bootstrap.ts entry point - Document AZURE_KEYVAULT_URL and Azure OpenAI vars in .env.example Key Vault: https://kv-mywisprai.vault.azure.net/ Secrets prefix: invttrdg-* Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
# Shared product identity
|
|
PRODUCT_ID=invttrdg
|
|
PRODUCT_DISPLAY_NAME=ByteLyst Trading
|
|
|
|
# Shared platform-service endpoint
|
|
PLATFORM_API_URL=http://localhost:4003/api
|
|
PLATFORM_AUTH_ENABLED=true
|
|
PLATFORM_JWT_ISSUER=bytelyst-platform
|
|
JWT_SECRET=
|
|
PLATFORM_JWT_PUBLIC_KEY=
|
|
PLATFORM_JWT_JWKS_URL=
|
|
|
|
# Product backend endpoint
|
|
TRADING_API_URL=http://localhost:4018/api
|
|
|
|
# Azure Key Vault — set to enable secret resolution at startup (uses Azure CLI in dev, Managed Identity in prod)
|
|
AZURE_KEYVAULT_URL=https://kv-mywisprai.vault.azure.net/
|
|
|
|
# Cosmos DB control-plane storage (populated from Key Vault if AZURE_KEYVAULT_URL is set)
|
|
COSMOS_ENDPOINT=
|
|
COSMOS_KEY=
|
|
COSMOS_DATABASE=invttrdg
|
|
|
|
# Azure OpenAI (AI Foundry) — populated from Key Vault if AZURE_KEYVAULT_URL is set
|
|
# When set, takes precedence over direct OPENAI_API_KEY for the openai provider slot
|
|
AZURE_OPENAI_ENDPOINT=https://swedencentral.api.cognitive.microsoft.com/
|
|
AZURE_OPENAI_KEY=
|
|
AZURE_OPENAI_DEPLOYMENT=gpt-4o
|
|
|
|
# Web-specific public envs
|
|
NEXT_PUBLIC_PRODUCT_ID=invttrdg
|
|
NEXT_PUBLIC_PLATFORM_URL=http://localhost:4003/api
|
|
NEXT_PUBLIC_TRADING_API_URL=http://localhost:4018/api
|
|
VITE_PRODUCT_ID=invttrdg
|
|
VITE_PLATFORM_URL=http://localhost:4003/api
|
|
VITE_TRADING_API_URL=http://localhost:4018/api
|
|
|
|
# Mobile public envs
|
|
EXPO_PUBLIC_PRODUCT_ID=invttrdg
|
|
EXPO_PUBLIC_PLATFORM_URL=http://localhost:4003/api
|
|
EXPO_PUBLIC_TRADING_API_URL=http://localhost:4018/api
|
|
|
|
# Backend envs
|
|
PORT=4018
|
|
NODE_ENV=development
|
|
CORS_ALLOWED_ORIGINS=http://localhost:3048,http://localhost:8081
|
|
# Legacy data-plane fallback only. Backend auth prefers platform JWTs.
|
|
SUPABASE_URL=
|
|
SUPABASE_ANON_KEY=
|
|
SUPABASE_SERVICE_ROLE_KEY=
|