fix: remove hardcoded prod/local browser URLs from app dev bundle
- Create centralized src/config/apiConfig.ts for API_BASE, TLSYNC_URL, WHISPERLIVE_URL, and SEARCH_URL resolution - Fix multiplayerUser.tsx to use VITE_TLSYNC_URL instead of deriving from VITE_FRONTEND_SITE_URL (was pointing to prod TLSync) - Replace all 127.0.0.1:8080 fallbacks with /api (relative path) - Replace all localhost:8000 fallbacks with VITE_API_BASE || /api - Remove hardcoded https://api.classroomcopilot.ai production fallbacks from transcription store and panel - Fix axiosConfig.ts to use centralized API config - Update .env.dev: set VITE_TLSYNC_URL to dev frontend URL - Update .env.development: fix VITE_SEARCH_URL from localhost to prod - Add missing env var type declarations to vite-env.d.ts Fixes: t_73d78fb1
This commit is contained in:
+43
-19
@@ -1,33 +1,34 @@
|
||||
# Classroom Copilot App - Environment Variables Template
|
||||
# Copy this file to .env and fill in the values
|
||||
# Copy this file to .env.dev or .env.development and fill in the values
|
||||
|
||||
# =============================================================================
|
||||
# Frontend Configuration
|
||||
# =============================================================================
|
||||
VITE_APP_NAME=Classroom Copilot
|
||||
VITE_DEV=false
|
||||
VITE_FRONTEND_SITE_URL=https://app.classroomcopilot.ai
|
||||
VITE_PORT_FRONTEND=3000
|
||||
VITE_PORT_FRONTEND_HMR=24678
|
||||
VITE_APP_HMR_URL=http://localhost:24678
|
||||
VITE_DEV=true
|
||||
VITE_DEV=true
|
||||
VITE_FRONTEND_SITE_URL=http://192.168.0.251:13000
|
||||
VITE_PORT_FRONTEND=13000
|
||||
VITE_PORT_FRONTEND_HMR=5173
|
||||
VITE_APP_HMR_URL=http://192.168.0.251:13000
|
||||
|
||||
# =============================================================================
|
||||
# API Configuration
|
||||
# API Configuration (primary: VITE_API_BASE, legacy alias: VITE_API_URL)
|
||||
# =============================================================================
|
||||
VITE_API_URL=https://api.classroomcopilot.ai
|
||||
VITE_API_BASE=https://api.classroomcopilot.ai
|
||||
VITE_API_URL=http://192.168.0.64:18000
|
||||
VITE_API_BASE=http://192.168.0.64:18000
|
||||
|
||||
# =============================================================================
|
||||
# Supabase Configuration
|
||||
# =============================================================================
|
||||
VITE_SUPABASE_URL=https://your-project.supabase.co
|
||||
VITE_SUPABASE_URL=http://192.168.0.94:8000
|
||||
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
|
||||
|
||||
# =============================================================================
|
||||
# TLSync (TLDraw Sync) Configuration
|
||||
# TLSync (TLDraw Sync Worker) Configuration
|
||||
# =============================================================================
|
||||
VITE_TLSYNC_URL=https://app.classroomcopilot.ai/tldraw
|
||||
VITE_TLSYNC_SECRET=your-tlsync-secret
|
||||
VITE_TLSYNC_URL=http://192.168.0.251:13000/tldraw
|
||||
VITE_TLSYNC_SECRET=your-tlsync-shared-secret
|
||||
|
||||
# =============================================================================
|
||||
# WhisperLive (Transcription) Configuration
|
||||
@@ -35,19 +36,42 @@ VITE_TLSYNC_SECRET=your-tlsync-secret
|
||||
VITE_WHISPERLIVE_URL=wss://whisperlive.classroomcopilot.ai/ws
|
||||
|
||||
# =============================================================================
|
||||
# Search Configuration
|
||||
# Search Configuration (searxng proxy)
|
||||
# =============================================================================
|
||||
VITE_SEARCH_URL=https://search.kevlarai.com
|
||||
|
||||
# =============================================================================
|
||||
# Super Admin Configuration
|
||||
# Neo4j Configuration
|
||||
# =============================================================================
|
||||
VITE_SUPER_ADMIN_EMAIL=[email protected]
|
||||
VITE_NEO4J_URL=bolt://192.168.0.209:7687
|
||||
VITE_NEO4J_USER=neo4j
|
||||
VITE_NEO4J_PASSWORD=password
|
||||
|
||||
# =============================================================================
|
||||
# Port Configuration (for docker-compose)
|
||||
# LLM / Ollama Configuration
|
||||
# =============================================================================
|
||||
PORT_FRONTEND=3000
|
||||
PORT_FRONTEND_HMR=24678
|
||||
VITE_LLM_PROVIDER=ollama
|
||||
VITE_OLLAMA_API_URL=https://ollama.kevlarai.com
|
||||
VITE_OLLAMA_BASE_URL=https://ollama.kevlarai.com
|
||||
|
||||
# =============================================================================
|
||||
# Microsoft Entra ID (SSO)
|
||||
# =============================================================================
|
||||
VITE_MICROSOFT_CLIENT_ID=dummy_client_id
|
||||
VITE_MICROSOFT_CLIENT_SECRET_DESC="Local dev OAuth client secret"
|
||||
VITE_MICROSOFT_CLIENT_SECRET_ID=secret-id
|
||||
VITE_MICROSOFT_CLIENT_SECRET=secret-value
|
||||
VITE_MICROSOFT_TENANT_ID=common
|
||||
|
||||
# =============================================================================
|
||||
# Super Admin Configuration
|
||||
# =============================================================================
|
||||
VITE_SUPER_ADMIN_EMAIL=[email protected]
|
||||
|
||||
# =============================================================================
|
||||
# Port Configuration (for docker-compose, non-VITE_ prefix)
|
||||
# =============================================================================
|
||||
PORT_FRONTEND=13000
|
||||
PORT_FRONTEND_HMR=3002
|
||||
PORT_API=8000
|
||||
PORT_SUPABASE=8000
|
||||
|
||||
Reference in New Issue
Block a user