Skip to content

giteshChauhan/project_vidly

Repository files navigation

project_vidly : Backend Service

Frontend

About:

  • Learnings from MERN have been put to this project.

  • This is the backend of projectvidly web application build on nodejs which was deployed on digitalOcean.

  • Meanwhile frontend is build on reactjs which was deployed on netlify

  • Also database used: MongoDB Cloud aka Altas

  • As backend is deployed on digitalOcean and frontend on netlify, therefore CORS policy is resolved. Now only this frontend can use our backend

Config:

Set custom environment variables.
  1. project_vidly_env=""
  2. project_vidly_db=""
  3. project_vidly_private_key=""
  4. project_vidly_email=""
  5. project_vidly_pass=""

APIs:

  1.  POST/api/register : to register an user. Returns user-token.
    Needs: {
        "name": "",
        "email": "",
        "pasword": "",
        "ip": "",
        "userMetaInfo": "",
        "os": "",
    }
  2.  POST/api/login : to login an user. Returns user-token.
    Needs: {
        "email": "",
        "pasword": ""
    }
    •  GET/api/movies : to get all listed movies.
      Needs: {}
    •  GET:id/api/movies : to get movie by id.
      Needs: user-token
    •  POST/api/movies : to add new movie into database. Only admins can access.
      Header: user-token
      Body:{
          "title": "",
          "genreId": "",
          "yt_id": "",
          "imdb_id": "",
          "year": "",
          "rating": "",
          "cinema": "",
          "contentType": "",
          "thumbnailUrl": "",
      } 
    •  PUT:id/api/movies : to update a movie by id. Only admins can access.
      Header: user-token
      Body:{
          "title": "",
          "genreId": "",
          "yt_id": "",
          "imdb_id": "",
          "year": "",
          "rating": "",
          "cinema": "",
          "contentType": "",
          "thumbnailUrl": "",
      }
    •  DELETE/api/movies : to delete a movie by id. Only admins can access.
      Needs: user-token
    •  GET/api/genres : to get all listed genres.
      Needs: {}
    •  GET:id/api/genres : to get genre by id.
      Needs: user-token
    •  POST/api/genres : to add new genre into database. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  PUT:id/api/genres : to update a genre by id. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  DELETE/api/genres : to delete a genre by id. Only admins can access.
      Needs: user-token
    •  GET/api/cinema : to get all listed cinema.
      Needs: {}
    •  GET:id/api/cinema : to get genre by id.
      Needs: user-token
    •  POST/api/cinema : to add new genre into database. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  PUT:id/api/cinema : to update a genre by id. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  DELETE/api/cinema : to delete a genre by id. Only admins can access.
      Needs: user-token
    •  GET/api/contenttype : to get all listed contenttype.
      Needs: {}
    •  GET:id/api/contenttype : to get genre by id.
      Needs: user-token
    •  POST/api/contenttype : to add new genre into database. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  PUT:id/api/contenttype : to update a genre by id. Only admins can access.
      Header: user-token
      Body: {
          "name" : ""
      }
    •  DELETE/api/contenttype : to delete a genre by id. Only admins can access.
      Needs: user-token
    •  GET/api/history : to get user's history.
      Needs: user-token
    •  POST/api/history : to post each movie played to history.
      Header: user-token
      Body: {
          "movieId": "",
      }
    •  GET/api/watchlater : to get user's watch later movies.
      Needs: user-token
    •  POST/api/watchlater : to post user's movie to watch later.
      Header: user-token
      Body: {
          "movieId": "",
      }
    •  GET/api/feedback : to get user's feedback.
      Needs: user-token
    •  GET/api/feedback/all : to get all user's sent feedbacks. Only admins can access.
      Needs: user-token
    •  POST/api/feedback : to post user's feedback.
      Body: {
          "email": "",
          "feedback": "",
          "ip": "",
      }
      
  3. Views & utils:

    • views/welcomeMessage.handlebars : handlebar template sent via email when new user registers'.
    • utils/mail.js : nodemailer transporter to send emails to users.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published