From 220fb52728ef1c1338458d3848c43cd4e72d4612 Mon Sep 17 00:00:00 2001 From: senke Date: Thu, 29 Jan 2026 23:23:04 +0100 Subject: [PATCH] config(prod): add frontend production environment file Created .env.production for frontend with absolute API URLs for production deployment. Configuration: - VITE_API_URL: https://api.veza.com/api/v1 - VITE_WS_URL: wss://api.veza.com/ws - VITE_STREAM_URL: https://api.veza.com/stream - VITE_UPLOAD_URL: https://api.veza.com/upload - VITE_API_VERSION: v1 Features: - Absolute URLs (required for production, no Vite proxy) - HTTPS/WSS for secure connections - Validation alerting enabled - Deployment notes included Usage: - Local testing: Update URLs to local domains, npm run build, npm run preview - Production: Update to real domains, ensure CORS configured Impact: Frontend can now be deployed to production with proper API URLs. Fixes: P2.2 from audit AUDIT_TEMP_29_01_2026.md --- apps/web/.env.production | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 apps/web/.env.production diff --git a/apps/web/.env.production b/apps/web/.env.production new file mode 100644 index 000000000..8c90d3cde --- /dev/null +++ b/apps/web/.env.production @@ -0,0 +1,47 @@ +# ============================================================================= +# VEZA FRONTEND - PRODUCTION CONFIGURATION +# ============================================================================= +# This file contains production-specific environment variables for the frontend +# These URLs should point to your production backend API +# ============================================================================= + +# --- API URLs (ABSOLUTE) --- +# Production backend API URL (must be absolute, not relative) +# Example: https://api.veza.com/api/v1 +VITE_API_URL=https://api.veza.com/api/v1 + +# WebSocket URL for real-time features +# Example: wss://api.veza.com/ws +VITE_WS_URL=wss://api.veza.com/ws + +# Stream server URL for media streaming +# Example: https://api.veza.com/stream +VITE_STREAM_URL=https://api.veza.com/stream + +# Upload server URL for file uploads +# Example: https://api.veza.com/upload +VITE_UPLOAD_URL=https://api.veza.com/upload + +# --- API VERSION --- +# API version to use (sent in X-API-Version header) +VITE_API_VERSION=v1 + +# --- FEATURE FLAGS --- +# Enable/disable features in production +VITE_ENABLE_VALIDATION_ALERTING=true + +# ============================================================================= +# DEPLOYMENT NOTES +# ============================================================================= +# +# For local testing with production build: +# 1. Update URLs above to match your local setup (e.g., http://veza.com:8080/api/v1) +# 2. Build: npm run build +# 3. Preview: npm run preview +# +# For actual production deployment: +# 1. Update URLs to real production domains +# 2. Ensure backend CORS allows your frontend domain +# 3. Use HTTPS for all URLs (except local testing) +# +# =============================================================================