From f68cc0ca2712ec583f4c54b9fb7d50e9869d37fa Mon Sep 17 00:00:00 2001 From: szbk Date: Tue, 21 Oct 2025 19:53:32 +0300 Subject: [PATCH] Added readme --- Readme.md | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..f81aa34 --- /dev/null +++ b/Readme.md @@ -0,0 +1,113 @@ +# dupe β€” Simple, Fast & Lightweight Torrent Server βš‘πŸ“¦ + +A **self-hosted torrent-based file manager and media player**, similar to Put.io β€” fast, minimal, and elegant. +Add torrents, monitor downloads, and instantly stream videos through a clean web interface! πŸ–₯️🎬 + +--- + +## ✨ Features + +- 🧲 **Add Torrents** + - Upload `.torrent` files (via form) + - Add magnet links (via prompt) + +- πŸ“₯ **Download Management** + - View active torrents + - See progress, speed, and remaining time + - Browse file trees within torrents + +- πŸ”΄ **Real-Time Updates** + - Live progress updates via WebSocket + +- 🎞️ **Instant Playback** + - Stream video files directly in the browser + - ffmpeg-ready structure for Safari/codec compatibility + +- πŸ—‚οΈ **Clean & Modern Web Interface** + - Svelte-powered fast and lightweight UI + - Search bar, torrent list, detailed view + - Custom modal video player: title, progress bar, volume, subtitles, and download icons + - Mobile-friendly layout with hamburger menu support + +- 🐳 **Easy Docker Setup** + - One-command deployment with `docker-compose.yml` + +> πŸ“ Login and user authentication are not yet implemented β€” planned in the roadmap. + +--- + +## πŸ—οΈ Architecture + +``` +root +β”œβ”€ client/ # Svelte-based Web UI +β”œβ”€ server/ # Node.js (Express) API + WebSocket + WebTorrent +└─ docker-compose.yml +``` + +- **client** + - Developed and built using Vite + - Backend API configured via `VITE_API` (e.g., `http://192.168.x.x:3001`) + +- **server** + - Express REST endpoints (list, add, stream torrents) + - Real-time updates via WebSocket (`progress` events) + - WebTorrent for downloading and seeding + - Optional ffmpeg integration for video transcoding + +--- + +## πŸš€ Quick Start + +### 🐳 Docker Compose (Recommended) +```bash +docker compose up -d --build +``` + +**Default Ports:** +- Server (API): `http://localhost:3001` +- Client (UI): `http://localhost:5173` + +--- + +## βš™οΈ Environment Variables + +### Client +| Variable | Description | +|-----------|--------------| +| `VITE_API` | Backend API root URL (e.g., `http://localhost:3001`) | + +### Server +| Variable | Description | +|-----------|--------------| +| `PORT` | API port (default: `3001`) | + +--- + +## πŸ”Œ API & WebSocket Endpoints + +| Method | URL | Description | +|--------|-----|-------------| +| `GET` | `/api/torrents` | Returns active torrents | +| `POST` | `/api/transfer` | Adds a torrent via `.torrent` file upload | +| `POST` | `/api/magnet` | Adds a torrent via magnet link | +| `GET` | `/stream/:infoHash/:fileIndex` | Streams a video or file | +| `WS` | `ws://:3001/` | Torrent progress updates (`type: progress`) | + +--- + +## 🧠 Developer Notes + +- **Safari Compatibility:** Some codecs may cause issues. It’s recommended to remux files (`.mkv β†’ .mp4`) with ffmpeg if needed. + +--- + +## πŸ›£οΈ Roadmap + +- πŸ” Authentication (JWT or session-based) +- 🧩 TheMovieDB / TVDB / MusicBrainz integrations +- πŸŽ›οΈ Advanced player features (subtitle selection, quality control) +- 🧹 File management, trash bin, and history +- πŸ§ͺ Automated testing and CI setup + +---