video-master-adapt/.env.example
nickviljoen 891c36bbfb Add standalone desktop application with web interface
Major Features:
- 🖥️ Standalone desktop app (VideoMatcher.app) - double-click to run
- 🎨 Black & gold branded UI (Montserrat font, #FFC407 accent)
- 📁 Local file browser for master/adaptation folders
-  Fast mode processing (10-20x faster, disables AKAZE/AI Vision)
- 🤖 Smart AI Vision fallback (auto-retry when no matches found)
- 📊 Real-time progress bars (fingerprinting & matching)
- 💾 Local processing (no cloud, no authentication)
- 📤 CSV export with master filenames

Web Application (Enterprise):
- 🌐 Flask web app with Azure AD authentication
- 📦 Box.com integration for cloud storage
- 🐳 Docker support for deployment
- 🔐 JWT validation with httpOnly cookies
- 🎯 REST API endpoints

Enhancements:
- Fixed master filename lookup (was showing "Unknown")
- Automatic fingerprint recovery (detects missing files)
- Improved CSV format (master file next to adaptation)
- Port conflict handling (auto-finds available port)
- Environment variable fixes for standalone mode

Documentation:
- Updated README with standalone app section
- Added 10+ guide documents (UI improvements, fingerprint recovery, etc.)
- Build instructions with PyInstaller
- Comprehensive troubleshooting guide

Technical:
- PyInstaller build configuration (video_matcher.spec)
- Launcher with environment setup (launcher.py)
- Mock authentication for standalone mode
- Video matcher service layer
- Metadata parser and AKAZE video matching

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 09:49:04 +02:00

100 lines
3.8 KiB
Text

# =============================================================================
# FLASK CONFIGURATION
# =============================================================================
FLASK_APP=app.py
FLASK_ENV=development
# Generate a secure secret key using: python3 -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=dev-secret-key-change-in-production-CHANGE-THIS
HOST=0.0.0.0
PORT=7183
DEBUG=True
# =============================================================================
# AZURE AD AUTHENTICATION (Same as reference app)
# =============================================================================
AZURE_TENANT_ID=e519c2e6-bc6d-4fdf-8d9c-923c2f002385
AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
# =============================================================================
# BOX.COM CONFIGURATION
# =============================================================================
# Path to Box JWT config file (to be provided by your manager)
BOX_CONFIG_PATH=config/box_config.json
# Root folder ID for browsing videos (to be provided)
BOX_ROOT_FOLDER_ID=
# =============================================================================
# VIDEO PROCESSING SETTINGS
# =============================================================================
# Directory for temporary video downloads
VIDEO_TEMP_DIR=tmp/video_downloads
# Maximum videos per matching job
MAX_VIDEOS_PER_JOB=20
# File Size Limits (Safety Features)
MAX_FILE_SIZE=2147483648 # 2GB per file max
MAX_JOB_SIZE=10737418240 # 10GB total per job max
WARNING_FILE_SIZE=524288000 # 500MB warning threshold
MIN_DISK_SPACE_GB=10 # Minimum 10GB free space required
# Cleanup Settings
CLEANUP_AGE_HOURS=24 # Delete temp files older than 24 hours
AUTO_CLEANUP=true # Automatically cleanup after jobs complete
# Data directory for masters and fingerprints
DATA_DIR=data
# Enable/disable video matcher features
ENABLE_AI_VISION=true
ENABLE_AKAZE=true
ENABLE_METADATA_FILTER=true
# =============================================================================
# OPENAI API CONFIGURATION (for AI Vision matching)
# =============================================================================
# Required for AI Vision (GPT-4o) cross-aspect-ratio matching
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_api_key_here
# HOW AI VISION WORKS:
# - Tier 3 fallback using GPT-4o for cross-aspect-ratio matching
# - Automatically triggered when perceptual hashing fails
# - Cost: ~$0.005-0.007 per comparison
# - To disable: leave blank or comment out
# =============================================================================
# LOGGING CONFIGURATION
# =============================================================================
LOG_LEVEL=INFO
ACCESS_LOG=logs/access.log
ERROR_LOG=logs/error.log
# =============================================================================
# PRODUCTION DEPLOYMENT NOTES
# =============================================================================
# For production deployment:
# 1. Set FLASK_ENV=production
# 2. Set DEBUG=False
# 3. Generate a strong SECRET_KEY
# 4. Configure Box API credentials
# 5. Update Azure AD redirect URI in Azure portal
# 6. Use environment-specific configuration (AWS Secrets Manager, Azure Key Vault, etc.)
# =============================================================================
# SECURITY NOTES
# =============================================================================
# - This .env file is in .gitignore and will NOT be committed
# - Never commit secrets or API keys to version control
# - Use cloud provider secrets management in production
# - Rotate SECRET_KEY periodically
# - Keep Box JWT config file secure (600 permissions recommended)