Merge pull request #147 from multica-ai/docs/desktop-env-example

docs(desktop): improve .env.example with accurate configuration guide
This commit is contained in:
Naiyuan Qing 2026-02-12 19:06:15 +08:00 committed by GitHub
commit 9a22ed1171
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,22 +2,33 @@
# Multica Desktop Environment Configuration
# =============================================================================
#
# Copy this file to create environment-specific configs:
# .env.development - Local development (npm run dev)
# .env.staging - Test environment (npm run build --mode staging)
# .env.production - Production release (npm run build)
# Local Development:
# Just run `pnpm dev` - connects to dev gateway (multica-dev.copilothub.ai)
# GATEWAY_URL is hardcoded in root package.json, no .env file needed.
#
# Production Build:
# `pnpm build` uses .env.production automatically
#
# Variable naming convention:
# MAIN_VITE_* - Available in main process only
# RENDERER_VITE_* - Available in renderer process only
# VITE_* - Available in all processes
# MAIN_VITE_* - Main process only (Node.js, full system access)
# RENDERER_VITE_* - Renderer process only (browser context)
# VITE_* - All processes
#
# =============================================================================
# URL Configuration
# =============================================================================
#
# MAIN_VITE_GATEWAY_URL - WebSocket Gateway
# Hub connects to Gateway for remote device access (QR code pairing)
# Dev: multica-dev.copilothub.ai (hardcoded in root package.json)
# Prod: see .env.production
#
# MAIN_VITE_MULTICA_URL - REST API Server
# HTTP requests for authentication, auto-updates, user data sync
# Dev: not yet used
# Prod: see .env.production
#
# =============================================================================
# Gateway WebSocket server URL
# Used for Hub <-> Gateway communication
MAIN_VITE_GATEWAY_URL=http://localhost:3000
# Multica API server URL
# Used for HTTP API requests (auth, updates, etc.)
MAIN_VITE_MULTICA_URL=http://localhost:3001