This project is a YouTube Downloader API built with FastAPI for the backend and React for the frontend. It allows users to download YouTube videos in various formats.
- Download YouTube videos in different formats (audio/video).
- Serve downloaded files via HTTP.
- React frontend for user interaction.
- CORS enabled for frontend-backend communication.
- Backend: FastAPI, Python, yt-dlp
- Frontend: React, TypeScript, Tailwind CSS
- Database: PostgreSQL (for future enhancements)
- CI/CD: GitHub Actions
- Python 3.11
- Node.js 18
- npm
- PostgreSQL (for future enhancements)
-
Clone the repository:
git clone https://github.com/RohanCyberOps/YoutubeDL.git cd YoutubeDL
-
Set up the backend:
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate` pip install -r src/server/requirements.txt
-
Set up the frontend:
cd src/app npm install
-
Start the backend server:
source .venv/bin/activate # On Windows use `.venv\Scripts\activate` uvicorn src/server/main:app --host 127.0.0.1 --port 8000
-
Start the frontend server:
cd src/app npm run dev
GET /
: Welcome message.POST /download
: Download a YouTube video.GET /download/{file_id}
: Serve the downloaded file.
To download a video, send a POST request to /download
with the following JSON body:
{
"url": "https://youtu.be/your_video_id",
"format": "video"
}
The project uses GitHub Actions for continuous integration and deployment. The workflow is defined in .github/workflows/main.yml
.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any inquiries, please contact RohanCyberOps.