Repository for the Real-Time-Web course. DEMO
- Description
- Concept
- Prerequisites
- Installing
- Data life cycle
- Source of truth
- Diagram
- Real time events
- Features
This application tries to bring people together online to listen to their favorite music genre's.
The application is build with the use of sockets, this enables us to create the possibility of communication between users in real time. Sockets are used to create rooms which people can join and listen to the same music together. The rooms are created with a Spotify playlist linked to the room so the users in the same room have the same music in front of them. From this playlist the users can add songs to their playback queue and others get notified that a song is added to the queue .
Concept images
Home page after logging into Spotify.![Home page after loging in to spotify](./github/images/home.png)
- Nodejs
- NPM
Clone repository to your local directory
git clone https://github.com/damian1997/real-time-web-1920.git
Installing dependencies
npm install
Bundle core assets and watch files
npm run bundle
Run server localy
npm run dev
This project does not make use of a database and all the information is stored on the server.
In this application the server is the only source of truth, everything is stored on the server and only from the server decisions are being made. Because everything resides on the server the data is persistent and every user has the correct data and is not 1 step behind the rest.
- Join room:
When a person enters the room others will get a updated list of users.
- Disconnect:
When a person leaves the room others will get a updated list of users.
- Add to queue:
When someone adds a song the the playback the queue overview will be updated.
- Remove song from queue:
When the currently played song is the same as the first song in the queue the queue will be updated and posted to everyone.
- New current track
When a new track is being played this event fires to update the room object so new people joining the room will listen to the same track.
- Multiple rooms support.
- Multiple people can join 1 room
- Playlist sync with spotify account
- Songs play according to queue
- Pushing songs to playback queue
- Playing full songs
- Disconnecting from rooms updates user list
- Real time updates on current song and playback queue
- Sync playing of music
- Pausing and skipping songs
- Adjusting volume
- Room administration