Code Monkey home page Code Monkey logo

fest_suggest's Introduction

FestSuggest

Code Climate

About

A website for Spotify users to find upcoming music festivals based on their listening habits. Technologies used include Rails, JavaScript, jQuery, Redis, and Sidekiq.

Functionality

A user is able to:

  • View their top artists based on their listening habits from the last 4 weeks, the last 6 months, or all time.
  • View up to 5 recommended upcoming music festivals per above time frame of listening habits
    • View which top and recommended artists are appearing at the festival
    • View how many other artists are on the festival line-up
    • Follow a hyperlink to the full line-up and additional details on Songkick
    • Follow or unfollow a Spotify playlist that contains the top track of all available artists on the festival line-up

How it Works

After querying the Spotify API and pulling the user's top and recommended artists by all time, the past six months, or the past four weeks, the app ties in with the Songkick API to identify upcoming events for each top artist with dates scheduled. The app then filters down to only upcoming festivals and performs analysis to rank the upcoming festivals, based on the number of top and recommended artists at each festival, as well as the ranking of those top artists. When analysis is complete, the top festivals are returned and ranked in order, up to five.

Playlists are created on an as-needed basic through a Spotify account that belongs to the site. Once the first user interested in a playlist clicks on 'Follow', the playlist is created and it appears in the user's followed playlists on Spotify. A background worker is then triggered to fetch the top track for all available artists at the festival, eventually adding them to the playlist. This process is not required for subsequent users to follow, as the playlist has already been created and its tracks added.

Repo Usage

After cloning or forking the project, bundle:

bundle

initialize the database:

rake db:{create,migrate}

and initialize figaro (currently used for ENV var management):

bundle exec figaro install

Note: API keys are required for both Spotify and Songkick. You can find more information on the Spotify API here, and the Songkick API here. Both are well documented.

The following keys will need to be populated in the application.yml file generated by figaro:

FS_ACCESS_TOKEN
FS_REFRESH_TOKEN
FS_ADMIN_NAME
SONGKICK_KEY
SPOTIFY_CLIENT
SPOTIFY_REDIRECT
SPOTIFY_SECRET

The FS_ values are required to fulfill the Spotify playlist functionality and are designed to be "admin" tokens. FS_ADMIN_NAME is the username, and the other two values can be obtained by logging in with that user and then grabbing the (temporary) values from the database. Since gathering these values initially is a manual process, a rake task exists to ensure the admin remains authorized in at all times.

Finally, launch a server:

rails s

And explore.

Please note that, in the application's default state, redis is required to enable caching, and Sidekiq is required to enable the processing of background jobs via a worker.

Running Tests

rspec

fest_suggest's People

Contributors

ryanflach avatar

Stargazers

Svitlana avatar Taratip Jaikaeo avatar Vladislav Isakov avatar Dan Levy avatar

Watchers

James Cloos avatar  avatar

fest_suggest's Issues

Make documentation more comprehensive

Current documentation is a good overview, but not thorough enough to encourage additional development, particularly to an individual unfamiliar with the project.

Improve layout for mobile

Although everything technically displays on mobile, the presentation could be better on smaller screens.

Update Gemfile

Address automatically identified potential security vulnerabilities. Probably not an issue based on usage, but a good to-do.

User sees their top artists

As a logged-in user
When I visit the root path
And I click on 'All time'
I expect to see my all-time Spotify top artists
And I expect to see a link to generate festivals based on these top artists

Refactor

Look for opportunities for refactoring, as well as areas where you may be able to beef up your test coverage.

User views their top festivals

As a logged-in user
When I visit the root path
And I select the time frame for my search (long-term [all time], medium-term [6 months], short-term [4 weeks]
And I click on 'Suggest Fests'
I expect to see my top five festivals, sorted from highest to lowest ranked (most matched artists to fewest)
And I expect each festival to contain data on top artists and recommended artists playing
And I expect each festival name to be a link to the event page on Songkick

[Feature] User can follow a playlist of festival artist tracks

As a logged-in user with festival results
I should see a button to follow a festival playlist for each festival that I do not already follow
And when I click on the button to follow
I expect to have a visual update and be able to access that playlist in my Spotify account

Notes:

  • Playlists should be generated by the FestSuggest Spotify account and followed by users, rather than creating the playlist for each user - this will cut down on redundancy of playlist creation.
  • Playlist tracks should be one top track from each artist at the festival
  • May store created playlist IDs and names in the database, as well as potentially a relationship with the user to track the playlists that they follow.

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.