README 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # -*- mode: org; org-html-head-include-default-style: nil; org-html-postamble: nil; after-save-hook: org-md-export-to-markdown; -*-
  2. #+OPTIONS: toc:nil num:nil
  3. * Tubo
  4. Tubo is a streaming front-end focused on bringing the [[https://github.com/TeamNewPipe/NewPipe][NewPipe]] experience to the web. It currently supports the same platforms as NewPipe, including YouTube, SoundCloud, and more.
  5. To retrieve the data, it wraps the excellent [[https://github.com/TeamNewPipe/NewPipeExtractor][NewPipe Extractor]] library and exposes the extracted data over a REST API that is consumed by a local re-frame SPA.
  6. ** Try It Out
  7. You can try a live demo at [[https://tubo.migalmoreno.com]]. If you consider self-hosting Tubo let me know about your instance via the [[*Contributing][contribution methods]]. See [[*Installation][installation]] for ways to set up Tubo in your server.
  8. ** Installation
  9. *** Packaging
  10. **** Uberjar
  11. To bundle the whole project into a self-contained uber-jar you need to follow these build steps:
  12. #+begin_src sh
  13. npm i
  14. npm run build
  15. clojure -T:frontend:build uberjar
  16. #+end_src
  17. After the last command is completed, you'll get a path to the uber-jar, which you can run like this:
  18. #+begin_src sh
  19. java -jar target/tubo-<VERSION>.jar
  20. #+end_src
  21. **** Docker
  22. Alternatively, you can use Docker to set up Tubo. Simply invoke this:
  23. #+begin_src sh
  24. docker-compose up -d
  25. #+end_src
  26. **** Manual
  27. You can also set up Tubo manually via the [[https://guix.gnu.org/][GNU Guix]] package manager. First, download the necessary tooling:
  28. #+begin_src sh
  29. cd /path/to/tubo
  30. guix shell
  31. #+end_src
  32. Then, compile the downloader ahead-of-time:
  33. #+begin_src sh
  34. clojure -M -e "(compile 'tubo.downloader-impl)"
  35. #+end_src
  36. Fetch the front-end dependencies and build the front-end assets.
  37. #+begin_src sh
  38. npm i
  39. npm run build
  40. #+end_src
  41. Finally, compile the front-end.
  42. #+begin_src sh
  43. clojure -M:frontend release tubo
  44. #+end_src
  45. You can now start a local server that listens on port 3000 by running this:
  46. #+begin_src sh
  47. clojure -M:run
  48. #+end_src
  49. Access the front-end in your browser at =http://localhost:3000=.
  50. *** Reverse Proxy
  51. If you want to self-host Tubo and make it publicly accessible you'll need to set up a reverse proxy.
  52. **** Nginx
  53. #+begin_src nginx
  54. server {
  55. listen 443 ssl http2;
  56. server_name tubo.<YOUR_DOMAIN>;
  57. ssl_certificate /etc/letsencrypt/live/tubo.<YOUR_DOMAIN>/fullchain.pem;
  58. ssl_certificate_key /etc/letsencrypt/live/tubo.<YOUR_DOMAIN>/privkey.pem;
  59. location / {
  60. proxy_pass http://localhost:3000;
  61. proxy_set_header X-Forwarded-For $remote_addr;
  62. proxy_set_header HOST $http_host;
  63. }
  64. }
  65. #+end_src
  66. ** Road-map
  67. - [X] Basic audio player
  68. - [ ] Track queuing system
  69. - [ ] Playlists
  70. - [ ] User settings
  71. ** Screenshots
  72. [[https://files.migalmoreno.com/tubo_kiosk.jpg]]
  73. [[https://files.migalmoreno.com/tubo_channel.jpg]]
  74. [[https://files.migalmoreno.com/tubo_stream.jpg]]
  75. ** Contributing
  76. Feel free to open an issue with bug reports or feature requests. PRs are more than welcome too.