A full-stack web application for downloading YouTube videos with a modern React frontend and a Node.js backend API powered by yt-dlp.
- Video Information Retrieval: Fetch video metadata including title, thumbnail, duration, and available quality options.
- Flexible Downloads: Download videos in various qualities (360p, 480p, 720p, 1080p, Best Available up to 4K).
- Real-time Progress: Monitor download progress through Server-Sent Events (SSE).
- Automatic Cleanup: Downloaded files are automatically deleted after 10 minutes or on client disconnect.
- Responsive UI: Modern, dark/light theme toggleable interface built with React and Tailwind CSS.
- Caching: Video info is cached to improve performance and reduce API calls.
- Node.js with Express.js
- yt-dlp for video downloading and metadata extraction
- CORS for cross-origin requests
- File system operations for temporary file management
- React 19 with Vite for fast development and building
- Tailwind CSS for styling
- Radix UI components for accessible UI elements
- React Router for navigation
- Lucide React for icons
- Motion for animations
- Node.js (v14 or higher)
- npm or yarn
- yt-dlp installed on your system (see installation instructions below)
winget install yt-dlpbrew install yt-dlpsudo apt install yt-dlp # Ubuntu/Debian
# or
sudo dnf install yt-dlp # Fedora- Clone the repository:
git clone <repository-url>
cd youtubeDl- Install backend dependencies:
cd backend
npm install- Install frontend dependencies:
cd ../frontend
npm install- Start the backend server:
cd backend
npm run devThe backend will run on http://localhost:5000
- Start the frontend development server:
cd frontend
npm run devThe frontend will run on http://localhost:5173 (default Vite port)
- Open your browser and navigate to the frontend URL to use the application.
Fetch video information and available formats.
Request Body:
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}Response:
{
"title": "Video Title",
"thumbnail": "https://...",
"duration": "10:30",
"formats": [
{
"formatId": "bv*+ba/b",
"quality": "Best Available (4K/2K)",
"container": "mp4"
},
{
"formatId": "bv*[height=1080]+ba/b[height=1080]",
"quality": "1080p",
"container": "mp4"
}
// ... more formats
]
}Download a video with progress updates via Server-Sent Events.
Query Parameters:
url: YouTube video URLformat: Format ID from the /info endpoint
Response: Server-Sent Events stream with progress updates, ending with a download link.
Download the processed video file.
Query Parameters:
path: Encoded filename from the download endpoint
youtubeDl/
├── backend/
│ ├── index.js # Main Express server
│ ├── package.json # Backend dependencies
│ └── downloads/ # Temporary download directory (auto-created)
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main React app
│ │ ├── Hero.jsx # Landing page hero section
│ │ ├── components/ # Reusable UI components
│ │ │ ├── Navbar.jsx
│ │ │ ├── Features.jsx
│ │ │ ├── HowItWorks.jsx
│ │ │ ├── FAQ.jsx
│ │ │ └── ui/ # Radix UI components
│ │ └── context/ # React contexts
│ ├── package.json # Frontend dependencies
│ └── vite.config.js # Vite configuration
└── readme.md # This file
npm run dev: Start development server with nodemon
npm run dev: Start Vite development servernpm run build: Build for productionnpm run preview: Preview production buildnpm run lint: Run ESLint
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.
This application is for educational purposes only. Please respect YouTube's Terms of Service and copyright laws when downloading content. The developers are not responsible for any misuse of this tool.