4348f76a7cf519a4e3e4d8fc507ff93936c60136
q-buffer
A production-ready monorepo that orchestrates qBittorrent torrents in a controlled playback loop with strict peer enforcement.
Overview
- Backend: Node.js + TypeScript + Express + socket.io
- Frontend: React + Vite + TypeScript (shadcn-style UI)
- Storage: JSON file DB with atomic writes and mutex
- Docker: dev (two containers) and prod (single container)
Quick Start
- Copy
.env.exampleto.envand fill values. - Start dev stack:
docker-compose -f docker-compose.dev.yml up --build
- Open:
- Web: http://localhost:5173
- API/Socket: http://localhost:3001
Production
docker-compose up --build
Features
- Login with env-configured credentials (JWT httpOnly cookie)
- Torrent list and selection
- Torrent archive to
/data/torrents/{hash}.torrent - Loop engine with delete/re-add between runs
- Aggressive allow-IP enforcement (peer ban when supported)
- Dry run report and profiles
- Real-time status/logs via socket.io
Environment Variables
QBIT_BASE_URL,QBIT_USERNAME,QBIT_PASSWORDAPP_USERNAME,APP_PASSWORD,JWT_SECRETPOLL_INTERVAL_MS,ENFORCE_INTERVAL_MS,DEFAULT_DELAY_MS,MAX_LOOP_LIMIT
Folder Layout
apps/server: Express API + socket.ioapps/web: Vite React UIdata: JSON DB, logs, torrent archive
Notes
- If magnet metadata generation fails, use Advanced upload to provide
.torrentmanually. - The loop engine deletes downloaded data between loops.
Description
Languages
TypeScript
96.9%
CSS
1.5%
Dockerfile
0.8%
JavaScript
0.5%
HTML
0.3%