Skip to content

PBXg33k/php-download-router

Repository files navigation

PHP Download Router

WIP - Do not use in production!

Description

An API Platform powered API service which allows downloading files using various backends.

It is meant to be used as ingest service to centralize download requests to various platforms. Instead of using multiple downloaders, you can just use this single service.

It routes download requests to the following backends based on their supported domains:

  • yt-dlp (YouTube and many other video platforms)
  • gallery-dl (Image hosting platforms)

More to be added in the future.

Features

  • Download files from various platforms using a single API
  • Support for multiple backends
  • Asynchronous processing of download (depending on number of workers)
  • Easy to extend with additional backends
    • Just create a new class implementing the App\Service\Downloader\DownloaderInterface and it's automatically registered
  • Dockerized for easy deployment
  • API documentation with Swagger UI
  • Compatibility tested with the following MeTube browser extensions. INSTRUCTIONS

Future Plans (in no particular order)

  • Add more backends for different platforms
  • Implement authentication and authorization
  • Add support for scheduling downloads
  • Add support for monitoring URLS (periodic checks for new content)
  • Implement retry mechanism for failed downloads
  • Add support for different file formats and quality options
  • Implement user management and quotas
  • Add support for proxy servers
  • Implement notifications (email, SMS, webhooks, etc.) for completed downloads
  • Implement caching for frequently downloaded files
  • Add monitoring and logging features (partially done)
  • Implement rate limiting to prevent abuse
  • Implement a frontend for easier interaction with the API

Requirements

  • Docker
  • Docker Compose (recommended)

Footnotes

Usage of AI assisted code generation

Usage of AI assistance during code development

I (PBXg33k) use GitHub Co-pilot to assist me during code development. GitHub Copilot suggests code snippets based on the context of the file I'm working on. I heavily scrutinize and review every suggestion made by the AI, to ensure quality and correctness. Suggested code is not blindly accepted, but undergoes scrutiny and testing before being accepted.

I treat AI as a Junior developer, who needs to be supervised and reviewed by a senior developer.

Usage of AI assistance on issues and pull requests

Some issues of this project were addressed using AI assisted code generation (GitHub Copilot).

This decision was made to speed up development time, since this is a one-person project and I have limited time to work on it. This is a side project and a hobby, if you want to support me, consider buying me a coffee: https://buymeacoffee.com/pbxg33k

Every code change made with the help of AI was manually reviewed, heavily scrutinized and tested to ensure quality and correctness.

AI is only used to generate boilerplate code, repetitive tasks and to get suggestions for implementation details. Code is generated by using extensive explanation prompts, to ensure the generated code is as close as possible to the desired outcome. Generated code undergoes heavier scrutiny and testing than regular code.

See the following issues and pull requests for reference:

About

Central Download server attempt

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors 3

  •  
  •  
  •