An interactive song guessing game, hostend in the interwebz
Sonq is a web based online multiplayer game which allows you to guess songs based on the spotify 30 second preview. When you guess a song correctly, you get points based on the time it took you and the popularity of the song.
Server and client need a configuration to run. Please make sure to supply each application with the required values.
You need a spotify client for each application. You can get credentials here.
Configuration is handled via dotenv
. Therefore, you can create a .env
file in the packages/server
directory and it will automagically load your configuration into the environment. Alternatively, you can specify each value by hand in the command line.
The following configuration parameters are available:
SPOTIFY_CLIENT_SECRET
: The secret for your spotify clientSPOTIFY_CLIENT_ID
: The ID for the spotify client you want to useSPOTIFY_REDIRECT_URI
: The url where the frontend redirects you after authentication with spotify to. Usually, it should be something likehttps://sonq.de/spotify-redirect
.
The client does not do much. It only needs to know where itself lives, where the backend lives and which spotify client id it shold use to create the authentication link.
SPOTIFY_CLIENT_ID
: Same as for the serverSERVER_URL
: The base url for the server application. Defaults to http://localhost:4000 for developmentCLIENT_URL
: The base url for the client application. Defaults to http://localhost:3000 for development
- clone this repository
- run
yarn
in the root of the project - make sure you provide a configuration (see above)
- run
yarn dev
This applies for the server and the client.
- Go into the directory of the application you want to start
yarn
yarn workspace @sonq/api run build
yarn build
yarn start
This game has been developed live on twitch by me and my viewers. Thanks for the great support, issues and input. This would not have been possible without you ❤️.