A modern video downloader application built with SvelteKit and Express.js, featuring real-time progress updates via Socket.IO. Download videos from various platforms using yt-dlp with a clean, responsive interface.
The application supports two download modes:
yt-dlp binary (installed globally or placed in backend/ directory)Clone the repository:
git clone https://github.com/alexdonu/svelte-video-downloader.git
cd svelte-video-downloader
Install frontend dependencies:
npm install
Install backend dependencies:
cd backend
npm install
cd ..
Install yt-dlp (if not already installed):
```bash
brew install yt-dlp
## Development
Start both frontend and backend in development mode:
```bash
# Start both servers concurrently
npm run start:all
# Or start them separately:
# Frontend (http://localhost:5173)
npm run dev
# Backend (http://localhost:3000)
npm run backend:dev
Build the frontend:
npm run build
npm run preview
Start the backend in production:
npm run backend
āāā src/ # SvelteKit frontend
ā āāā lib/
ā ā āāā components/ # Svelte components
ā ā āāā stores/ # State management
ā ā āāā utils/ # API utilities
ā āāā routes/ # SvelteKit routes
āāā backend/ # Express.js backend
ā āāā downloads/ # Downloaded videos storage
ā āāā server.js # Main server file
ā āāā package.json # Backend dependencies
āāā CLAUDE.md # Development guidance
POST /api/info - Get video metadata and available formatsPOST /api/download - Add video to download queuePOST /api/download-stream - Stream download directly to client deviceGET /api/queue - Get current download queue statusPOST /api/queue/pause/:id - Pause active downloadPOST /api/queue/resume/:id - Resume paused downloadPOST /api/queue/cancel/:id - Cancel downloadDELETE /api/queue/:id - Remove from queue and delete filesPOST /api/queue/clear-completed - Clear completed downloadsPOST /api/queue/concurrent-limit - Set max concurrent downloadsGET /api/downloads - List downloaded filesPOST /api/open-folder - Open file in system file managerDELETE /api/delete-file - Delete downloaded filedownload-progress - Real-time download progress updatesqueue-update - Download queue status changesdownloads-updated - Downloaded files list updatesfile-deleted - File deletion notificationsstatus-message - System status messagesdownload-completed - Download completion notificationsconnect - Connection establisheddisconnect - Connection lostconnect_error - Connection failedreconnect - Connection restoredreconnect_error - Reconnection failed