-
Notifications
You must be signed in to change notification settings - Fork 0
Server Design
Jimmy Ma edited this page May 24, 2020
·
5 revisions

The backend uses Node and Express. Application data is stored in a Mongodb Atlas cluster. More details about the backend endpoints can be found in the API documentation
Data for users and parties are stored inside the mongodb database. The following is the database schema that the app follows:
- uri: The Spotify uri used to identify the track
- name: The name of the track
- album: The name of the album the track belongs to
- artist: The artist the track belongs to
- votes: The number of votes the track has
- albumIcon: The album cover for the track. Stored in 2 sizes, small and large
- play_state: Whether the track is currently being played
- name: The name of the party
- id: A randomly generated id when user creates party
- currentTrack: The track that is currently selected in the party
- tracks[]: List of track objects
- id: The Spotify id of the host
- name: The Spotify name of the host
- accessToken: The accessToken for the user
- refreshToken: The refreshToken for the user
- expireTime: The time at which the refreshToken will expire
- playlist: A party object