Music is always better when we listen together
Stereo is a free project that lets you play & listen to music in sync with friends in public or private rooms.
Stereo currently supports streaming music on YouTube and Spotify. We hope to add support for Apple Music soon.
Stereo consists of several other repos containing server or mobile apps, some of which or open sourced.
- Web: The Next.js + urql web application.
- Server: The Node.js GraphQL server using benzene
- Mobile (React Native): TBD
The following tools must be installed:
- Node 12.x or 14.x (nvm recommended)
- Yarn 1.x: See Installation
Certain environment variables are required to run this application:
APP_URI
: URL of this web appAPI_URI
: URL of the API ServerWEBSOCKET_URI
: URL of the WebSocket serverSPOTIFY_CLIENT_ID
: The Spotify Client ID for use in the Web Playback SDK. See developer.spotify.comFACEBOOK_APP_ID
: (optional) The Facebook App ID. See developers.facebook.com.FATHOM_SITE_ID
: (optional) Fathom site ID for analytics.SENTRY_DSN
,SENTRY_AUTH_TOKEN
: (optional) Sentry environment variables: the first one for error reporting and the second for source map uploading.
Create a .env.local
file in the working dir to set the environment variables. For development, set APP_URI
to http://localhost:3000
, API_URI
to https://api.withstereo.com
, WEBSOCKET_URI
to wss://api.withstereo.com
, and SENTRY_DSN
to https://foo@bar.ingest.sentry.io/0
.
You cannot sign in to Stereo directly from the development app. See #17 for instruction.
Upon cloning this repository, run yarn
to install required dependencies.
Run yarn dev
to start the app in development mode. This enables hot-code reloading and error reporting. See next dev
.
Run yarn codegen
to run the graphql-codegen-generator. This generates TypeScript definitions inside src/graphql/gql.gen.ts
and urql
React hooks.
This is only run whenever the GraphQL operations are modified inside the graphql
folder or when the Server GraphQL Schema changes.
Run yarn lint
to check for error in source code using eslint
. You can also run yarn lint --fix
to let eslint
fixed the errors automatically.
Running yarn build
will create an optimized production build of your application. To also analyzing build size set the env variable ANALYZE=true
.
stereo-web
cannot be self-hosted at the moment. However, if you are interested, I'm happy to implement a OAuth2.0-like system (available for free too if possible!) to do so. stereo-api
cannot be open sourced now due to having a lot of moving pieces, but I hope to be able to do that soon in the future.
See CONTRIBUTING.md.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation. See LICENSE file in this repository for the full text.
Feel free to email us at yo@withstereo.com with any questions and concerns.