This project is originated from an idea of developing a music streaming platform like Spotify/SoundCloud. The alumni will develop a silent-server application using technologies such as NodeJS, Express, MongoDB, Firebase and Cloudinary for back-end implementation, and ReactJS and Redux for front-end.
FRONTEND : React.js, Redux, SASS, Firebase, Axios
BACKEND : Node.js(express.js), Firebase-admin, MongoDB, Cloudinary, CORS, Mongoose, Morgan, Nodemon, Multer, Path, Babel
React.js ,
Node.js ,
Node.js ,
Node.js ,
Node.js ,
Node.js ,
Firebase-Admin ,
MongoDB .
Cloudinary .
CORS .
Mongoose .
Morgan .
Nodemon .
Multer .
Path .
Babel .
Parameter
Type
Description
firstName
string
Required . First name of user
lastName
string
Last name of user
birthday
date
Birthday of user
country
string
Country of user
profile
string
URL of user photo in cloudinary
email
string
Required . Email of user
password
string
Required . Password of user
cloudinaryId
string
Cloudinary Id of user photo
firebaseUser
string
Firebase User ID
Parameter
Type
Description
firstName
string
Required . First name of user
email
string
Required . Email of user
password
string
Required . Password of user
firebaseUser
string
Firebase User ID
CREATE USER WITH GOOGLE ACCOUNT
Parameter
Type
Description
id
string
Required . Id of item of fetch
Parameter
Type
Description
userId
string
Required . Firebase User ID
Parameter
Type
Description
firstName
string
Required . First name of user
lastName
string
Last name of user
birthday
date
Birthday of user
country
string
Country of user
profile
string
URL of user photo in cloudinary
cloudinaryId
string
Cloudinary Id of photo user
userId
string
Firebase User ID
Parameter
Type
Description
userId
string
Firebase User ID
FOLLOW USER USING FIREBASE UID
PUT /api/user/follow/:userId
Parameter
Type
Description
userId
string
Firebase User ID
req.query.fbUserToFollow
string
Firebase User ID
UNFOLLOW USER BY FIREBASE USER
PUT /api/user/unfollow/:userId
Parameter
Type
Description
userId
string
Firebase User ID
req.query.fbUserToUnfollow
string
Firebase User ID
Parameter
Type
Description
trackId
string
Required . Track ID
Parameter
Type
Description
req.query.searchQuery
string
Required . Search String
Parameter
Type
Description
title
string
Required . Title of track
artist
string
Artist of track
album
string
Album of track
genre
string
Genre of track
duration
Number
Duration of track
firebaseUser
string
Required . Track creator (Firebase User ID)
urlTrack
string
URL of Claudinary track
cloudinaryId
string
Claudinary id of track
Upload thumnnail to Track
PUT /api/tracks/uploadThumbnail/:trackId
Parameter
Type
Description
urlTrack
string
URL of Cloudinary track
cloudinaryId
string
Cloudinary Id of track
PUT /api/tracks/edit/:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
title
string
Required . Track title
artist
string
Artist of track
album
string
Album of track
genre
string
Genre of track
duration
Number
Track duration
DELETE /api/tracks:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
Get Tracks Created By Each User
Parameter
Type
Description
req.query.firebaseUser
string
Required . Firebase User ID
PUT /api/tracks/like/:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
PUT /api/tracks/unlike/:trackId
Parameter
Type
Description
req.query.firebaseUser
string
Required . Track Id
Get /api/tracks/addToPlaylist/:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
req.query.playlistId
string
Required . Playlist Id
Get /api/tracks/deleteFromPlaylist/:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
req.query.playlistId
string
Required . Playlist Id
Update reproduction counter
PUT /api/tracks/reproducing/:trackId
Parameter
Type
Description
trackId
string
Required . Track Id
GET /api/tracks/likedByUser/:userId
Parameter
Type
Description
userId
string
Required . Firebase User Id
PUT /api/tracks/addToAlbum/:trackId
Parameter
Type
Description
trackId
string
Required . Track id
req.query.albumId
string
Required . Album Id
PUT /api/tracks/addPhotoToTrack/:trackId
Parameter
Type
Description
trackId
string
Required . Track id
cloudinaryId
string
Required . Cloudinary Id of Photo
photoTrack
string
Required . URL of photo to Cloudinary
Parameter
Type
Description
albumId
string
Required . Album Id
Parameter
Type
Description
title
string
Required . Title of album
year
Date
Year of album
thumbnail
string
Required . URL of photo to Cloudinary
cloudinaryId
string
Required . Cloudinary Id of photo
totalTracks
Number
Number of tracks in album
firebaseUser
string
Required . Firebase Id of album's creator
Parameter
Type
Description
title
string
Title of album
year
Date
Year of album
thumbnail
string
URL of photo to Cloudinary
cloudinaryId
string
Required . Cloudinary Id of photo
totalTracks
Number
Required . Number of tracks in album
Delete api/albums/:albumId
Parameter
Type
Description
albumId
string
Required . Album Id
GET api/playlists/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
Parameter
Type
Description
title
string
Required . Title of playlist
collaborative
Boolean
Collaborative of playlist
description
string
Description of playlist
publicAccessible
Boolean
Accessibility of playlist
thumbnail
string
Required . URL photo of playlist
cloudinaryId
string
Required . Cloudinary id of playlist photo
firebaseUser
string
Required . Firebase Id of playlist's creator
PUT api/playlists/:playlistId
Parameter
Type
Description
playlistId
string
Required . Id of playlist
title
string
Required . Title of playlist
collaborative
Boolean
Collaborative of playlist
description
string
Description of playlist
publicAccessible
Boolean
Accessibility of playlist
thumbnail
string
Required . URL photo of playlist
cloudinaryId
string
Required . Cloudinary Id of playlist photo
DELETE api/playlists/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
PUT api/playlists/follow/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
req.query.firebaseUser
string
Required . Firebase User id
PUT api/playlists/unfollow/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
req.query.firebaseUser
string
Required . Firebase User id
GET api/playlists/details/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
Get info of playlist's creator
GET api/playlists/detailsUser/:playlistId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
Get all playlists created by certain user (using Firenase User Id)
GET api/playlists/:playlistId
Parameter
Type
Description
playlistId
string
Required . Id of playlist
req.query.firebaseUser
string
Required . Firebase User id
Get user's following playlist
GET api/playlists/getFollowing/:userId
Parameter
Type
Description
playlistId
string
Required . Playlist Id
userIdr
string
Required . Firebase User id
To deploy this project run
Insert gif or link to demo
Install of Webpack with npm
1. To start npm and create package.json
2. To install webpack, webpack-cli and webpack-dev-server as dev dependencies
npm i -D Webpack Webpack-cli webpack-dev-server
3. Then go to package.json and add in "scripts":
"start": "webpack serve" --> to use webpack-dev-server as start command
Now we create webpack.config.js to start configuring the settings.
const webpack = require("webpack); --> // to include webpack
// Settings for module exporting //
module.exports = {
mode: "development" --> // We set the mode to development
};
Here we have to change some settings for webpack-dev-server to show the changes live in browser
devServer: {
historyApiFallback: true,
port: 4000,
open: true,
compress: true,
hot: true,
},
"build": "webpack" --> to use webpack as the bundle builder.
4. Now we create our Javascript File @ src/index.js
5. Once created, run these two commands:
npm run build --> // to create the [name].bundle.js
npm run start --> // to start live webpack dev server
6. The next step is "Webpacking" the HTML, so we install HtmlWebpackPlugin
npm i -D html-webpack-plugin
And then set some config for this one.
const HtmlWebpackPlugin = require("html-webpack-plugin"); // to the top!
// INSIDE module.exports //
plugins: [
new HtmlWebpackPlugin({
title: "Weeeebpack",
template: "index.html",
filename: "index.html",
}),
Just in case we want to change entry and output points and if we want to use the "path" taken from path module in npm
Add path to our const require and then we can change entry and output points as follows:
const path = require("path");
// INSIDE module.exports //
entry: {
main: path.resolve(__dirname, "./src/js/main.js"),
},
output: {
path: path.resolve(__dirname, "./dist"),
filename: "[name].bundle.js",
},