Skip to content

Instantly share code, notes, and snippets.

@Gideon877
Last active October 18, 2019 12:08
Show Gist options
  • Save Gideon877/56b7ae0ac95a6c0dc6afd6e5accea802 to your computer and use it in GitHub Desktop.
Save Gideon877/56b7ae0ac95a6c0dc6afd6e5accea802 to your computer and use it in GitHub Desktop.
Music App

Music App

You are a music lover. And you need to create your our music app and with no subscriptions.

Create a web application that can help search for all the latest music on itunes to help you.

What app should be able to do the following.

Users should be able to:

  • Create account
  • Login
  • Update profile

Create Acount

Acount schema
  {
      "firstName": {"type": String, "required": true, "unique": false },
      "lastName": {"type": String, "required": true, "unique": false },
      "username": {"type": String, "required": true, "unique": true },
      "password": {"type": String, "required": true, "bcrypt": true },
      "email": {"type": String, "required": true, "unique": true },
      "image": {"type": String, "required": false },
      "active": {"type": Boolean, "required": true },
      "timestamp": {
          "created": {"type": String, "required": true, "unique": false },
          "lastSeen": {"type": String, "required": true, "unique": false },
      }
  }

  • If a username already exist, return an error message.
  • User password should have a length of eight characters or more.
  • User password must be strong (Must contain special characters ).
  • E-mail should be a valid email address.
  • Active should be true by default.
  • User momentjs for timestamp
  • Password should be encrypted using bcrypt

Login

  • User need need use username and password to login.
  • Validate password using bcrypt
  • if a username don't exist, redirect to registration page.

Pages

Home
  • A user should be able to search and get results. Use onChange event.
  • Results should be display in a card form.
  • User should be able to add a track to a playlist to play later
  • User should be able to view more details
Profile
  • User should be able to change password, and email address.
  • User should be able to deactivate account.
Playlist
  • User should be able to remove track.
  • User should be able to view all track in the playlist

Routes

Methods Path Description
GET /signIn Login page
GET /signUp Create new account
GET /:username Home page
GET /profile/:username View user profile
GET /:username/track View more details.
GET /playlist/:username Display all tracks in playlist
POST /signIn
POST /signUp
POST /add/:username/ Add track to playlist
POST /profile/:username Update user profile
POST /playlist/:username/:trackId Remove track from playlist

Use this api link to search: https://itunes.apple.com/search?term= + searchKey

  • use postman to test the api link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment