-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from movie-web/more-docs
More documentation
- Loading branch information
Showing
31 changed files
with
513 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* @movie-web/core | ||
|
||
.github @binaryoverload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Please visit the [main document at primary repository](https://github.com/movie-web/movie-web/blob/dev/.github/CODE_OF_CONDUCT.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Please visit the [main document at primary repository](https://github.com/movie-web/movie-web/blob/dev/.github/CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,3 @@ | ||
# Docus Starter | ||
# movie-web docs | ||
|
||
Starter template for [Docus](https://docus.dev). | ||
|
||
## Clone | ||
|
||
Clone the repository (using `nuxi`): | ||
|
||
```bash | ||
npx nuxi init -t themes/docus | ||
``` | ||
|
||
## Setup | ||
|
||
Install dependencies: | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
## Development | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
## Edge Side Rendering | ||
|
||
Can be deployed to Vercel Functions, Netlify Functions, AWS, and most Node-compatible environments. | ||
|
||
Look at all the available presets [here](https://v3.nuxtjs.org/guide/deploy/presets). | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
## Static Generation | ||
|
||
Use the `generate` command to build your application. | ||
|
||
The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting. | ||
|
||
```bash | ||
yarn generate | ||
``` | ||
|
||
## Preview build | ||
|
||
You might want to preview the result of your build locally, to do so, run the following command: | ||
|
||
```bash | ||
yarn preview | ||
``` | ||
|
||
--- | ||
|
||
For a detailed explanation of how things work, check out [Docus](https://docus.dev). | ||
Find it at https://docs.movie-web.app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: 'Start self-hosting' | ||
--- | ||
# How to self host | ||
|
||
::alert{type="info"} | ||
We **do not** provide support on how to self-host. If you can't figure it out then tough luck. Please do not make GitHub issues or ask in our Discord server for support on how to self-host. | ||
:: | ||
|
||
There are a few configurations of hosting movie-web. Each with their own benefits. | ||
**If you don't know what to choose, go with method 1.** | ||
|
||
## Method 1 - Only host the frontend | ||
With this method, you only host the essential parts that make movie-web work. But keep using the account server from offical movie-web. | ||
This method is the easiest to self-host and is recommended for most users. | ||
|
||
1. [Setup the Proxy!](../2.proxy/1.deploy.md) | ||
2. [Setup the Client!](../3.client/1.deploy.md) | ||
|
||
## Method 2 - Only host the account server | ||
If you want to own your own data, it's possible to selfhost just the account server and nothing else. | ||
This method is only recommended if you have experience hosting databases or other similar stateful applications. | ||
|
||
1. [Setup the Backend!](../4.backend/1.deploy.md) | ||
2. [Configure the Client!](../3.client/1.deploy.md) | ||
|
||
## Method 3 - Host everything | ||
If you want an instance that's completely isolated from official movie-web. You can selfhost all parts. | ||
This method is not recommended for inexperienced hosters. | ||
|
||
1. [Setup the Proxy!](../2.proxy/1.deploy.md) | ||
2. [Setup the Backend!](../4.backend/1.deploy.md) | ||
3. [Setup the Client!](../3.client/1.deploy.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: 'Configure backend' | ||
--- | ||
# Configure your client with the backend | ||
|
||
If you would like to use an alternative backend server (The server responsible for saving user data across devices) then you can specify your own URL **without needing to host your own movie-web frontend!** | ||
|
||
::alert{type="danger"} | ||
Changing your backend server will log you out of your account - make sure you have a copy of your 12-word passphrase saved safely in case you need to go back! | ||
:: | ||
|
||
1. On movie-web, got to your settings page by click the menu icon at the top right and then `Settings`. | ||
1. Scroll down the page to the section named `Connections` where there is a toggle named `Custom server`. | ||
1. Enable the `Custom server` toggle and enter your backend URL in the input box named `Custom server URL`. | ||
1. Click `Save` at the bottom right corner of your screen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: 'PWA vs no-PWA' | ||
--- | ||
# About Selfhosting PWA | ||
|
||
So that clients can have a more native app-like experience on mobile, movie-web has a function to support Progessive Web Apps (PWA). You can learn more about what a PWA is [here](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/What_is_a_progressive_web_app). | ||
|
||
In movie-web version 3, PWAs were enabled by default. Unfortunately, PWAs tend to come with caching complications that can be tricky to resolve. That's why we have **disabled** PWAs by default in movie-web version 4. If you are upgrading from version 3, please [read our upgrade guide](../3.client/5.upgrade.md) for more information. | ||
|
||
::alert{type="warning"} | ||
Enabling PWAs means that you cannot disable it again - Please only proceed if you know what you are doing! | ||
:: | ||
|
||
## If you are running movie-web on a hoster such as Vercel | ||
If your hosting is building movie-web from the source, you can enable PWAs using environment variables. The full environment variable reference can be found [here](../3.client/3.configuration.md) but for PWAs we are only interested in `VITE_PWA_ENABLED`. | ||
|
||
Setting `VITE_PWA_ENABLED` to `true` will generate a [service worker file](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#service_worker) and a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#the_web_app_manifest) which enable the website to be installed from a [web browser both on Desktop and on Mobile](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable#installation_from_the_web). | ||
|
||
## If you are running movie-web using the .zip files | ||
If you are downloading the movie-web `zip` files from our GitHub and installing them on a static website hoster, then all you need to do is to make sure to download the [`movie-web.pwa.zip`](https://github.com/movie-web/movie-web/releases/latest/download/movie-web.pwa.zip) file instead of the `movie-web.zip` file! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: 'Troubleshooting' | ||
--- | ||
# Troubleshooting | ||
|
||
There is a possibility for something to go wrong while trying to deploy your own instance of movie-web. This page will contain common issues people come across while self-hosting and their solutions. | ||
|
||
|
||
## "Failed to find media, try again!" while searching | ||
|
||
This is likely a misconfigured TMDB api key. Verify that TMDB isn't working by going to `/admin` or `/#/admin`. Then clicking `Test TMDB`. | ||
|
||
If it succeeds, the TMDB api key is correct and it will be a different issue. | ||
|
||
If it does not work. Recheck your TMDB api key. **Make sure its the READ api key, not the normal api key.** | ||
|
||
|
||
## Everything I try to watch fails | ||
|
||
This is likely a misconfigured worker. Verify that the workers are the issue by going to `/admin` or `/#/admin`. Then clicking `Test workers`. | ||
|
||
You should have at least 1 worker registered. | ||
|
||
If any worker fails the test, you should double check its URL and double check if the worker has the correct code. | ||
|
||
|
||
## I can't make an account or login | ||
|
||
This is likely misconfigured or broken backend. Verify the backend by going to `/admin` or `/#/admin`. Then clicking `Test backend`. | ||
|
||
It should give you the name that you have configured as backend with the latest version of the backend. | ||
|
||
If the test gives you an error, your backend URL configuration option likely has a typo. | ||
|
||
If the version is not the latest version, you should update your backend instance. | ||
|
||
If the name and description of the results don't match your own instance, make sure you have your backend URL set correctly. | ||
|
||
|
||
## I updated from version 3 to version 4 but still see the old version | ||
|
||
This is likely that you haven't installed the PWA version of movie-web. Please read the [upgrade guide](../3.client/5.upgrade.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
title: 'Self-Hosting' | ||
icon: mdi:server-network | ||
navigation.redirect: /self-hosting/hosting-intro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: 'Introduction' | ||
--- | ||
# Introduction to the proxy | ||
Our proxy is used to bypass CORS-protected URLs on the client side, allowing users to make requests to CORS protected endpoints without a backend server. | ||
|
||
The proxy is made using [Nitro by UnJS](https://nitro.unjs.io/) which supports building the proxy to work on multiple providers including Cloudflare Workers, AWS Lambda and [more...](https://nitro.unjs.io/deploy) | ||
|
||
Our recommended provider is Cloudflare due to its [generous free plan](https://www.cloudflare.com/en-gb/plans/developer-platform/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: 'Deploy' | ||
--- | ||
# Deploying the proxy | ||
|
||
## Method 1 - Cloudflare (Easy) | ||
|
||
Cloudflare has a generous free plan, so you don't need to pay anything unless you get hundreds of users. | ||
|
||
[](https://deploy.workers.cloudflare.com/?url=https://github.com/movie-web/simple-proxy) | ||
|
||
1. Create a GitHub account at https://github.com if you don't have one. | ||
1. Click the `Deploy with workers` button above. | ||
1. Click the `Authorize Workers` button to authorise Cloudflare to talk to GitHub. | ||
1. Authorize Cloudflare Workers in the GitHub page that pops up. | ||
1. Follow the instructions to configure your Cloudflare account. Select `I have an account` if you have a Cloudflare account already, otherwise follow the link to create one. | ||
1. Click the link to `Workers Dashboard` to find your account ID. | ||
1. You can copy your account ID from the URL e.g. https://dash.cloudflare.com/ab7cb454c93987b6343350d4e84c16c7/workers-and-pages/create where `ab7cb454c93987b6343350d4e84c16c7` is the account ID. | ||
1. Paste the account ID into the text box on the original Cloudflare workers page. | ||
1. Click the link to `My Profile` to create an API token. | ||
1. Click `Create Token`. | ||
1. Select `Use template` next to `Edit Cloudflare Workers`. | ||
1. Under `Account Resources`, select `Include` and your account under the dropdown. | ||
1. Under `Zone Resources`, select `All zones` (You can select a more specific zone if you have the zones available). | ||
1. At the bottom of the page, click `Continue to summary`. | ||
1. On the next screen, click `Create token`. | ||
1. Copy the API token and **save it in a safe place, it won't be shown again**. | ||
1. Paste the API token into the Cloudflare Workers API Token text box. | ||
1. Click `Fork the Repository` and follow the instructions to enable workflows. | ||
1. Click `Deploy` to deploy to Cloudflare Workers. | ||
1. Congratulations! Your worker is now deploying. Please wait for the GitHub Action to build and publish your worker. | ||
1. You can click the `Worker dash` and `GitHub repo` buttons to see the status of the deploy. | ||
1. When the worker has deployed, you will need to take note of the URL. This can be found on Cloudflare under Workers and Pages -> Overview -> Proxy. | ||
|
||
## Method 1 - Cloudflare (Manual) | ||
1. Login to your Cloudflare account if you have one, otherwise create one [here](https://dash.cloudflare.com/sign-up) | ||
1. If you are signing up for an account, make sure to verify your email before going further! | ||
1. Download the latest version of the Cloudflare [`simple-proxy-cloudflare.mjs` script from here](https://github.com/movie-web/simple-proxy/releases/latest/download/simple-proxy-cloudflare.mjs). | ||
1. Go to `Workers & Pages` and then `Overview` in the left-hand navigation bar. | ||
1. Click the `Create Worker` button | ||
1. If you've made a worker or pages application before, you will need to click `Create Application` first | ||
1. Give your worker a name and click `Deploy`. This can be anything you would like! | ||
1. On the `Congratulations` web page, click the `Edit code` button to edit the code in the worker you have just created. | ||
1. There should now be a code editor on the left hand side on the web page. | ||
1. Select all of the existing template code and delete it. **You must make sure all of the code is deleted for this to work!** | ||
1. Go to your downloads folder and open up the `simple-proxy-cloudflare.mjs` file you downloaded earlier in a text editor, and **copy** the contents. | ||
1. Back in your browser, paste the contents of the file into the code editor. | ||
1. The `Save and deploy` button in the top right corner should now be active, click it to deploy your proxy! | ||
1. A confirmation dialog will appear, click `Save and deploy` once more. | ||
1. Your worker is now deployed! You can click the back button in the top left to take you back to the summary screen. | ||
1. On the summary screen, your worker link will be displayed under `Preview`. Right click the link, click `Copy link address` and save the link somewhere - you will need it to setup the client! | ||
|
||
## Method 2 - Docker | ||
|
||
::alert{type="warning"} | ||
Experience with Docker, domains and web hosting is **highly recommended** for this method. <br /> | ||
[Deploying with Cloudflare](#method-1-cloudflare-easy) is easier and safer to do! You are exposing your server at your own risk! | ||
:: | ||
|
||
Our `simple-proxy` application is available from the GitHub Container Registry under the image `ghcr.io/movie-web/simple-proxy:latest` :copy-button{content="ghcr.io/movie-web/simple-proxy:latest"} | ||
|
||
The container exposes the HTTP port (Without TLS/SSL) as `3000/TCP`. | ||
|
||
If you know what you are doing, you should know what to do with this information. If you don't, then please follow our Cloudflare guides. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
title: 'Proxy' | ||
icon: mdi:server-network | ||
navigation.redirect: /proxy/introduction |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: 'Introduction' | ||
--- | ||
# Introduction to the client | ||
|
||
The client is what the main part of the application, it houses the interface and all of the scraping logic. | ||
|
||
## PWA | ||
|
||
The client can be optionally ran as a PWA. This can be hard to do correctly and really hard to reverse, so it's generally not recommended to do so if you don't have experience hosting PWA's. | ||
|
||
You can read more about it [here](../1.self-hosting/3.about-pwa.md). | ||
|
||
## Configuration | ||
|
||
The client has a decent amount of configuration options. You can view them all [here](./3.configuration.md). |
Oops, something went wrong.