refactor: consolidate environment config and API handling

- Update database paths and port configuration
- Remove backend config.ts and sessions route
- Add mobile file preview and files API
- Clean up shared constants and provider hooks
This commit is contained in:
Chris Scott committed 2025-11-25 09:39:56 -05:00
1 parent 0db354048d
commit 8a56bc208d
32 files changed
+301 -512

No files matched your search

+15 -10
View File
@@ -1,16 +1,21 @@
# OpenCode WebUI Configuration
# Copy this file to .env and customize as needed
# Default values are defined in: shared/src/config/defaults.ts
# ============================================
# Backend Server (Hono API)
# Backend Server Configuration
# ============================================
PORT=5001
HOST=0.0.0.0
CORS_ORIGIN=http://localhost:5173
NODE_ENV=development
LOG_LEVEL=info
# ============================================
# OpenCode Server
# ============================================
OPENCODE_SERVER_PORT=5551
OPENCODE_HOST=127.0.0.1
# ============================================
# Database
@@ -20,8 +25,7 @@ DATABASE_PATH=./data/opencode.db
# ============================================
# Workspace Configuration
# ============================================
# Local workspace path for repositories and configs
WORKSPACE_PATH=~./workspace
WORKSPACE_PATH=./workspace
# ============================================
# Timeouts (milliseconds)
@@ -32,9 +36,8 @@ HEALTH_CHECK_INTERVAL_MS=5000
HEALTH_CHECK_TIMEOUT_MS=30000
# ============================================
# File Upload Limits
# File Limits (MB)
# ============================================
# File size limits in MB
MAX_FILE_SIZE_MB=50
MAX_UPLOAD_SIZE_MB=50
@@ -44,9 +47,11 @@ MAX_UPLOAD_SIZE_MB=50
DEBUG=false
# ============================================
# Frontend Configuration (REQUIRED)
# Frontend Configuration (Vite)
# These are optional - frontend uses defaults if not set
# ============================================
# Backend API URL - frontend connects to this
# Must include full URL with port (e.g., http://localhost:8080)
VITE_API_URL=http://localhost:8080
# VITE_API_URL=http://localhost:5001
# VITE_SERVER_PORT=5001
# VITE_OPENCODE_PORT=5551
# VITE_MAX_FILE_SIZE_MB=50
# VITE_MAX_UPLOAD_SIZE_MB=50