MyFlix Backend

cineF

The project aimed to create a RESTful API for storing information on various movies. The study goals included learning about NodeJS, databases (both SQL and NoSQL), and general API concepts. The API was utilized for backend rendering in the development of client-side applications like Cineflix and Myflix movie apps.

Development approach

For constructing the RESTful API, I employed Node.js and Express, interacting with a non-relational database, MongoDB. Mongoose was utilized for modeling business logic, defining data schema, and performing CRUD operations for movie data. Authentication and authorization were managed using JSON Web Tokens (JWT), and data validation logic was implemented for accuracy and security. Postman was used to test API endpoints, and API responses were documented.

Features

  • A Node.js and Express application.
  • The API uses REST architecture, with URL endpoints corresponding to different data operations.
  • API contains middleware modules, such as the body-parser package for reading data from requests and morgan for logging.
  • The API uses a “package.json” file.
  • The database is built using MongoDB.
  • The business logic is modeled with Mongoose.
  • The API provides movie information in JSON format.
  • The CRUD endpoints are tested in Postman.
  • The API includes user authentication and authorization code.
  • Data validation is implemented.
  • Data security regulations are met by the API.
  • The source code is deployed to a publicly accessible platform like GitHub.
  • The API is deployed to Heroku.

Tech stack

  • JavaScript
  • node.js
  • Express
  • Non-relational DB on MongoDB Atlas
  • Postman (API endpoint testing)
  • JSDoc for documentation
  • Heroku

Libraries and dependencies

  • bcrypt
  • Morgan
  • JSONwebToken
  • bodyParser
  • mongoose
  • CORS
  • Passport

Live links

Challenges and merits

Grasping the concepts of RESTful architecture, authentication, authorization, data modeling, error handling, testing, and performance optimization presented initial challenges. However, through persistent learning and guidance from online resources and dedicated tutors, I successfully mastered these concepts.