GithubHelp home page GithubHelp logo

yss14 / musicshare Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 4.0 107 MB

Self-hosted open-source music sharing platform from music lovers for music lovers, powered by NodeJS, PostgreSQL, GraphQL, and React.

License: GNU Affero General Public License v3.0

TypeScript 99.35% HTML 0.24% JavaScript 0.18% Dockerfile 0.12% Shell 0.12%
music-library musicshare spotify self-hosted music music-player sharing-platform

musicshare's Introduction

Self-hosted open-source music sharing platform from music lovers for music lovers

Build Status GitHub Discussions Slack Status codecov Dependabot Status good first issues open

Docs | Installation Guide | First Steps | Contributing | Issue Tracker | Discuss | Roadmap


v1.0 release will happen in March 2021!


Features

MusicShare is a community-driven open-project enabling people to listen and share music with friends and family.

Upload music to your your self-hosted personal library and share it with friends and family.


Try out our demo!




Current Features

  • Personal library
  • Unlimited shares with friends and family
  • Rich song meta data management (title, artists, remixer, featurings, genres, songtypes, tags, labels, releasedate, year, duration, filesize, rips, bpm)
  • Personal and shared playlists
  • Simple music player
  • Simple file upload
  • Upload duplicate detection
  • Upload automatic rich meta data extraction from id3 tags and filename
  • Granular share permissions
  • Modern and clear web ui

Upcoming Features

  • Crossplatform (Android and iOS) app with a modern and clear ui
  • Song cover arts
  • Native feel song list including keyboard shortcuts
  • File support for m4a and aac
  • Smart playlists sourced from custom filters
  • Album and EP support

Motivation

iTunes used to be a great and simple yet powerful music library, but suffered user experience, platform support, and mobility during the recent years.

Streaming services became the way listening to music nowadays with great multi platform support and modern user interfaces, but with the caveat of not being the owner of the music.

MusicShare is there to combine both ideas - providing a simple yet powerful service to manage and share your own self-hosted music library.

Why not navidrome, funkwhale, or any other subsonic compatible backend?

We know that there are many alternatives out there like navidrome, funkwhale, plex, etc... So why even develop another new self-hosted music sharing platform?

For music lovers like us, any subsonic compatible backend-client solution does not correspond to our expectations and claim of a fully comprehensive music online service. Especially, the lack of a granular song meta data management prevented us in the past from setting up such a subsonic compatible system for larger personal music libraries. Furthermore, in our opinion the subsonic ecosystem has a lack of good iOS and Android Apps which gives you the feeling of a Spotify or Apple Music app. (And yes, we know that MusicShare can't provide any iOS or Android yet, but it is at the top of our todo list and enjoys the highest priority in the upcoming months!)

Nevertheless, we want to emphasize that we really appreciate the existence of an open-source standard like subsonic, enabling a diverse variety of music hosting projects and clients for the music loving self-hosting community. That's why we also decided to open source MusicShare with all it's part!

Contributing

We are always happy welcoming new people contributing to this project. Here's a little guide to get started!

We are also open for questions and answers on our official gitter or slack.

Contributors

License

This project is licensed under the AGPL license.

musicshare's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar fewhnhouse avatar freshchris01 avatar tobi12345 avatar yss14 avatar

Stargazers

 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

musicshare's Issues

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating source-map-support in /projects/backend/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/cassandra-schema-builder - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Context Menu

Add an abstract context menu component api, which enables to render context menu on different items like song list items, playlist entries, etc..

Screenshot 2019-04-01 at 20 06 28
Screenshot 2019-04-01 at 20 06 32

Introduce multiple song sources

Introduce an array of song sources. This would enable 3rd party song service integrations like Spotify, SoundCloud, YouTube, etc.
It also would allow songs without a song source, which remain visible. This could happen if a song is reference from another share and the owner of the song removes it from his/her library.

  • rename table field to sources
  • introduce redux-link interfaces with type property
  • sources field is of that type in shape of an array
  • adjust graphql schema and query
  • adjust frontend graphql query
  • introduce some frontend logic deciding which song source to take

Speed up jest execution

At the moment, running jest takes ~10s before a test suit is executed.
I guess internally the whole code is first transpiled to js before it's executed.
Maybe there is some way to mitigate/speed this up?

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating type-graphql in /projects/backend/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/cassandra-schema-builder - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Migrate tslint to eslint

Since tslint is now deprecated, we have to migrate backend linting to eslint as it is already done for the frontend.
Also revise eslint config:

  • enable trailing commas for arrays and objects
  • enable eof blank line

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating type-graphql in /projects/backend/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/cassandra-schema-builder - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

/404 and /login renders blank white page

When redirecting user to /404 or /login on graphql error the web app renders a blank white page.
Furthermore, if the user is routed to /login inadvertently, a redirect to the user's library should happen.

Dependabot couldn't find a package.json for this project

Dependabot couldn't find a package.json for this project.

Dependabot requires a package.json to evaluate your project's current JavaScript dependencies. It had expected to find one at the path: /npm_and_yarn/helpers/package.json.

If this isn't a JavaScript project, or if it is a library, you may wish to disable updates for it in the .dependabot/config.yml file in this repo.

You can mention @dependabot in the comments below to contact the Dependabot team.

Remove songs from playlists/library

Allow songs to be removed from playlists/libraries.
References need to be considered: Every reference need to be transformed into a song entry and added to the corresponding library from which it was referenced from. The newly created song entry has no song sources.

#793 needs to be resolved first to realize empty song sources

Playlists List & Detail View

  • Fetch playlists for a share
  • Render playlists list on the left side of the main view
  • On select render playlist in main song view

Depends on #71

Authentication Mechanism

  • Add a table to save user login tokens
  • Add a function to perform a user login by email and password, returning a JWT token
  • Add a function to register a new user with email and password
  • Add a function to validate a token
  • Add a middleware protecting GraphQL and REST routes

Passwords should be salted and hashed by the argon2 hash implementation.

Apply share manifest of schema and policies

After a long evaluation how to design the idea of owning a library but at the same time sharing songs with near friends, the following manifest with rules and policies was established:

Each user owns a Library with songs, playlists, albums, etc...
To share all those artefacts with friends, Shares can be created, which just link libraries and thus have a pool of songs from all linked libraries. A Share itself cannot own songs or albums, only playlists.
In version one edit artefacts of linked libraries is permitted. Later, suggested corrections are possible which have to be approved by the owner of an artefact.

Todos:

  • Backend
    • Song query of a Share should return all songs from all linked Libraries
    • Edit of songs from other linked libraries is permitted
    • Edit of playlists from other linked libraries is permitted
  • Frontend
    • Renamed library tab to All
    • Introduce an all view which combines all songs and all playlists
    • Couple playlist view to selected share
    • Split shares nav dropdown into two sections Library and Shares
    • Add playlist should create a playlist under the currently selected share
    • Shares acting as a proxy to access linked Songs
    • Edit of songs from other linked libraries is permitted
    • Edit/Add of playlists from other linked libraries is permitted
    • Songs are always uploaded to the user's library
    • songTypes, genres, artists, playlists, tags of Share return aggregated data (#821)

Songtype Query

  • Add songtypes table
  • Add songtype service
  • Add sontype query on Share
  • Add test cases

Artist Query

For now, we don't store artists in a separate table. Just fetch all songs of involved shares and make a unique set of artists from artists, remixer, and featurings attributes.

  • Add artist service
  • Add artist queries
    • Global query with shareID array param
    • Query on Share
  • Add test cases

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating type-graphql in /projects/backend/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/cassandra-schema-builder - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Enable shared types between frontend and backend

Enable frontend to access types of backend. This is important for e.g. permissions, userstatus, etc...
Most suitable solution for this would be use typescript composite projects and reference the backend project from the frontend project.

Genre Query

Genres should be grouped by different music styles, like electronic music, etc...

  • Add genres table
  • Add genre service
  • Add genre queries on Share
  • Add test cases

Relay-conform graphql schema

Goal of this epic is to have a graphql endpoint which implements the relay-specifiction.
Despite of the fact that we don't plan to migrate the frontend graphql client library from apollo to relay in the near future, the relay-specifiction has a lot of benefits and makes our graphql schema more consistent.

  • Add node(id: String!) query on root level
  • Remove share(id: String) query from root level since it was replaced by node() query
  • Transform mutation args into input object type
    • login mutation
    • issueAuthToken mutation
    • updateUserPermissions mutation
    • createShare mutation
    • renameShare mutation
    • deleteShare mutation
    • updateSong mutation
    • createPlaylist mutation
    • deletePlaylist mutation
    • renamePlaylist mutation
    • addSongsToPlaylist mutation
    • removeSongsFromPlaylist mutation
    • updateOrderOfPlaylist mutation
  • Return Edge/Node schema for queries
  • Add pagination for
    • Share songs query

Dependabot can't resolve your JavaScript dependency files

Dependabot can't resolve your JavaScript dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Error whilst updating @types/aws-lambda in /projects/backend/package-lock.json:
404 Not Found - GET https://registry.npmjs.org/cassandra-schema-builder - Not found

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Metadata Bar

Add a meta data bar located at the top-side of the main song view, displaying meta info on the current selected sub-view (without the search bar).

Screenshot 2019-04-01 at 20 10 20
Screenshot 2019-04-01 at 20 10 52

Unify song types

Unify ShareSong and PlaylistSong types into a commonSong type.

  • Add dateAdded property to song base schema
  • Don't expose playlist song order by property, but by array order
  • Remove requiresUserAction flat from ShareSong add filter option for this flag to song query
  • Remove order and playlistID property from ShareSong type
  • Finally merge both types

Tags

Add support for adding tags to songs and playlists.

Evaluate migration to PostgreSQL

Evaluate whether we should use PostgreSQL instead of Cassandra.
Some thoughts:

  • PostgreSQL also supports denormalized data
  • Since musicshare is open source, PostgreSQL ist easier to setup and maintain for other people
  • PostgreSQL enabled more complex queries, especially when it comes to update queries
  • By nature, our data schema fits perfectly into relational models. To gain query speed, we still can keep certain data denormalized

Playlists Schema & Queries/Mutations

  • Add a playlists_by_shares table
  • Add a query for a Share to fetch playlists
  • Add a query for a Share to fetch a specific playlist by id and its songs
  • Add a mutation to create a new playlist
  • Add a mutation to rename a playlist
  • Add a mutation to delete a playlist
  • Add a mutation to add songs to a playlist
  • Add a mutation to remove songs to a playlist
  • Add a mutation to change order of the songs of a playlist

Serving files from nginx

Add docker configuration and file adapter to support a ngnix docker container to serve files.

Share management

A share should have an owner, who has rights to invite/kick members, rename a share, and change member permissions.
For now, there will be no registration in the normal sense. A user has to be invited by another user to get access. By this process, also a respective Library is created for an invited user.

  • Backend
    • Rename share mutation
    • Delete share mutation
    • Invite user mutation
    • Revoke user invitation
    • Create share mutation set user owner
    • Update share user permission check if user of request is owner, otherwise deny
    • Distinguish between pending and accepted share users
    • Leave share mutation
  • Frontend
    • Shares dropdown add Add share button
    • Add settings icon next to shares which opens share settings modal
    • Share settings modal either user view (leave share) or owner view (name, members, delete share, leave share)

Basic Login View

Add a basic login view where the user can input its email and password.

Depends on #77.

Move songTypes, genres, artists, and tags field queries to user

Since #804 it doesn't make sense anymore that SongTypes, Genres, Artist, and Tags can belong to a Share, but only to a Library. It also doesn't make sense to query those types in aggregations on Shares, but rather handle those aggregations as a pool of SongTypes, Genres, Artist, and Tags over all linked Libraries.
Thus, moving the related subqueries songTypes, genres, artists, and tags from Share to User is a logical consequence.

Add song search

Add a song search located on the right side of the meta data bar.
For now, it's sufficient to fetch all aggregated songs and use this data as basis for a fulltext search.

Song Meta Editor

Add an overlay to edit song metadata

  • title
  • artists / remixers / featurings
  • additional suffix
  • year
  • bpm
  • songtype
  • genres
  • releasedate
  • is rip
  • label

Try music-metadata?

Hello Yannick,

I came across your project and noticed you are using 2 ancient modules to extract metadata: id3-parser & mp3-duration.

I was wondering if you could give my parser a try music-metadata. It can read about any audio file / tagging format around. Using promises, TypeScript definition included.

I am trying to increase my user community, to collect more feedback, to increase quality (I have no more issues to solve).

Normally I send a PR, but your project is bit more tricky. Are willing to try music-metadata?

Remove cassandra artifacts

Remove all cassandra-related artefacts

  • Move cassandra-schema-builder to separate git repository
  • Replace cassandra with postgres in README
  • Remove all cassandra related scripts
  • Remove docker related cassandra configs

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.