Skip to content

Backend API in Nodejs for Movie management Application (Presedio Task)

Notifications You must be signed in to change notification settings

SanjayKumar-M/movizo

Repository files navigation

Movizo - Backend API for Movie Management

Movizo is a backend API that allows users to register, log in, and perform various operations related to movie management. Users can create, retrieve, update, and delete movies, as well as filter movies based on specific criteria.

Table of Contents

Registration and Login

  1. Register User:

    • Endpoint: [POST] https://movizo.vercel.app/users/register
    • Request Body:
      {
          "username": "Sanjay",
          "email": "[email protected]",
          "password": "sanjay"
      }
    • Response: New user created
  2. Login:

    • Endpoint: [POST] https://movizo.vercel.app/users/login
    • Request Body:
      {
          "email": "[email protected]",
          "password": "sanjay"
      }
    • Response: Token (valid for 15 minutes)

Get All Movies

  1. Get All Movies:
    • Endpoint: [GET] https://movizo.vercel.app/movies
    • Authorization: Bearer Token (Generated from login)
    • Response: Empty array (No movies created)

Create a Movie

  1. Create a Movie:
    • Endpoint: [POST] https://movizo.vercel.app/movies
    • Authorization: Bearer Token (Generated from login)
    • Request Body:
      {
        "name": "Leo End",
        "director": "Lokesh",
        "year": "2024",
        "language": "Tamil",
        "rating": 8
      }
    • Response: Movie details stored in MongoDB

Get Movies by Name

  1. Get Movies by Name:
    • Endpoint: [GET] https://movizo.vercel.app/movies/{movieName}
    • Authorization: Bearer Token
    • Response: Movie details (if exists)

Delete a Movie

  1. Delete a Movie:
    • Endpoint: [DELETE] https://movizo.vercel.app/movies/{movieName}
    • Authorization: Bearer Token
    • Response: Movie deleted successfully

Update a Movie

  1. Update a Movie:
    • Endpoint: [PUT] https://movizo.vercel.app/movies/{movieName}
    • Authorization: Bearer Token
    • Request Body:
      {
        "name": "Leo End Updated",
        "director": "Lokesh Kanagaraj",
        "year": "2024",
        "language": "Tamil",
        "rating": 10
      }
    • Response: Movie updated successfully

Filter Movies

  1. Filter Movies:
    • Endpoint: [GET] https://movizo.vercel.app/movies/filter?name={anyMovie}
      • (or) https://movizo.vercel.app/movies/filter?language={anyLang}
      • (or) https://movizo.vercel.app/movies/filter?year={anyYear}
    • Authorization: Bearer Token
    • Response: Filtered movies based on the specified criteria

Additional Notes

  • The token generated during login is valid for 15 minutes.
  • Work in progress for additional features.

Still working on movizo to make some cool feature, feel free to contribute

--Sanjay

Some snaps!

Screenshot from 2023-11-20 01-59-33

Screenshot from 2023-11-20 01-59-59

Screenshot from 2023-11-20 02-00-22

Screenshot from 2023-11-20 02-00-53

About

Backend API in Nodejs for Movie management Application (Presedio Task)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published