Code Monkey home page Code Monkey logo

jolt's Introduction

Jolt

The social hub for your media server.

Note: This project is still in very early alpha stages. A lot of features are only lightly tested, and may not even be implemented yet, but there's lots more to come!

Introduction

Jolt brings the users of your media server together in one place. With profiles directly integrated into Jellyfin, movie and TV data from TMDB, and a powerful feed and recommendation system, Jolt connects your users by allowing them to review and rate media, recommend movies and TV shows to each other, as well as [WIP] suggest movies and shows that groups can watch together.

Features

  • Rate, review, recommend movies and TV shows
  • Add and remove movies and TV shows to and from your watchlist
  • Discover new media using TMDB's discovery API
  • [WIP] Generate media suggestions
  • [WIP] Comment on movies and episodes with timestamp support
  • [WIP] Sync Jellyfin media library and watched status
  • [WIP] Create clips from media on your media server (Jellyfin) with optional burnt-in subtitles for sharing

Screenshots

Architecture

Jolt uses the modern approach, by separating frontend and backend. The frontend is implemented in React, using Mantine for UI, and Apollo Client for state management and GraphQL requests. This powerful combination enables a slick frontend app that looks great on desktop and mobile devices.

The backend is implemented using Golang. It uses the uber/fx library for dependency injection, GORM, GQLGen and Viper for configuration.

Deployment

Since Jolt is still in alpha, currently no images are available on Docker Hub. The Docker Compose however can be used to deploy the current version of Jolt, with examples for the configuration at sample-config.yaml which needs to be renamed to config.yaml and shared values in .env.sample.

The Dockerfile compiles the frontend using Vite, and includes the files in a single run container which means all you need is one container to get Jolt up and running (and Postgres).

Thanks

  • Mantine
  • Apollo
  • GORM
  • uber/fx
  • Viper
  • TMDB

Contributing

๐Ÿšง Work in Progress!

Development

The React app uses Vite as a dev server and for builds. Run yarn dev to start the dev server which supports HMR ๐Ÿ”ฅ and uses the vite-plugin-graphql-codegen to generate GraphQL type definitions.

In order to generate GraphQL types, the backend server must be running at port 5001.

The backend uses dev containers to isolate the Go development environment and enable easy networking with Postgres without needing to reserve port 5432. VSCode should detect the dev container configuration files in the server directory once opened, and prompt you to build the dev container and open VSCode in it.

Run go run main.go to start the server whenever changes are made. The GraphQL resolvers can be regenerated using go generate ./....

License

This project is licensed under the terms of the MIT license.

jolt's People

Contributors

dan6erbond avatar xstar97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jolt's Issues

help logging in

Hi! Can you please help accessing the logs?

I am trying to set up jolt in a docker container and connect it to jellyfin. I have jellyfin instance set up and running, and is accessible from jolt container at http://jellyfin:8096. (I've been using jellyfin and jellyseerr since a month or so and they are working fine.) I added this address in the config.yaml file. But when I try to log in, there is no visual feedback and no message in docker logs. Can you help me finding out what is wrong?

Thanks,

:sparkles: Icon Improvements

I'll attempt to create an icon that fits better with source files included.
The icon should...

  1. Provide light/dark modes
  2. Have a style guide
  3. Shouldn't be too complex
  4. Require an icon that refers to a "jolt" ( bolt, speed, etc )

I'll update you with progress reports when I can :)

Lack of image is weighting the project down

Not having any docker images to quickly spin the project in kube or on a NAS is hurting the project.

Having images ready to spin would lower the friction between project discovery and first run. Please consider providing official images.

Jolt is empty? DB error root

Hey,

i wanted to check out the app but it is not working for me.
The login works fine, but the app and pages are empty.

