A Bun-hosted media library built with Next.js. Application records, settings, and the durable background-work queue are stored in data/clips.db through bun:sqlite.
- Bun 1.3 or later
ffmpegavailable onPATH
bun installThe database is created automatically at ./data/clips.db on the first application or worker start. Configure a different location with DB.
DB=./data/clips.db
DATA_PATH=./data
PORT=3000
ADMIN_PASSWORD=your_admin_password
AUTH_SECRET=replace_with_a_long_random_secretADMIN_PASSWORD and AUTH_SECRET are required for the administrative API.
AUTH_SECRET must contain at least 32 characters.
To explicitly install a generated secret into .env, run:
bun run auth:secretThe command does not overwrite an existing value unless --force is supplied.
Hidden clips are unlisted: they are excluded from the homepage and public search, but anyone who has the clip's direct ID can watch or download it.
Start the web application:
bun run devIn a separate terminal, start the in-process SQLite worker:
bun run worker:startFor production:
bun run build
# Start both web server and worker in one terminal (useful for screen/tmux):
bun run start:all
# Or run them in separate terminals/services:
bun run start
bun run worker:startThe worker claims one durable SQLite job at a time. Jobs interrupted by a process crash are recovered after their lease expires; failed jobs are retried up to three times. Keep a single app/worker deployment against each database file.
The project was originally architected around Node.js, PostgreSQL (with Prisma ORM), Redis (with BullMQ), and Docker Compose. It has since been migrated to a lightweight, zero-external-service setup running natively on Bun and SQLite:
- Docker & PostgreSQL Removal (
0925d7b— feat: switch to Bun and SQLite from Node and PostgreSQL; drop Dockerized setup):- Removed Docker (
Dockerfile,docker-compose.yml) and containerized dependencies. - Replaced PostgreSQL and Prisma with native
bun:sqlite. - Replaced Redis and BullMQ with an in-process, durable SQLite worker queue.
- Removed Docker (
- Workflow Cleanup (
a376cc6— refactor: simplify video storage schema):- Removed Docker CI/CD publish workflows (
.github/workflows/docker-publish.yml). - Streamlined the database schema and storage layout.
- Removed Docker CI/CD publish workflows (
- Post-Migration Cleanup:
- Removed transition scripts (
migrate-sqlite3.ts,delete-postgresql.ts), legacy database backup artifacts, and compatibility shim layers after migration completion.
- Removed transition scripts (