chore: remove AI dev files from repo and clean up env config

- Remove .claude/, openspec/, AGENTS.md, CLAUDE.md from git tracking
- Simplify .env.example: remove unused path configs (use config.py defaults)
- Clean up .env for production: remove hardcoded secrets, use env var substitution
- Path configs now use sensible defaults from backend/app/core/config.py:
  - uploads -> backend/uploads/
  - storage -> backend/storage/
  - results -> backend/storage/results/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
egg
2025-12-14 15:08:33 +08:00
parent 86a6633000
commit e255039419
204 changed files with 35 additions and 26070 deletions

View File

@@ -1,7 +1,10 @@
# Tool_OCR - Environment Configuration Template
# Copy this file to .env.local and fill in your actual values
#
# Note: Most path configurations have sensible defaults in config.py
# Only override if you need custom paths
# ===== Database Configuration =====
# ===== Database Configuration (Required) =====
MYSQL_HOST=your-mysql-host
MYSQL_PORT=3306
MYSQL_USER=your-username
@@ -15,12 +18,12 @@ BACKEND_PORT=8000
FRONTEND_HOST=0.0.0.0
FRONTEND_PORT=5173
# Security (generate a random string for production)
# Security (generate a random string for production: openssl rand -hex 32)
SECRET_KEY=your-secret-key-here-please-change-this-to-random-string
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=1440
# ===== External Authentication Configuration =====
# ===== External Authentication Configuration (Required) =====
EXTERNAL_AUTH_API_URL=https://your-auth-api.example.com
EXTERNAL_AUTH_ENDPOINT=/api/auth/login
EXTERNAL_AUTH_TIMEOUT=30
@@ -46,61 +49,21 @@ GPU_DEVICE_ID=0
# ===== File Upload Configuration =====
MAX_UPLOAD_SIZE=52428800
ALLOWED_EXTENSIONS=png,jpg,jpeg,pdf,bmp,tiff,doc,docx,ppt,pptx
UPLOAD_DIR=./uploads
TEMP_DIR=./uploads/temp
PROCESSED_DIR=./uploads/processed
IMAGES_DIR=./uploads/images
# ===== Export Configuration =====
STORAGE_DIR=./storage
MARKDOWN_DIR=./storage/markdown
JSON_DIR=./storage/json
EXPORTS_DIR=./storage/exports
# ===== PDF Generation Configuration =====
# Linux: /usr/bin/pandoc, macOS: /opt/homebrew/bin/pandoc
PANDOC_PATH=/usr/bin/pandoc
# Linux: /usr/share/fonts, macOS: /System/Library/Fonts
FONT_DIR=/usr/share/fonts
PDF_PAGE_SIZE=A4
PDF_MARGIN_TOP=20
PDF_MARGIN_BOTTOM=20
PDF_MARGIN_LEFT=20
PDF_MARGIN_RIGHT=20
# Path defaults to backend/uploads - only override if needed
# UPLOAD_DIR=./uploads
# ===== Translation Configuration (DIFY API) =====
# Enable translation feature
ENABLE_TRANSLATION=true
# DIFY API base URL
DIFY_BASE_URL=https://your-dify-instance.example.com/v1
# DIFY API key (get from DIFY dashboard)
DIFY_API_KEY=your-dify-api-key
# API request timeout in seconds
DIFY_TIMEOUT=120.0
# Maximum retry attempts
DIFY_MAX_RETRIES=3
# Batch translation limits
DIFY_MAX_BATCH_CHARS=5000
DIFY_MAX_BATCH_ITEMS=20
# ===== Background Tasks Configuration =====
TASK_QUEUE_TYPE=memory
# REDIS_URL=redis://localhost:6379/0
# ===== CORS Configuration =====
CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
# ===== Logging Configuration =====
LOG_LEVEL=INFO
LOG_FILE=./logs/app.log
# ===== Development & Testing Configuration =====
# Debug font path for visualization scripts
DEBUG_FONT_PATH=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
# Demo documents directory for testing
DEMO_DOCS_DIR=./demo_docs
# E2E test API base URL
E2E_API_BASE_URL=http://localhost:8000/api/v2
# E2E test credentials (set in .env.local for security)
# E2E_TEST_USER_EMAIL=test@example.com
# E2E_TEST_USER_PASSWORD=testpassword
# LOG_FILE defaults to backend/logs/app.log