From ad7ece0e600d3596a4de8404a13df9eb70cd34b5 Mon Sep 17 00:00:00 2001 From: Aleksi Lassila Date: Mon, 3 Jun 2024 17:39:01 +0300 Subject: [PATCH] docs: Update README --- README.md | 101 +++++++++++++++--------- package.json | 2 +- src/App.svelte | 5 +- src/lib/components/UpdateChecker.svelte | 2 +- swagger-spec.json | 1 + vite.config.ts | 2 +- 6 files changed, 73 insertions(+), 40 deletions(-) create mode 100644 swagger-spec.json diff --git a/README.md b/README.md index 7d6b204..2bdbc40 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,21 @@ ![Version](https://ghcr-badge.egpl.dev/aleksilassila/reiverr/latest_tag?color=%2344cc11&ignore=latest&label=version&trim=) ![Size](https://ghcr-badge.egpl.dev/aleksilassila/reiverr/size?color=%2344cc11&tag=latest&label=image+size&trim=) -Reiverr is a project that aims to create a single UI for interacting with TMDB, Jellyfin, Radarr and Sonarr, as well as be an alternative to Overseerr. +Reiverr is a project that aims to create a single UI for interacting with TMDB, Jellyfin, Radarr and Sonarr, as well as +be an alternative to Overseerr. -This project is still in alpha, and many features are still missing / being tested and changed. Contributions are welcome! See [contributing](#Contributing) for more information. +This project is still in early stages, and many features are still missing / being tested and changed. +Contributions are welcome! See [contributing](#Contributing) for more information. -![Demo Videi](images/reiverr-demo.gif) +![Demo Video](images/reiverr-demo.gif) -# List of major featuers +# List of major features TMDB Discovery: - Discover trending movies and TV shows -- Browse movies and TV shows by genre or network +- Get personalized recommendations based on your ratings +- ~~Browse movies and TV shows by genre or network~~ - View details about movies and TV shows, such as cast, crew, ratings & a trailer. - Movie & TV show search @@ -26,16 +29,14 @@ Local Library & Playback - Stream Movies & TV shows (from Jellyfin library) - Create requests for movies & TV shows in Radarr & Sonarr - Manage local library files -- View Radarr & Sonarr stats (disk space, items, etc.) - +- ~~View Radarr & Sonarr stats (disk space, items, etc.)~~ + For a list of planned features & known bugs, see [Reiverr Taskboard](https://github.com/users/aleksilassila/projects/5). # Installation The easiest and the recommended way to install Reiverr is via Docker. Make sure to update the api keys and base URLs to match your setup. -Radarr & Sonarr API keys can be found under Settings > General in their respective web UIs. Jellyfin API key is located under Administration > Dashboard > Advanced > API Keys in the Jellyfin Web UI. - ### Docker CLI ```sh @@ -65,26 +66,43 @@ services: restart: unless-stopped ``` -### Manual Instructions +### Building from Source -1. Requirements: - - Node v18.14.0 or high - - NPM v9.3.1 or high -1. Clone from **master** or download the [latest source](https://github.com/aleksilassila/reiverr/releases) -1. Build the app: - ```sh - npm ci --ignore-scripts - npm run build - npm ci --ignore-scripts --omit=dev # optional - ``` -1. Start the app: - ```sh - npm run deploy - ``` +1. Requirements(ish): + - Node v18.14.0 or higher + - NPM v9.3.1 or higher +2. Clone from **master** or download the [latest source](https://github.com/aleksilassila/reiverr/releases) +3. Build the app:\ + `npm install`\ + `npm install --prefix backend`\ + `npm run build` +4. Start the app:\ + `node backend/dist/main` -### Reiverr will be accessible via port 9494 by default. +#### Reiverr will be accessible via port 9494 by default. -If you have any questions or run into issues or bugs, you can start a [discussion](https://github.com/aleksilassila/reiverr/discussions), open an [issue](https://github.com/aleksilassila/reiverr/issues) or check out the [Discord channel](https://discord.gg/enypPQh6pz). +### Tizen / Samsung Smart TVs + +To be able to use Reiverr on TVs, you'll still need to host the backend server on a separate device. +See the above methods for instructions on how to set up the backend / web app. + +There are plans to attempt getting the app to the official store. In the meantime, you have to manually build and install +the app using Tizen Studio or the CLI, following roughly these steps: + +1. Follow the manual installation steps above to install the dependencies (npm install) +2. Download either Tizen Studio or the CLI tools from the [official website](https://developer.tizen.org/development/tizen-studio/download) +3. [Connect Tizen Studio to your TV](https://developer.samsung.com/smarttv/develop/getting-started/using-sdk/tv-device.html) +4. Use the following command to build and install the app on your TV:\ +\ +`npm run build:tizen;C:\tizen-studio\tools\ide\bin\tizen.bat build-web -- tizen;C:\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -o .\tizen -- .\tizen\.buildResult\;C:\tizen-studio\tools\ide\bin\tizen.bat install -n .\tizen\Reiverr.wgt -t QE55Q64TAUXXC`.\ +\ +You may need to replace the paths for Tizen Studio tools according to your installation location, as well as the device identifier, which was in my case the tv model number.\ +\ +Alternatively, you can open the project in Tizen Studio and install the project on a device from there. For more instructions on run a project on a device, see [here](https://docs.tizen.org/application/web/get-started/tv/first-samsung-tv-app/#run-on-a-target-device). + +If you have any questions or run into issues or bugs, you can start a [discussion](https://github.com/aleksilassila/reiverr/discussions), +open an [issue](https://github.com/aleksilassila/reiverr/issues) +or check out the [Discord channel](https://discord.gg/enypPQh6pz). ## Other Platforms @@ -92,19 +110,31 @@ The roadmap includes plans to support the following platforms in the future: - Windows Desktop App - MacOS Desktop App -- Android TV / TizenOS +- Android TV / WebOS + +# Post Installation + +To create the first user account, you can log in with any credentials and an admin account will be created. +To get most out of Reiverr, it is recommended to connect to TMDB, Jellyfin, Radarr and Sonarr. + +> Hint: Radarr & Sonarr API keys can be found under Settings > General in their respective web UIs. Jellyfin API key is located under Administration > Dashboard > Advanced > API Keys in the Jellyfin Web UI. + # Contributing -Unlike the most Servarr projects, this one is built with Svelte and SvelteKit. If you haven't used Svelte before, don't worry, this was my first Svelte project too. I'd recommend reading the official [Svelte tutorial](https://learn.svelte.dev/tutorial/welcome-to-svelte) to get started. +Unlike the most Servarr projects, this one is built with Svelte and NestJS. If you haven't used Svelte before, +don't worry, this was my first Svelte project too. I'd recommend reading the official [Svelte tutorial](https://learn.svelte.dev/tutorial/welcome-to-svelte) to +get started. -To see a list of missing features & known bugs that you can help with, see [Reiverr Taskboard](https://github.com/users/aleksilassila/projects/5). Feel free to also create your own issues for bug reports or feature requests, as well as discussions for general questions. +To see a list of missing features & known bugs that you can help with, +see [Reiverr Taskboard](https://github.com/users/aleksilassila/projects/7). Feel free to also create your own +issues for bug reports or feature requests, as well as discussions for general questions. Before you contribute: - If you are taking on an existing bug or feature ticket, please comment on the issue or mark yourself as an assignee to avoid multiple people working on the same thing. - If the ticket is vague or missing information, please ask for clarification in the comments. -- UI style must match the rest of the project and it is a good idea to discuss the design beforehand, especially for larger design choices (issues labelled with "design"). +- UI style should match the rest of the project, and it is a good idea to discuss the design beforehand, especially for larger design choices (issues labelled with "design"). - [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) are encouraged. - When creating a pull request, please make sure to target the `dev` branch and mark the PR as a draft if it is a work in progress. @@ -116,12 +146,11 @@ To get started with development: 1. Clone the repository 2. Check out the `dev` branch -3. Run `npm install` -4. Run `npm run dev` - -Alternatively, you can run `docker-compose up`. - -For Webstorm users: I'd recommend using VS Code as it has way better Svelte Typescript support. +3. Install dependencies\ + `npm install`\ + `npm install --prefix backend` +4. To start the frontend: `npm run dev` or `npx vite --host` if you want to expose the server +5. To start the backend: `npm run --prefix backend start:dev` Useful resources: diff --git a/package.json b/package.json index 733e878..fa2624d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "npm run --prefix backend build && vite build --outDir backend/dist/dist", "build:tizen": "set VITE_PLATFORM=tv&& vite build --outDir tizen/dist", "preview": "vite preview", "preview:tizen": "set VITE_PLATFORM=tv&& vite build --outDir tizen/dist && vite preview --outDir tizen/dist", diff --git a/src/App.svelte b/src/App.svelte index 8bc6a1d..239f5ae 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -43,7 +43,10 @@ if ($localSettings.checkForUpdates) fetchLatestVersion().then((latestVersion) => { // @ts-ignore - if (latestVersion !== `v${VERSION}` && latestVersion !== $localSettings.skippedVersion) { + if ( + latestVersion !== `v${REIVERR_VERSION}` && + latestVersion !== $localSettings.skippedVersion + ) { createModal(UpdateDialog, { version: latestVersion }); } }); diff --git a/src/lib/components/UpdateChecker.svelte b/src/lib/components/UpdateChecker.svelte index 80ae5e5..4f054e9 100644 --- a/src/lib/components/UpdateChecker.svelte +++ b/src/lib/components/UpdateChecker.svelte @@ -15,7 +15,7 @@ {#await fetchLatestVersion() then latestVersion} - {#if latestVersion !== `v${VERSION}` && latestVersion !== $skippedVersion && visible} + {#if latestVersion !== `v${REIVERR_VERSION}` && latestVersion !== $skippedVersion && visible}
diff --git a/swagger-spec.json b/swagger-spec.json new file mode 100644 index 0000000..3049dc5 --- /dev/null +++ b/swagger-spec.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","paths":{"/api/user":{"get":{"operationId":"UserController_getProfile","parameters":[],"responses":{"200":{"description":"User found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"404":{"content":{"application/json":{"examples":{"NotFoundException":{"description":"User not found","value":{"statusCode":404,"message":"Not Found","error":"Not Found"}}},"schema":{"type":"object","description":"User not found","properties":{"statusCode":{"type":"number","example":404},"message":{"type":"string","example":"Not Found"},"error":{"type":"string","example":"Not Found"}},"required":["statusCode","message"]}}},"description":""}},"tags":["user"]},"post":{"operationId":"UserController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"200":{"description":""}},"tags":["user"]}},"/api/user/{id}":{"get":{"operationId":"UserController_findById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"User found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"404":{"content":{"application/json":{"examples":{"NotFoundException":{"description":"User not found","value":{"statusCode":404,"message":"Not Found","error":"Not Found"}}},"schema":{"type":"object","description":"User not found","properties":{"statusCode":{"type":"number","example":404},"message":{"type":"string","example":"Not Found"},"error":{"type":"string","example":"Not Found"}},"required":["statusCode","message"]}}},"description":""}},"tags":["user"]},"put":{"operationId":"UserController_updateUser","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"User updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["user"]}},"/api/auth":{"post":{"operationId":"AuthController_signIn","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInDto"}}}},"responses":{"200":{"description":"User found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInResponse"}}}},"401":{"content":{"application/json":{"examples":{"UnauthorizedException":{"description":"Unauthorized","value":{"statusCode":401,"message":"Unauthorized","error":"Unauthorized"}}},"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":401},"message":{"type":"string","example":"Unauthorized"},"error":{"type":"string","example":"Unauthorized"}},"required":["statusCode","message"]}}},"description":""}}}},"/api":{"get":{"operationId":"AppController_getHello","parameters":[],"responses":{"200":{"description":""}}}}},"info":{"title":"","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"SonarrSettings":{"type":"object","properties":{"apiKey":{"type":"string"},"baseUrl":{"type":"string"},"qualityProfileId":{"type":"number"},"rootFolderPath":{"type":"string"},"languageProfileId":{"type":"number"}},"required":["apiKey","baseUrl","qualityProfileId","rootFolderPath","languageProfileId"]},"RadarrSettings":{"type":"object","properties":{"apiKey":{"type":"string"},"baseUrl":{"type":"string"},"qualityProfileId":{"type":"number"},"rootFolderPath":{"type":"string"}},"required":["apiKey","baseUrl","qualityProfileId","rootFolderPath"]},"JellyfinSettings":{"type":"object","properties":{"apiKey":{"type":"string"},"baseUrl":{"type":"string"},"userId":{"type":"string"}},"required":["apiKey","baseUrl","userId"]},"TmdbSettings":{"type":"object","properties":{"sessionId":{"type":"string"},"userId":{"type":"string"}},"required":["sessionId","userId"]},"Settings":{"type":"object","properties":{"autoplayTrailers":{"type":"boolean"},"language":{"type":"string"},"animationDuration":{"type":"number"},"sonarr":{"$ref":"#/components/schemas/SonarrSettings"},"radarr":{"$ref":"#/components/schemas/RadarrSettings"},"jellyfin":{"$ref":"#/components/schemas/JellyfinSettings"},"tmdb":{"$ref":"#/components/schemas/TmdbSettings"}},"required":["autoplayTrailers","language","animationDuration","sonarr","radarr","jellyfin","tmdb"]},"UserDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isAdmin":{"type":"boolean"},"onboardingDone":{"type":"boolean"},"settings":{"$ref":"#/components/schemas/Settings"}},"required":["id","name","isAdmin","settings"]},"CreateUserDto":{"type":"object","properties":{"name":{"type":"string"},"password":{"type":"string"},"isAdmin":{"type":"boolean"}},"required":["name","password","isAdmin"]},"UpdateUserDto":{"type":"object","properties":{"name":{"type":"string"},"onboardingDone":{"type":"boolean"},"settings":{"$ref":"#/components/schemas/Settings"}}},"SignInDto":{"type":"object","properties":{"name":{"type":"string"},"password":{"type":"string"}},"required":["name","password"]},"SignInResponse":{"type":"object","properties":{"accessToken":{"type":"string"}},"required":["accessToken"]}}}} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 288cea9..898b1af 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ ], optimizeDeps: { exclude: ['svelte-navigator'] }, define: { - VERSION: `"${pkg.version}"` + REIVERR_VERSION: `"${pkg.version}"` } // base: '/dist',