Jobs API

Jobs API is a simple set of APIs developed using the nodejs. In this project we used JWT for user authentication and authorization. As well as developed a swagger UI for accessing the APIs easily.

Visit the Live demo on render > please note that this project is deployed with Render’s free instance types which spin-down with inactivity.

Installation

  1. Download and Install Dependencies
npm install
  1. Navigate to the dist folder and run
node ./dist/app.js
  1. If you're working on development, write your code in the src folder and run the following command in the root folder to enable TypeScript auto-compilation:
tsc --watch

TypeScript will automatically compile your code to JavaScript and output it to the dist folder upon file changes.

Technology Stack

  • Nodejs
  • Express
  • Mongodb
  • Mongoose
  • Swagger
  • Helmet
  • Cors
  • XSS-clean
  • express-rate-limit
  • TypeScript

Features Added

  • Custom Error Handling Developed comprehensive error handling for the TypeScript backend, ensuring better user feedback and system stability. Meaningful error messages are now returned for various scenarios, enhancing the user experience.

  • Backend Enhancement Expanded the backend functionality to include mongoose validation. These additions provide users with more powerful tools to manage their tasks effectively.

Known Issues

  • Not proper input validation This project is a very simple application as used as a practice for swagger and jwt, that is why it does not have proper input validation. In future developments I have plan to add them.

  • Longer time to load This project is deployed using Render's Web Services on the free instance type, which automatically spun down after 15 minutes of inactivity. When a new request for a free service comes in, Render spins it up again so it can process the request. This will cause a delay in the response of the first request after a period of inactivity while the instance spins up. However, once it's up, the app functions smoothly.

    The deployment is located on a server in Singapore, while the MongoDB database is deployed in Mumbai. This geographic distribution facilitates easier development.

Credits

This project was inspired by and developed as part of John Smilga's John Smilga's NodeJS Tutorial and Projects Course