#Text to DJ#
Text to DJ is an application that lets users text a song name to a phone number and update a playlist with that song. Check out the screenshots below or try it yourself by texting a song name to 781-916-8742 and update this playlist.
- Gunicorn to manage a web server
- Flask to handle routing on the server
- MongoDB to store/update Spotify auth credentials
- Twilio API (Twilio)
- Spotify API (Spotipy)
- Register for a Twilio account (Free trial)
- Register a Spotify application
- Create a Heroku account and install toolbelt
- Add MongoDB as an addon to your heroku account
Each of the four steps above will produce some sort of credentials that you'll need to store for your program to work correctly. Create a new config variable in your Heroku app fo reach of these variables. Note: this is not secure but will suffice for the time being. Create the following config variables:
export SPOTIPY_CLIENT_ID='Client ID from Spotify' export SPOTIPY_CLIENT_SECRET='Client secret from Spotify' export SPOTIPY_REDIRECT_URI='your_heroku_app.herokuapp.com/callback/q' export MONGOHQ_URL='mongodb://user:email@example.com:99999/your_app' #update this URL with your app's info export MONGO_DB_NAME='this is the suffix to your MongoHQURL, usually starts with 'heroku_app'> export MONGO_COLLECTION_NAME='auth_properties' #can leave the same export SPOTIFY_PLAYLIST_ID='spotify_playlist_id' export SPOTIFY_USER_ID='your_spotify_account_name'
If you have trouble getting this app set up, please feel free to send me a message. This app was my first foray into server side development and working with authentication/callbacks. As a result, I'm fairly positive I went against some best practicies - your feedback is welcome!
As an aside, a feature I'd like to build (time permitting) is an admin option which texts the owner of the playlist for permission each time someone makes a request to update the playlist - feel free to beat me to it!