Skip to content

Latest commit

 

History

History
52 lines (50 loc) · 3.71 KB

README.md

File metadata and controls

52 lines (50 loc) · 3.71 KB

UrMusic

URL

Visit UrMusic

Overview

UrMusic is an online web application that will help you find music using the overall mood of your latest tweets! By signing up you will be able to save playlist in UrMusic profile.

More about how the app works ...

This web application works by fetching the latest public tweets found in your Twitter timeline using Twitter's API and running a sentiment analysis on the list of extracted tweets.
An overall (mood) sentiment is determined using the help of Google's Cloud Sentiment Analysis API, and then the right tracks to match your overall sentiment are found using various Spotify API endpoints.

Features

  • UrMusic sends requests to 3 different APIs including Google Cloud Sentiment Analysis, Twitter API, Spotify API
  • Data is stored and can be manipulated in a postgreSQL database which can be set up on your local machine or online
  • Passwords are bcrypted to store user's passwords
  • A Flask session is created to keep user logged in while navigating the website
  • A media player is displayed and available to play all the queued tracks instantly
  • Tailored front-end for a variety of screen sizes from smart phones to PC monitors

Technology Stack

  • Twitter API
    • Twitter developer account required link
    • Credentials can be declared on top of twitter_helper.py
  • Google Cloud Natural Language API
  • Spotify
    • Spotify developer account required link
    • Credentials can be declared on top of spotify_helper.py
  • Flask
  • SQLAlchemy
  • PostgreSQL
  • WTForms

Set Up

  • Set up a virtual enviroment to pip install flask
  • pip install all dependencies using the requirements.txt file
  • Set up postgresql database and map it in app.py line 17 or line 18

User Flow

  1. User is welcomed and an overview is displayed on the homepage. The navbar has 2 buttons giving a user the option to Login to an existing account or Sign-Up for the first time. image
  2. Forms are displayed to Login or Sign-Up when clicking on the navbar options An error is displayed on the form if the password does not meet the requirements, the Twitter handle does not exist or an email is not provided. image image
  3. After signing up a playlist of 24 tracks are automatically displayed using the overall sentiment determined using the Twitter handle provided on the Sign-Up form.
    A form is displayed to name and save the playlist to UrMusic profile.
    Once signed in, the navbar buttons change to Logout or go to Profile. image
  4. In Profile, a signed in user can find their saved playlists.
    Hovering on the playlist will display an Orange background on the playlist and clicking on it will display the tracks in that playlist.
    Get New Playlist button will run a new sentiment analysis on your latest tweets and display a brand new playlist. image
  5. Logout to clear your session.