clipwright/.env.example
pedro-bento 59e0db8c24 chore: remove dead code, unused assets, and the server-render chain
Backend:
- Drop unused imports/locals and zero-reference helpers (truncate_ip,
  in_split, GEMINI_PROMPT_TEMPLATE, legacy subtitles SRT path, dead paths)
- Remove unwired features (delete_uploaded, mark_ai_generated, unmark_job,
  compact_words, restoring_static restorer hook, gemini_worker __main__)
- Remove shelved panel_layout module + its flags/tests
- Remove the /api/render proxy + RENDER_SERVICE_URL

Frontend:
- Delete App.css, react.svg, vite.svg, agent screenshot, demo mp4s
- Remove dead exports (downloadBlobUrl, consent reopen machinery, dead zod
  schemas/CITED_STATS) and unused deps (@remotion/media-utils, zod)
- Drop the /render dev proxy; rewrite dashboard README

Repo/config:
- Delete render-service/ and top-level remotion/ (superseded by the
  dashboard's in-browser Remotion copy); drop the compose renderer service
- Delete docker-compose.e2e.local.yml and 4 unreferenced screenshots
- Prune .env.example dead keys, add GEMINI_API_KEY/MAX_CONCURRENT_JOBS
- Tighten .dockerignore/.gitignore; add dashboard lint to CI
- Fix stale compliance doc + README structure

Backend 709 passed / 18 skipped; dashboard lint+build green; compose valid.
2026-10-04 21:24:42 +01:00

100 lines
4.7 KiB
Text

# Google Gemini API key used server-side (moment detection, layouts, titles and
# thumbnails). The dashboard can also send a key per request, and the key is
# optional entirely when LLM_BASE_URL points at an OpenAI-compatible server.
# GEMINI_API_KEY=your_gemini_api_key
# YouTube cookies (optional — paste Netscape-format cookies to bypass bot detection)
# YOUTUBE_COOKIES=...
# Pre-flight quality gate: warn before processing a YouTube source below this
# height (720p default; 0 disables). Only applies to URL sources.
# QUALITY_GATE_MIN_HEIGHT=720
# Whisper transcription model (main pipeline). "small" is better than "base" on
# non-English audio; "base" is faster. device/compute for GPU tuning.
# Prod GPU: WHISPER_MODEL=large-v3-turbo WHISPER_DEVICE=cuda WHISPER_COMPUTE=float16
# WHISPER_MODEL=small
# WHISPER_DEVICE=cpu
# WHISPER_COMPUTE=int8
# Transcription backend: whisper (default) | parakeet. Parakeet (NVIDIA
# parakeet-tdt-0.6b-v3 via onnx-asr, GPU image only) is ~2x faster than
# whisper-turbo-GPU and auto-falls-back to whisper on errors or languages
# outside its 25 European ones.
# TRANSCRIBE_BACKEND=whisper
# Concurrent GPU transcriptions (parakeet or whisper-on-cuda). Keep 1.
# ASR_GPU_CONCURRENCY=1
# Concurrent pipeline jobs (default 5).
# MAX_CONCURRENT_JOBS=5
# Video encoder for all ffmpeg encodes: x264 (default) | nvenc | auto.
# auto probes h264_nvenc once at startup and falls back to x264 if unusable.
# FFMPEG_ENCODER=x264
# Product analytics (optional, off by default). Both are read by the dashboard
# at BUILD time. Leave them unset and the frontend initialises no analytics and
# loads no third-party script. Set them to your own OpenPanel instance — and add
# your hostname to ANALYTICS_HOSTS in dashboard/index.html — to collect your own.
# VITE_OPENPANEL_API_URL=https://api.openpanel.example.com
# VITE_OPENPANEL_CLIENT_ID=your_openpanel_client_id
# Thumbnail Studio: creative text model (titles, concepts) and the image model.
# Not tied to GEMINI_MODEL on purpose: flash-lite is fine for closed choices,
# visibly worse at titles.
GEMINI_MODEL_THUMBNAIL=gemini-3.7-flash
GEMINI_IMAGE_MODEL=gemini-3.1-flash-image
# Moment picker on your own model instead of Gemini (self-host). Any
# OpenAI-compatible chat endpoint: Ollama, LM Studio, vLLM, llama.cpp,
# LocalAI, OpenRouter. With this set the Gemini key is optional; it is still
# used, if present, for the frame-based stages (layout picker, silent videos).
# Ollama needs a context above its 4096 default: OLLAMA_CONTEXT_LENGTH=16384.
# LLM_BASE_URL=http://host.docker.internal:11434/v1
# LLM_MODEL=qwen2.5:14b
# LLM_API_KEY=
# LLM_SCORE_BATCH=3
# LLM_TIMEOUT=600
# ---------------------------------------------------------------------------
# Privacy and access control (GDPR remediation, 4-sep-2026)
# ---------------------------------------------------------------------------
# Absolute base URL of the API as the internet reaches it, used for the
# absolute clip URLs in webhook payloads.
# PUBLIC_API_URL=https://your-host
# /videos and /thumbnails are public static mounts in this fork: there is no
# media-token auth. Anyone who holds a job id can fetch that job's clips, and
# the /videos mount refuses non-deliverable files (transcripts, metadata
# sidecars, dotfiles) so only media is exposed. Files are swept with the job
# (JOB_RETENTION_SECONDS).
# ---------------------------------------------------------------------------
# Publishing (self-hosted Postiz)
# ---------------------------------------------------------------------------
# Base URL of your own self-hosted Postiz instance (no trailing slash) and its
# API key. Point POSTIZ_URL at your instance; do not rely on any built-in
# default. Required for the server-side publishing, queue and analytics calls
# (the dashboard can also send the user's X-Postiz-Url / X-Postiz-Key headers
# per request). Postiz holds the social platform tokens; Clipwright only
# uploads clip bytes.
# POSTIZ_URL=https://your-postiz-host
# POSTIZ_API_KEY=your_postiz_api_key
# ---------------------------------------------------------------------------
# Upload size
# ---------------------------------------------------------------------------
# Maximum upload size in MB. 0 (the default) means unlimited. Set a positive
# number to cap uploads and reject larger files with HTTP 413.
# MAX_FILE_SIZE_MB=0
# X-Forwarded-For trust. The container launches uvicorn with
# `--proxy-headers --forwarded-allow-ips *` (see the Dockerfile CMD), so any
# caller that can reach the port may declare its own address and scheme. This
# is not configurable via an environment variable: run the API behind a reverse
# proxy that overwrites X-Forwarded-For, and never publish the backend port
# directly to the internet.