# 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.
## System Overview
```mermaid
graph TB
subgraph "User Interfaces"
WEB[Web Dashboard
Next.js + React]
CLI[Command Line
Node.js CLI]
end
subgraph "API Service"
NEST[NestJS Server
REST + WebSocket]
end
subgraph "Core Services"
WATCH[File Watcher
Chokidar]
QUEUE[Task Queue
Background Processing]
HANDBRAKE[Video Encoder
HandBrake CLI]
end
subgraph "Data Storage"
DB[(SQLite Database
Files & Tasks)]
end
subgraph "File System"
INPUT[Input Directories
Video Files]
OUTPUT[Output Directories
Processed Videos]
end
WEB --> NEST
CLI --> NEST
NEST --> WATCH
NEST --> QUEUE
QUEUE --> HANDBRAKE
WATCH --> DB
QUEUE --> DB
HANDBRAKE --> DB
WATCH --> INPUT
HANDBRAKE --> OUTPUT
style WEB fill:#e3f2fd
style NEST fill:#f3e5f5
style DB fill:#e8f5e8
style INPUT fill:#fff3e0
style OUTPUT fill:#e0f2f1
```
## Quick Start
```bash
# 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
```
## Documentation
For detailed information, see:
- **[Web Interface](apps/web/README.md)** - Next.js dashboard documentation
- **[API Service](apps/service/README.md)** - NestJS backend and API reference
- **[CLI Tool](apps/cli/README.md)** - Command-line interface guide
- **[Database Schema](data/README.md)** - SQLite database structure
- **[Development Notes](docs/DEVELOPMENT_NOTES.md)** - Setup and development guide
## Project Structure
```
├── apps/
│ ├── web/ # Next.js web interface
│ ├── service/ # NestJS API server
│ └── cli/ # Command-line interface
├── packages/ # Shared configurations
├── data/ # SQLite database
├── docs/ # Documentation
└── scripts/ # Build scripts
```
```mermaid
graph TD
ROOT[watch-finished-turbo/] --> APPS[apps/]
ROOT --> PACKAGES[packages/]
ROOT --> DATA[data/]
ROOT --> DOCS[docs/]
ROOT --> SCRIPTS[scripts/]
ROOT --> CONFIG[Configuration Files
package.json, turbo.json, etc.]
APPS --> WEB[web/
Next.js UI]
APPS --> SERVICE[service/
NestJS API]
APPS --> CLI[cli/
Node.js CLI]
PACKAGES --> ESLINT[eslint-config/
Shared linting]
PACKAGES --> TSCONFIG[typescript-config/
Shared TS config]
PACKAGES --> UI[ui/
Shared components]
DATA --> DB[(database.db
SQLite)]
DATA --> BACKUP[database.db.bak]
DOCS --> ARCH[architecture.md
System design]
DOCS --> DEV[DEVELOPMENT_NOTES.md
Dev guide]
DOCS --> CLI_DOCS[cli.md
CLI reference]
WEB --> W_SRC[src/app/
Pages]
WEB --> W_COMP[src/components/
UI components]
WEB --> W_LIB[src/lib/
Utilities]
SERVICE --> S_SRC[src/
Controllers & Services]
SERVICE --> S_TEST[test/
Unit tests]
CLI --> C_SRC[src/
CLI commands]
CLI --> C_BIN[bin/
Entry point]
style ROOT fill:#e3f2fd
style APPS fill:#f3e5f5
style PACKAGES fill:#e8f5e8
style DATA fill:#fff3e0
style DOCS fill:#fce4ec
```