Pārlūkot izejas kodu

Update main README, finalize documentation cleanup

Timothy Pomeroy 1 mēnesi atpakaļ
vecāks
revīzija
1d848fdb2c
1 mainītis faili ar 89 papildinājumiem un 31 dzēšanām
  1. 89 31
      README.md

+ 89 - 31
README.md

@@ -1,52 +1,110 @@
-# Turborepo starter
+# Watch Finished Turbo
 
-This Turborepo starter is maintained by the Turborepo core team.
+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.
 
-## Using this example
+## Features
 
-Run the following command:
+- **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
 
-```sh
-npx create-turbo@latest
+## 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
+
+```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
 ```
 
-## What's inside?
+## 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
 
-This Turborepo includes the following packages/apps:
+### Docker Support
+```bash
+docker build .
+docker-compose up
+```
+
+## Configuration
 
-### Apps and Packages
+Dataset configurations are stored in the SQLite database. Each dataset defines:
+- Watch directories
+- Output destinations
+- File extensions to process
+- HandBrake presets
+- Filename cleaning rules
 
-- `web`: a [Next.js](https://nextjs.org/) app
-- `service`: a [NestJS](https://nestjs.com/) backend API
-- `cli`: a Node.js command-line interface for automation and scripting
-- `@repo/ui`: a stub React component library shared by the `web` application
-- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
-- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
+## API Endpoints
 
-### CLI Interface
+- `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
 
-The CLI provides comprehensive command-line access to all service functionality:
+## CLI Usage
 
-- **Task Management**: List, monitor, and configure the background task queue
-- **File Operations**: Manage file records and processing status
-- **Configuration**: View and modify system settings
-- **Maintenance**: Run cleanup, purge, and pruning operations
-- **HandBrake Integration**: Process video files with HandBrake presets
-- **Interactive Mode**: Menu-driven interface with guided prompts (**default behavior**)
+```bash
+# Interactive mode (recommended)
+pnpm run cli
 
-**Usage**: `pnpm run cli` (interactive) or `pnpm run cli <command>` (direct commands)
+# Direct commands
+pnpm run cli files:list --dataset movies
+pnpm run cli task:list
+pnpm run cli config:get datasets
+```
 
-Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
+## Database
 
-### Centralized Configuration & Data
+SQLite database stored at `data/database.db` containing:
+- **files**: Processed video metadata
+- **tasks**: Processing queue
+- **settings**: Configuration data
 
-- All persistent settings and configuration are stored in a single SQLite database at `data/config.db` at the monorepo root.
-- All apps (service, CLI, web) read and write settings/configuration from this central database.
-- This ensures a single source of truth for configuration and enables seamless integration between all parts of the stack.
+See `data/README.md` for schema details.
 
-**If you move or rename the database, update the path in `apps/service/src/db.service.ts` and any other relevant locations.**
+## Documentation
 
-### Utilities
+- **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: