diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba7c3f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Hugo default output directory +/public + +/resources \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..affee54 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/hugo-whisper-theme"] + path = themes/hugo-whisper-theme + url = https://github.com/zerostaticthemes/hugo-whisper-theme.git diff --git a/README.md b/README.md index 7d8b3af..d10cbaa 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# Documentation \ No newline at end of file +# Documentation + +Documentation on the core architecture of Piped and it's backend. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/archetypes/docs.md b/archetypes/docs.md new file mode 100644 index 0000000..68a01b5 --- /dev/null +++ b/archetypes/docs.md @@ -0,0 +1,10 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +draft: false +weight: 100 +--- + +Lorem markdownum aequalis strigis. Saetigeri iubeas, vultu huic alvum nondum +de obside ut laniavit arbor palmis, cum quin. Rupes vetat videndo, armigerae +crimen habet Priamum nec. diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..1171acf --- /dev/null +++ b/config.toml @@ -0,0 +1,48 @@ +baseURL = "piped-docs.kavin.rocks" +languageCode = "en-us" +title = "Piped" +themesDir = "themes" +theme = "hugo-whisper-theme" + +pygmentsCodeFences = true +pygmentsCodefencesGuessSyntax = true +pygmentsUseClasses = true + +# Controls how many words are printed in the content summary on the docs homepage. +# See https://gohugo.io/content-management/summaries/ +summaryLength = 30 + +[[menu.main]] + name = "Home" + url = "/" + weight = 1 + +[[menu.main]] + name = "Docs" + url = "/docs/" + weight = 2 + +[params] + google_analytics_id="" + homepage_button_link = '/docs' + homepage_button_text = 'Read The Docs' + homepage_intro = 'Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design.' + homepage_image = '/images/banner.webp' + + ## You can enable to add anchor links to header elements + # enable_anchor_link = true + + [params.homepage_meta_tags] + meta_description = "Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design." + meta_og_title = "Piped" + meta_og_type = "website" + meta_og_url = "https://piped-docs.kavin.rocks" + meta_og_image = "https://avatars.githubusercontent.com/u/74294114?s=250" + meta_og_description = "Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design." + meta_twitter_card = "summary" + meta_twitter_site = "" + meta_twitter_creator = "" + + [params.logo] + mobile = "/images/logo.svg" + standard = "/images/logo.svg" diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..27b77ea --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ +--- +title: 'Piped' +--- + +Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design. diff --git a/content/docs/_index.md b/content/docs/_index.md new file mode 100644 index 0000000..f61c9ad --- /dev/null +++ b/content/docs/_index.md @@ -0,0 +1,8 @@ +--- +title: 'Overview' +weight: 1 +--- + +## Piped + +Welcome to the Documentation of Piped. diff --git a/content/docs/architecture/index.md b/content/docs/architecture/index.md new file mode 100644 index 0000000..7f7acc2 --- /dev/null +++ b/content/docs/architecture/index.md @@ -0,0 +1,41 @@ +--- +title: 'Architecture' +weight: 4 +summary: What is Piped architectured? +--- + +## What is Piped's architecture? + +Piped has 3 components: + +- A frontend in VueJS +- A backed in Java which uses NewPipeExtractor +- A proxy in Golang + +links: https://github.com/TeamPiped/Piped\, https://github.com/TeamPiped/Piped-Backend and, https://github.com/FireMasterK/http3-ytproxy + +## Frontend +- Uses videojs +- Uses a router for a single page application. + +## Backend +- Uses Java 11 +- Uses the native HTTP client introduced in Java 9 +- Uses netty-reactor to acheive maximum performance and a low footprint. +- Supports OpenJ9 +- Each running instance should configure their own proxy, thus allowing multi-gigabit content delivery. +- Uses ~70-130 MB of ram. (on OpenJ9) + +# Proxy +- Uses Golang +- Has HTTP/2 support. (HTTP/3 is unstable in the current library) +- Low memory footprint and high throughput. +- Can be used to replace the proxy in various other frontends. + +# Server-Side Caching + +Caching is done at a Reverse-Proxy/CDN level to reduce the load to the backend. This also makes it more scalable. + +# LBRY + +LBRY streams are automatically added to stream content via LBRY if the same video is available there. \ No newline at end of file diff --git a/content/docs/why/index.md b/content/docs/why/index.md new file mode 100644 index 0000000..e431ca6 --- /dev/null +++ b/content/docs/why/index.md @@ -0,0 +1,52 @@ +--- +title: 'Why' +weight: 4 +summary: Why did I create Piped? +--- + +## Why did I create Piped? + +YouTube has an extremely invasive privacy policy which relies on using user data in unethical ways. + +Here are some things about YouTube: + +- Tracking via third-party cookies for other purposes without your consent. +- YouTube can delete your content if you violate the terms +- Reduction of legal period for cause of action +- YouTube may use your personal information for marketing purposes +- YouTube can view your browser history +- YouTube can use your content for all their existing and future services +- YouTube gathers information about you through third parties +- YouTube can license user content to third parties +- YouTube provider makes no warranty regarding uninterrupted, timely, secure or error-free service +- Deleted videos are not really deleted +- Your data may be processed and stored anywhere in the world +- YouTube is only available to users over a certain age +- YouTube can suspend your account for several reasons +- YouTube has non-exclusive use of your content +- The court of law governing the terms is in the US +- YouTube collects your IP address for location use + +Source: https://tosdr.org/en/service/274 + +A lot of inspiration came from NewPipe and Invidious. + +I created Piped to fix issues in NewPipe and Invidious which are architectural issues and cannot be fixed easily. + +### NewPipe +- Your IP is exposed to YouTube. +- Feeds are slow to load. + +### Invidious +- Uses way too much resources. +- Total bandwidth limited by the peak capacity of the load balancer. +- Coded in Crystal, a language that is relatively hard for beginners. +- Caching is done at a backend level. +- Invidious was a learning project. +- Invidious crashes all the time. +- Various hacks are required to keep an instance running at a reasonable stablity. + +However, there are some drawbacks of Piped: + +- JavaScript is required +- Browsers without Service-Workers support will feel significantly slower. Eg: Tor Browser diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..b9443da Binary files /dev/null and b/static/favicon.png differ diff --git a/static/images/banner.webp b/static/images/banner.webp new file mode 100644 index 0000000..73f5dcc Binary files /dev/null and b/static/images/banner.webp differ diff --git a/static/images/logo.svg b/static/images/logo.svg new file mode 100644 index 0000000..f0356a6 --- /dev/null +++ b/static/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/hugo-whisper-theme b/themes/hugo-whisper-theme new file mode 160000 index 0000000..6638af4 --- /dev/null +++ b/themes/hugo-whisper-theme @@ -0,0 +1 @@ +Subproject commit 6638af48a3f11caf020cd8733ce4c94e1d558939