app/.env.example
kcar 67e47fc47f
Some checks failed
app-ci-deploy / test-build-deploy (push) Has been cancelled
feat(tlsync): fetch short-lived token from API before multiplayer connect
- Remove VITE_TLSYNC_SECRET from browser env (no longer exposed to bundle)
- Add useTlsyncToken hook that fetches /api/tlsync/token with Supabase auth
- Extract TldrawCanvas sub-component: only renders after token is ready
- Pass API-issued short-lived token to createSyncConnectionOptions
- Add vite.config.ts blocklist to prevent secret leak (defense-in-depth)
- Remove VITE_TLSYNC_SECRET from .env.example (server-side only now)

Related: t_a69128a1 (API token endpoint), t_41a844a7 (this task)
2026-05-28 18:00:43 +01:00

53 lines
2.3 KiB
Plaintext

# Classroom Copilot App - Environment Variables Template
# Copy this file to .env 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
# =============================================================================
# API Configuration
# =============================================================================
VITE_API_URL=https://api.classroomcopilot.ai
VITE_API_BASE=https://api.classroomcopilot.ai
# =============================================================================
# Supabase Configuration
# =============================================================================
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
# =============================================================================
# TLSync (TLDraw Sync) Configuration — shared secret is server-side only (API TLSYNC_SECRET)
# =============================================================================
VITE_TLSYNC_URL=https://app.classroomcopilot.ai/tldraw
# =============================================================================
# WhisperLive (Transcription) Configuration
# =============================================================================
VITE_WHISPERLIVE_URL=wss://whisperlive.classroomcopilot.ai/ws
# =============================================================================
# Search Configuration
# =============================================================================
VITE_SEARCH_URL=https://search.kevlarai.com
# =============================================================================
# Super Admin Configuration
# =============================================================================
VITE_SUPER_ADMIN_EMAIL=admin@example.com
# =============================================================================
# Port Configuration (for docker-compose)
# =============================================================================
PORT_FRONTEND=3000
PORT_FRONTEND_HMR=24678
PORT_API=8000
PORT_SUPABASE=8000