|
1 |
| -Express Boilerplate! |
2 |
| -This is a boilerplate project used for starting new projects! |
| 1 | +# TuneChain |
3 | 2 |
|
4 |
| -Set up |
5 |
| -Complete the following steps to start a new project (NEW-PROJECT-NAME): |
| 3 | +Michael Bonner, Primary Developer |
6 | 4 |
|
7 |
| -Clone this repository to your local machine git clone BOILERPLATE-URL NEW-PROJECTS-NAME |
8 |
| -cd into the cloned repository |
9 |
| -Make a fresh start of the git history for this project with rm -rf .git && git init |
10 |
| -Install the node dependencies npm install |
11 |
| -Move the example Environment file to .env that will be ignored by git and read by the express server mv example.env .env |
12 |
| -Edit the contents of the package.json to use NEW-PROJECT-NAME instead of "name": "express-boilerplate", |
13 |
| -Scripts |
14 |
| -Start the application npm start |
| 5 | +[LiveApp](https://tunechain-app.mdb1710.now.sh) |
15 | 6 |
|
16 |
| -Start nodemon for the application npm run dev |
| 7 | +[Client Repo](https://github.com/mdb1710/tunechainclient_final) |
| 8 | + |
| 9 | +## Summary |
| 10 | + |
| 11 | +You have Spotify and you're looking for the music to match your current mood. Now you can chain your music to your mood with Tunechain. With Tunechain you can search for used curated playlist to match the mood and genre you desire. You can even save your searches. This is the back-end api to perform those searches. |
| 12 | + |
| 13 | +## Database |
| 14 | + |
| 15 | +Please refer to the seed tables. This database will help you with requests for saved searches |
| 16 | +1. Create a database called saved_playlists |
| 17 | +2. Create a role to own the db called tunechainer |
| 18 | +3. Run npm run migrate to create needed tables |
| 19 | +4. Use seed file in seeds folders for starter data |
| 20 | + |
| 21 | +## API |
| 22 | + |
| 23 | +GET /api/search |
| 24 | + |
| 25 | +The Spotify Web API uses the request library for the mood and genre searches. Because all Spotify request require a web token for authorization, we set up a POST request to receive/refresh that token for each search. Once the token is received a get request with the search query is immediately made the search endpoint to retrieve the data from Spotify. This data is then sent to the client. |
| 26 | + |
| 27 | +POST /api/saved |
| 28 | + |
| 29 | +This request send the mood and genre you just searched to the database. |
| 30 | + |
| 31 | +GET /api/saved |
| 32 | + |
| 33 | +This request will send to the client all of the saved searches the used made at that point from the database. |
| 34 | + |
| 35 | + |
| 36 | +## Technology |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +For The Back End |
| 41 | +- Spotify Web API |
| 42 | +- NodeJs |
| 43 | +- ExpressJs |
| 44 | +- Request |
| 45 | +- Mocha/Chai |
| 46 | +- PostgreSQL |
| 47 | +- Supertest |
| 48 | + |
| 49 | + |
| 50 | +Deployed via Now |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## Setup |
| 55 | + |
| 56 | +To setup the application |
| 57 | + |
| 58 | +1. Fork and clone the project to your machine. |
| 59 | +2. `npm install`. |
17 | 60 |
|
18 |
| -Run the tests npm test |
19 | 61 |
|
20 |
| -Deploying |
21 |
| -When your new project is ready for deployment, add a new Heroku application with heroku create. This will make a new git remote called "heroku" and you can then npm run deploy which will push to this remote's master branch. |
|
0 commit comments