I think there is a problem with the database. I used nearly complete the default config:

    04/15/2023 11:01:41 AM
    PostgreSQL Database directory appears to contain a database; Skipping initialization
    04/15/2023 11:01:41 AM
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.682 UTC [1] LOG:  starting PostgreSQL 14.7 (Debian 14.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.683 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.683 UTC [1] LOG:  listening on IPv6 address "::", port 5432
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.700 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.773 UTC [27] LOG:  database system was shut down at 2023-04-10 19:35:22 UTC
    04/15/2023 11:01:42 AM
    2023-04-15 09:01:42.752 UTC [1] LOG:  database system is ready to accept connections
    04/15/2023 11:02:10 AM
    2023-04-15 09:02:10.860 UTC [41] FATAL:  role "root" does not exist
    04/15/2023 11:02:40 AM
    2023-04-15 09:02:40.990 UTC [51] FATAL:  role "root" does not exist
    04/15/2023 11:03:11 AM
    2023-04-15 09:03:11.132 UTC [60] FATAL:  role "root" does not exist
    04/15/2023 11:03:41 AM
    2023-04-15 09:03:41.279 UTC [69] FATAL:  role "root" does not exist
    04/15/2023 11:04:11 AM
    2023-04-15 09:04:11.404 UTC [79] FATAL:  role "root" does not exist

Implement Caching of TV Seasons and Episodes

What is required?

In order to display seasons and episodes in the UI, as well as sync their watched status, they need to be efficiently fetched and cached from TMDB. The following logic will be used:

  1. On fetch of TV show (GetOrCreateByTmdbID()) the service will check if the show has completed.
  2. If not, seasons and episodes will be synced.
  3. First, the last cached season will be checked, and updated if necessary.
  4. All episodes of the last cached seasons, and newer seasons will be fetched from TMDB and updated.

Consumers will have to get seasons and episodes through the TvService to ensure that this logic is executed whenever these models are requested.

More Sophisticated Movie Recommendation Algorithm and Database Structure

What is the problem?

Since recommended movies are fetched from TMDB's movie recommendations API, and scored by the ratings given to their source movie, scores can easily be inflated by having them appear in lots of movies' recommendations.

Solution

The following models could improve the recommendation algorithm by using a normalized scoring system based on averages of the associated ratings:

type Suggestion struct {
  gorm.Model
  MediaType         string  // movies or tvs
  MediaID           uint
  UserID            uint
  SuggestionSources []SuggestionSource
}

func (s *Suggestion) Score() {
  return AvgScore(s.SuggestionSources)
}

type SuggestionSource struct {
  gorm.Model
  SuggestionID uint
  Suggestion   Suggestion
  MediaType    string
  MediaID      uint
  ReviewID     uint
  Review       Review
}

func (s *SuggestionSource) Score() {
  return s.Review.Rating
}

Import review from sites

It will be great if in the future you could import review from other sites like senscritique / myanimelist / tmdb

Implement Sync of Watched Shows, Seasons and Episodes

What is required?

Jolt should sync watched shows, seasons and episodes from supported media servers. Currently Jellyfin.

A sync jellyfin command has already been prepared in the develop branch, which needs to be refactored to use the JellyfinService for this purpose.

The /Users/{userId}/Items?recursive=true&includeItemTypes=Series&enableUserData=true endpoint will return all available series for a user, and the UserData object will include the played state.

For seasons and episodes, the /Shows/{seriesId}/Seasons and /Shows/{seriesId}/Episodes endpoints will return similar data if the userId and enableUserData query parameters are included.

Support Multiple Jellyfin Servers / Separate Auth Providers

What needs to be done?

  • Separate the Jellyfin servers from the auth providers.
  • Support multiple Jellyfin configurations in jellyfin.
  • Support an auth provider key in the configuration.
  • Allow user to pick which Jellyfin server to log into.
  • Map media to JellyfinItem and remove JellyfinID and JellyfinServerID attributes from entities.

FEATURE: Databases

Please don't end up like like Jellyfin or Jellyseerr (Overseerr) saying "sqlite is enough" and buiding upon only that. From the get go start decoupling the SQL from your code and making a module for SQLite and Postgres for example, if this takes on in the future you and people using it will be sooo much happier.

I've done it in Go here: https://github.com/aleksasiriski/rffmpeg-go/tree/main/processor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.