Spotify radio is an audio streaming app where you can add effects in real time.
JS-Expert Project of the Week by the dear @Erick Wendel, with the challenge of implementing unit tests and e2e and achieving 100% coverage.
Open https://spotify-radio-grilario.herokuapp.com/ and play audio.
Open https://spotify-radio-grilario.herokuapp.com/controller and control the transmission.
- Nodejs in version 17
- Sox
- libsox-fmt-mp3
Or
Step 1: Clone the repo
git clone https://github.com/Grilario/js-expert-spotify.git
cd js-expert-spotify
Step 2: Install NPM packages
npm ci --silent
Step 3: Run app
npm run start
Open http://localhost:3000 and take a look around.
Step 1: Clone the repo
git clone https://github.com/Grilario/js-expert-spotify.git
cd js-expert-spotify
Step 2: Run in docker
npm run start:docker
Open http://localhost:3000 and take a look around.
Open http://localhost:3000/home and play audio.
Open http://localhost:3000/controller and control the transmission.
-
Web API:
- Must achieve 100% code coverage in tests
- Must have end to end tests validating all API routes
- Must deliver static files like Node.js Stream
- Must deliver music files as Node.js Stream
- Given a disconnected user, should not break API
- Even if multiple commands are fired at the same time, it should not break the API
- If an unexpected error occurs, the API should continue working
- Project needs to run on Linux, Mac and Windows environments
-
Web App:
- Client:
- Must play the broadcast
- Shouldn't pause if any effects are added
- Controller:
- Must achieve 100% code coverage in tests
- Must be able to start or stop a broadcast
- Must send commands to add audio effects to a stream
- Client:
- Lesson 01: Cover service and route layers with unit tests and achieve 100% code coverage.
- Lesson 02: Maintain 100% code coverage and implement e2e tests for the entire API.
- Lesson 03: implement unit tests for the frontend and maintain 100% code coverage.
- PLUS:
- provide a new effect
- add a new button on controller
- add new effect sound to
audios/fx/
folder - repost on heroku
- provide a new effect