Skip to content

feat: ClipPilot MVP — local-first video repair toolbox#1

Merged
StylesDevelopments merged 5 commits into
mainfrom
claude/clipforge-mvp-build-epq9io
Jun 20, 2026
Merged

feat: ClipPilot MVP — local-first video repair toolbox#1
StylesDevelopments merged 5 commits into
mainfrom
claude/clipforge-mvp-build-epq9io

Conversation

@StylesDevelopments

Copy link
Copy Markdown
Owner

A polished, self-hostable Next.js app for processing short videos, built
around a stabilise tool with an extensible job/tool abstraction.

Core

  • Landing page + workspace (upload → tool → process → preview/download)
  • Drag-and-drop upload with progress; type/size validation; ffprobe metadata
  • Stabilise via two-pass FFmpeg vid.stab (audio preserved); compress, convert,
    trim, thumbnail tools
  • Real per-step progress parsed from FFmpeg; cancel/cleanup; recent jobs
    (localStorage); before/after size delta

Architecture

  • Tool registry (catalog) + plan builders; in-memory job store + runner
  • Safe FFmpeg/ffprobe spawn wrappers (argv only, never a shell)
  • Filename sanitising + path-traversal-guarded file serving with HTTP ranges
  • Optional API token + CORS so it can be used as a headless API

Quality & ops

  • 31 Vitest unit tests; ESLint clean; TypeScript strict
  • Dockerfile (FFmpeg baked in) + docker-compose; standalone output
  • Icons, web manifest, touch icon, mobile viewport
  • README, .env.example, health endpoint, ffmpeg preflight script

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL

claude added 5 commits June 20, 2026 20:31
A polished, self-hostable Next.js app for processing short videos, built
around a stabilise tool with an extensible job/tool abstraction.

Core
- Landing page + workspace (upload → tool → process → preview/download)
- Drag-and-drop upload with progress; type/size validation; ffprobe metadata
- Stabilise via two-pass FFmpeg vid.stab (audio preserved); compress, convert,
  trim, thumbnail tools
- Real per-step progress parsed from FFmpeg; cancel/cleanup; recent jobs
  (localStorage); before/after size delta

Architecture
- Tool registry (catalog) + plan builders; in-memory job store + runner
- Safe FFmpeg/ffprobe spawn wrappers (argv only, never a shell)
- Filename sanitising + path-traversal-guarded file serving with HTTP ranges
- Optional API token + CORS so it can be used as a headless API

Quality & ops
- 31 Vitest unit tests; ESLint clean; TypeScript strict
- Dockerfile (FFmpeg baked in) + docker-compose; standalone output
- Icons, web manifest, touch icon, mobile viewport
- README, .env.example, health endpoint, ffmpeg preflight script

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL
Make storage and job state backend-agnostic, selected by env vars, so the
same code runs zero-config locally or cloud-native on Supabase + Cloud Run.

Storage adapters (src/lib/media/)
- MediaStore interface with local filesystem and Supabase Storage backends
- Runner downloads input → processes locally → uploads output (ephemeral-host
  friendly); file route streams locally or 302-redirects to a signed URL

Job store adapters (src/lib/jobs/)
- JobStoreBackend interface with in-memory and Supabase Postgres backends
- Runner owns the full lifecycle (prepare → probe → plan → run → finalise),
  with throttled progress writes to keep DB cost down; cancellation stays
  in-process

Config & ops
- Auto-detects Supabase when SUPABASE_URL + service-role key are set;
  STORAGE_BACKEND / JOBS_BACKEND can force either
- supabase/migrations/0001_jobs.sql (jobs table, RLS on)
- Dockerfile standalone image; scripts/deploy-cloudrun.sh (--no-cpu-throttling
  so background FFmpeg finishes); .gcloudignore
- /api/health reports active backends
- README: Supabase + Cloud Run guide; .env.example updated

Verified end-to-end on the local backend (stabilise + trim) after refactor;
build, lint and 31 unit tests all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL
One-click deploy from the Actions tab once GCP + Supabase secrets are set.
Manual (workflow_dispatch) only, so the branch shows no red checks beforehand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL
- Rotate: fix sideways/upside-down clips (transpose/flip), audio preserved
- GIF: two-pass palette render (palettegen/paletteuse) with fps/width + trim
- Wire .gif content types (file route + Supabase store); tool-picker grid
- Tests for both builders (35 total); verified end-to-end locally

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL
- supabase-migrate.yml: applies supabase/migrations/*.sql on push (and manual);
  safe no-op until SUPABASE_DB_URL secret is set, idempotent SQL
- deploy workflow also applies migrations before deploying, so one click does
  migrate + deploy
- README: document the automatic migration path

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01455aH5ej2EiFsnAdWxtpgL
@StylesDevelopments StylesDevelopments merged commit 022e74a into main Jun 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants