Giter Club home page Giter Club logo

spotify-should-sync-merged-playlists's Introduction

Spotify Should Sync Merged Playlists

App will allow users to combine two or more playlists into a single playlists and keep the playlist synced

Top Level Requirements

Firebase

Running firebase functions on trigger and schedule

  • AddUser() -> triggered on spotify user access approval (playlist read/write): adds user profileId:token to firestore
  • CombinePlaylists () -> Triggered on user request to combine two or more playlists, add list of source playlists anbd destination playlist ids to firebase
  • Scheduler() -> runs 1x a day to go through user profiles / playlists and runs CombinePlaylists

Firestore

Storing user data

  • Profile: Spotify.profileId:userToken
  • CombinedPlaylists: Spotify.profileId:JSON.stringify({source.playlistId:destination.playlistId[]})

App Flow

  1. User Access
    • User will need to approve app to access their playlists (read/write)
      • add user's token to firestore: profileId:token
  2. If user is approved they need to provide:
    • source playlist Ids array
    • destination playlist name
  3. Firebase combine playlists function will ^ Fetch profileId:token from firestore
    • Fetch songs in source playlists array
    • Create destination playlist (if name doesnt exists)
    • Add source playlist songs to destination (shuffle?)
  4. Setup recurring tasks to trigger firebase function (will require story spotify access token for refresh)
    • For each profileId:token in fire store: Run combine function

ToDo

[ ] Optimize combining playlists so that (possibly some sort of playlist or song 'lastModified') [ ] On first user req to combine playlist Error out on destination playlist already exists [ ]

spotify-should-sync-merged-playlists's People

Contributors

jsonpoindexter avatar

Watchers

James Cloos avatar  avatar

spotify-should-sync-merged-playlists's Issues

Handle auth revoke

If a user has revoked the app auth for X days then remove the sync job

Add default profile icon

It's possible for a user to not have a Spotify profile picture. In this case the UI's profile avatar should have a default/fallback image (or color/letter)

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.