mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
* fix: markdown files now default to rendered view and render properly - Add .md and .mdx MIME type support in backend (files.ts, defaults.ts) - Add key props to FilePreview components to force proper remounting when switching files - Fix markdown file detection with case-insensitive extension check - Reset markdownPreview state when file changes to ensure correct default view - Add onContentLoaded callback to VirtualizedTextView for reactive content updates - Add fullContent state to properly handle large markdown file rendering - Add error handling for async content loading to prevent blank screens - Reduce loading timeout from 50ms to 0ms for more responsive loading Fixes issues where: - Markdown files opened in raw view instead of rendered view - Large markdown files (12k+ lines) showed blank after loading completed - State persisted incorrectly when switching between different file types * Add directory download feature with ZIP archive support * Improve voice recording UX with loading states and better transcript handling * Fix auth config for prod/dev ports and add documentation Update AUTH_TRUSTED_ORIGINS and PASSKEY_ORIGIN to use backend port 5003 (frontend uses 5173 in dev). Add comprehensive auth documentation covering secrets, trusted origins, admin reset, and passkeys. Update README and add mkdocs config. * Remove roadmap section from README
95 lines
2.9 KiB
Bash
95 lines
2.9 KiB
Bash
# OpenCode WebUI Configuration
|
|
# Copy this file to .env and customize as needed
|
|
# Default values are defined in: shared/src/config/defaults.ts
|
|
|
|
# ============================================
|
|
# 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
|
|
# ============================================
|
|
DATABASE_PATH=./data/opencode.db
|
|
|
|
# ============================================
|
|
# Workspace Configuration
|
|
# ============================================
|
|
WORKSPACE_PATH=./workspace
|
|
|
|
# ============================================
|
|
# Timeouts (milliseconds)
|
|
# ============================================
|
|
PROCESS_START_WAIT_MS=2000
|
|
PROCESS_VERIFY_WAIT_MS=1000
|
|
HEALTH_CHECK_INTERVAL_MS=5000
|
|
HEALTH_CHECK_TIMEOUT_MS=30000
|
|
|
|
# ============================================
|
|
# File Limits (MB)
|
|
# ============================================
|
|
MAX_FILE_SIZE_MB=50
|
|
MAX_UPLOAD_SIZE_MB=50
|
|
|
|
# ============================================
|
|
# Logging
|
|
# ============================================
|
|
DEBUG=false
|
|
|
|
# ============================================
|
|
# Authentication (Better Auth)
|
|
# ============================================
|
|
# AUTH_SECRET is required for production deployments
|
|
# Generate with: openssl rand -base64 32
|
|
# AUTH_SECRET=your-secure-random-secret-here
|
|
|
|
# Trusted origins for authentication (comma-separated)
|
|
# Add your server's external URL when accessing remotely
|
|
# AUTH_TRUSTED_ORIGINS=http://localhost:5173,http://localhost:5003
|
|
|
|
# Admin Account (optional - for pre-configured single-user mode)
|
|
# When set, admin user is created on first startup and self-registration is disabled
|
|
# ADMIN_EMAIL=admin@example.com
|
|
# ADMIN_PASSWORD=your-secure-password
|
|
|
|
# Password Reset (set to true to force password update from ADMIN_PASSWORD)
|
|
# Remove after resetting password
|
|
# ADMIN_PASSWORD_RESET=false
|
|
|
|
# Secure Cookies (set to false when running HTTP without a reverse proxy)
|
|
# Defaults to true in production, false in development
|
|
# AUTH_SECURE_COOKIES=true
|
|
|
|
# OAuth Providers (optional - enable by providing client ID and secret)
|
|
# GITHUB_CLIENT_ID=
|
|
# GITHUB_CLIENT_SECRET=
|
|
# GOOGLE_CLIENT_ID=
|
|
# GOOGLE_CLIENT_SECRET=
|
|
# DISCORD_CLIENT_ID=
|
|
# DISCORD_CLIENT_SECRET=
|
|
|
|
# Passkey/WebAuthn Configuration
|
|
PASSKEY_RP_ID=localhost
|
|
PASSKEY_RP_NAME=OpenCode Manager
|
|
PASSKEY_ORIGIN=http://localhost:5003
|
|
|
|
# ============================================
|
|
# Frontend Configuration (Vite)
|
|
# These are optional - frontend uses defaults if not set
|
|
# ============================================
|
|
# 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
|