This is a web application to manage and play music collections.
It supports the following features:
- Multi-user account creation/authentication
- Fetch songs with info
- Album views, with sorting
- Searching for tracks by name, artist, creation year, genre, etc.
- Playlists
- Hot charts
- Music player applet in the webpage footer
- Web uploader to add music
- Asset storage service
- Song queueing
- Song favouriting
The production data is at: https://drive.google.com/file/d/1bCoon3Nj-6nh-_RE9vNY4kQnDKoq9Fye/view?usp=sharing
The testing data is at: https://drive.google.com/file/d/11nd32AImDeLA856__QpqkyL5lRC_An66/view?usp=drive_link
In order to load the data into the web application, please use the Upload
tab and batch-upload all the song files to be imported into the database.
The website and backend is in the website
folder. The file storage server is in the filestore
folder.
Set up the local PostgreSQL server:
$ docker-compose -f db-docker-compose.yml up -d
Initialize the database (only needs to be run once):
$ cd setup
$ npm install
$ npm start
$ cd ..
Start the filestore server:
$ cd filestore
$ npm install
$ npm start
In another terminal session, start the webserver:
$ cd website
$ npm install
$ npm run dev
Docker is used for consistent deployments:
$ cd filestore
$ docker build . -t cs348-filestore:latest
$ cd ../setup
$ docker build . -t cs348-setup:latest
$ cd ../website
$ docker build . -t cs348-music-app:latest
$ cd ..
$ docker-compose up
With the Docker Compose stack up:
$ docker exec -it cs348_db_1 psql postgresql://postgres:password@localhost/musicapp
# Should now be in the Postgres CLI
We can run a few commands to do some basic queries in the Postgres CLI:
CREATE DATABASE test;
USE test;
CREATE TABLE user(name TEXT);
SELECT * FROM user;