Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhruvkulkarni86/playedwp
https://github.com/dhruvkulkarni86/playedwp
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dhruvkulkarni86/playedwp
- Owner: DhruvKulkarni86
- Created: 2023-08-09T17:43:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-09T17:47:40.000Z (over 1 year ago)
- Last Synced: 2023-08-09T19:20:44.103Z (over 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Played.
A spotify playlist creator created using ReactJS and a custom wordpress plugin.
## Working
This project uses Spotify API's [Implicit Grant Flow](https://developer.spotify.com/documentation/web-api/tutorials/implicit-flow) for user authorization.
The user selects the songs on the frontend and sends an HTTP request with selected song IDs to the wordpress plugin along with the access token to actually generate a spotify playlist.
This small project was actually created to understand creating and working of a **custom wordpress plugin** and under no circumstances is it advisable to pass spotify generated tokens outside of its authflow, to ensure security of the webapp.
## Running it locally
For obvious reasons the project is not live, but to run it locally:
- generate client id from spotify developer account
- pop in this .env in `Frontend` root:```env
VITE_SPOTIFY_CLIENT_ID= yourClientId
VITE_SPOTIFY_REDIRECT_URI= redirect_after_auth
VITE_SPOTIFY_SCOPES= Read more about scopes here->https://developer.spotify.com/documentation/web-api/concepts/scopes
VITE_BACK_URL= path to your WP plugin
```- I used [Local](https://localwp.com/) to run WP locally, just pop the `spotify-api` in the `plugins` folder