watch-finished-turbo

Timothy Pomeroy 1d848fdb2c Update main README, finalize documentation cleanup 1 mês atrás
.vscode 7b7c4f0ac9 Initial commit 1 mês atrás
apps b63ce13163 Update READMEs, add data README, remove legacy code, move dev notes to docs 1 mês atrás
data b63ce13163 Update READMEs, add data README, remove legacy code, move dev notes to docs 1 mês atrás
docs b63ce13163 Update READMEs, add data README, remove legacy code, move dev notes to docs 1 mês atrás
packages 7b7c4f0ac9 Initial commit 1 mês atrás
.gitignore 7b7c4f0ac9 Initial commit 1 mês atrás
.npmrc 7b7c4f0ac9 Initial commit 1 mês atrás
Dockerfile b63ce13163 Update READMEs, add data README, remove legacy code, move dev notes to docs 1 mês atrás
README.md 1d848fdb2c Update main README, finalize documentation cleanup 1 mês atrás
docker-compose.yml 7b7c4f0ac9 Initial commit 1 mês atrás
package.json 7b7c4f0ac9 Initial commit 1 mês atrás
pnpm-lock.yaml b63ce13163 Update READMEs, add data README, remove legacy code, move dev notes to docs 1 mês atrás
pnpm-workspace.yaml 7b7c4f0ac9 Initial commit 1 mês atrás
turbo.json 7b7c4f0ac9 Initial commit 1 mês atrás

README.md

Watch Finished Turbo

A modern, full-stack video processing system built with Turborepo. Automatically monitors directories, processes videos with HandBrake, and provides a complete web interface for management.

Features

  • File Watching: Automatic detection and processing of new video files
  • Video Processing: HandBrake integration with configurable presets
  • Web Interface: Modern Next.js dashboard for monitoring and management
  • REST API: NestJS backend with WebSocket real-time updates
  • CLI Tool: Command-line interface for automation and scripting
  • Task Queue: Background processing with progress tracking
  • Maintenance Tools: Cleanup, purge, and prune operations
  • SQLite Database: Centralized data storage for files, tasks, and settings

Architecture

This monorepo contains:

Apps

  • apps/web: Next.js 14 web interface with real-time updates
  • apps/service: NestJS API server with WebSocket support
  • apps/cli: Node.js command-line interface

Packages

  • packages/eslint-config: Shared ESLint configurations
  • packages/typescript-config: Shared TypeScript configurations
  • packages/ui: Shared React components (stub)

Quick Start

# Install dependencies
pnpm install

# Start all services (web + API)
pnpm run dev

# Or start individually
pnpm run web      # Web interface on :3000
pnpm run service  # API server on :3001
pnpm run cli      # Interactive CLI

Development

Prerequisites

  • Node.js 20+
  • pnpm package manager
  • HandBrake CLI (installed automatically in Docker)

Available Scripts

  • pnpm run dev - Start all services with hot reload
  • pnpm run build - Build all apps
  • pnpm run lint - Run ESLint
  • pnpm run test - Run tests

Docker Support

docker build .
docker-compose up

Configuration

Dataset configurations are stored in the SQLite database. Each dataset defines:

  • Watch directories
  • Output destinations
  • File extensions to process
  • HandBrake presets
  • Filename cleaning rules

API Endpoints

  • GET /files - List processed files
  • POST /watcher/start - Start file monitoring
  • GET /tasks - View processing queue
  • POST /maintenance/cleanup - Clean up files
  • WebSocket events for real-time updates

CLI Usage

# Interactive mode (recommended)
pnpm run cli

# Direct commands
pnpm run cli files:list --dataset movies
pnpm run cli task:list
pnpm run cli config:get datasets

Database

SQLite database stored at data/database.db containing:

  • files: Processed video metadata
  • tasks: Processing queue
  • settings: Configuration data

See data/README.md for schema details.

Documentation

  • API Docs: See apps/service/README.md
  • Web Interface: See apps/web/README.md
  • CLI Guide: See apps/cli/README.md
  • Development: See docs/DEVELOPMENT_NOTES.md

This Turborepo has some additional tools already setup for you:

Build

To build all apps and packages, run the following command:

cd my-turborepo

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo build

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo build
yarn dlx turbo build
pnpm exec turbo build

You can build a specific package by using a filter:

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo build --filter=web

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo build --filter=web
yarn exec turbo build --filter=web
pnpm exec turbo build --filter=web

Develop

To develop all apps and packages, run the following command:

cd my-turborepo

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo dev

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo dev
yarn exec turbo dev
pnpm exec turbo dev

You can develop a specific package by using a filter:

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo dev --filter=web

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo dev --filter=web
yarn exec turbo dev --filter=web
pnpm exec turbo dev --filter=web

Remote Caching

[!TIP] Vercel Remote Cache is free for all plans. Get started today at vercel.com.

Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:

cd my-turborepo

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo login

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo login
yarn exec turbo login
pnpm exec turbo login

This will authenticate the Turborepo CLI with your Vercel account.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

# With [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation) installed (recommended)
turbo link

# Without [global `turbo`](https://turborepo.com/docs/getting-started/installation#global-installation), use your package manager
npx turbo link
yarn exec turbo link
pnpm exec turbo link

Useful Links

Learn more about the power of Turborepo: