DEV Community

Cover image for Awesome Node.js Tools, Libraries and Resources
Shahid Shaikh
Shahid Shaikh

Posted on

Awesome Node.js Tools, Libraries and Resources

Node.js is equipped with a rich ecosystem of tools, libraries, and frameworks to help developers build their application faster, safer, and follow the standard industry guidelines on software development.

While there are hundreds of thousands of packages registered in the official node package manager repository, we have shortlisted a few based on the reputation and usability for a day to day software development.

Let's jump in directly and check out some of the awesome Node.js tools, libraries, and frameworks. If you are new to Node, you can read our entry-level complete Node.js tutorial for beginners to get started.

Web frameworks

Here are some of the popular and widely used web frameworks available in the Node.js ecosystem.

  • Express - A complete web application framework to develop various types of web applications such as Web server, API server,etc. We built this site on top of Express framework and this article is served by an Express router :)
  • Koa - A expressive framework designed by the team behind Express. Koa aims to provide enjoyable experience to developers while building a web application.
  • Hapi - a simple and secure framework to build web applications.
  • Sails.js - MVC (Model - view - controller) framework for Node.js.
  • Fastify - Fastify is a web framework entirely focused on speed. It is one of the fastest framework in the Node.js ecosystem.
  • Seneca - It's a tool to write microservices based application in Node.
  • Molecular - A mature, fast and powerful microservices framework for Node.js.
  • AdoniJS - is a framework to write micro-services easily.

HTTP and Networking Stuff

Node.js is widely used in building networking applications. There will come a scenario where you as a developer asked to integrate third-party APIs such as payment API, invoice API, etc. To handle these tasks, you can use the libraries mention below.

  • Axios - A widely used HTTP client for Node as well as the browser.
  • got - A simple and lightweight interface to make HTTP calls.
  • HTTP proxy - a very useful tool to build a proxy server effortlessly especially in a microservice architecture.
  • HTTP fake backend - a huge time saver tool. Allows you to create a fake backend server for the test and demo apps.
  • download - utility to download files from a URL and save it in file system.
  • getmac - get the MAC address of your computer.

Database drivers and ODM/ORM

There is really no need to mention how important the database is for your application. Node.js can be integrated with almost every popular database.

  • MySQL - A pure JavaScript based driver to integrate with MySQL database. We have written a detailed tutorial about Node.js and MySQL.
  • MongoDB - A MongoDB database driver. Refer this tutorial to learn how to use this driver to connect to MongoDB.
  • Mongoose - A MongoDB object data model i.e ODM.
  • PostgreSQL - A database client for PostgreSQL database.
  • Redis - A client for redis key value database.
  • LevelUP - A levelDB database.
  • Couchbase - A client for a couchbase database.
  • Waterline - A database agnostic that can interact with one or more database.

Logging

Logging is an essential part of any web application. Node.js has some of the best logging library available. I personally uses winston a lot in my projects. It has rich set of plugins to extend the logging feature as per the requirenments.

  • winston - Asynchronous multi-transport logging library.
  • pino - Fast logging library.
  • storyboard - a real time and colorful log.

Documentation

The only thing which almost every developer hate is creating a documentation. I know, I do too. But, it's an important thing to create a well written documentation as you write your beautiful code.

  • JSDoc - API documentation generator similar to JavaDoc.
  • documentation - library with modern JavaScript support.
  • ESDoc - documentation generator with ES2015 support.

Control flow

Node.js is asynchrnous in nature and it's little different than what we used to in high level languages such as Java, C++,etc. We can leverage libraries mentioned below to make our life little bit easier while writing Node.js application.

  • async - a popular library to write asynchronous code in JavaScript using callbacks.
  • Bluebird - a library to handle and write asynchronous code using promises.

Streams

  • get-stream - library to get a stream as a buffer or string.
  • multistream - combine multiple steams into a single stream.
  • into-stream - convert existing buffer, array, string into a stream.

Real time

Node.js can be used to build a real time systems. I have used these library in some of the projects and they are pretty good.

  • Socket.io - A really useful library to develop real time web application.
  • uWebSockets - A library that support event based real time features.
  • deepstream.io - A scalable real time framework to develop advanced application like games,etc.
  • MQTT - A pubsub library to develop applications with lightweight communication.

Authentication and Authorization

When you are building any web application, the most common part is going to be user authentication. You don't need to develop the modules again, Node.js libraries will cover it for you. The libraries listed below are tried and test library in thousands of projects.

  • Passport - A widely used authentication library that support wide range of SSO.
  • Grant - A middleware for web frameworks such as Express, koa, and Hapi.
  • node-casbin - Authorization library with ACL, RBAC and ABAC access control support.

Email

You can use the libraries mentioned below to send an email from your application.

  • Nodemailer - A popular and widely used library to send emails.
  • emailjs - A simple and useful library to send text/html emails with attachment.
  • MJML - Markup based to create responsive emails.

Job Queues and Message queues

Job quues and message queues allows you to develop complex applications and schedule your job based on the requirenment.

  • bull - extensible job and message queue. We use bull in Codeforgeek.
  • agenda - Job scheduler using mongodb as a backend.
  • node-resque - Job queue based on Redis.
  • rsmq - Message queue based on Redis.
  • sqs-consumer - library to handle amazon simple queue service in your application.

Process Management

Node.js as a process is tricky to manage. Thanks to the libraries mentioned below especially PM2, managing a Node process is piece of cake.

  • PM2 - a popular and widely used process manager for Node. We use PM2 in codeforgeek.
  • nodemon - monitor changes in your file and restart the server on change detection.
  • supervisor - process manager which restarts the server upon crash.

Static Site Generator

Static sites are pretty popular now a days. With the adoption of gatsby and Netlify, things are moving towards the right direction. You can use the libraries mentioned below to create the static site using Node.

  • Wintersmith - Multi-platform static site generator.
  • Assemble - Static site generator with a grunt extension.
  • DocPad - static site generator with wide range of plugin ecosystem.

Content Management System

Node.js has been used to develop some of the best CMS such as Ghost. You can any libraries and platforms mentioned below to create your CMS and manage your content.

  • Ghost - widely popular blogging and content management framework and platform.
  • Hexo - Simple yet powerful blogging framework.
  • nodeBB - forum platform in Node.js.
  • KeystoneJS - content management system built on Express and MongoDB.
  • Strapi - Headless content management system to build API's.
  • ButterCMS - Headless content management system.

Hardware

You can use Node in hardware devices as well. I have personally used Node in raspberryPI and it works great. You can use libraries mentioned below to build a DIY hardware projects.

  • Johnny-Five - The JavaScript Robotics Programming Framework.
  • Node Serialport - Access serial port with Node. Works on cross-platform.
  • USB - Node library for communicating with USB devices.
  • onoff - Supports RaspberryPI communication.
  • GPS - Library to handle GPS receiver communication.

Miscellaneous

  • Electron - Build a cross-platform desktop application using Node and JavaScript.
  • OpenCV - Binding for OpenCV computer vision library.
  • nconf - Nodejs configuration file management.
  • Cheerio - HTML DOM parser for Node and JavaScript.
  • Faker.js - Generate huge amounts of fake data.

Conclusion

I would highly recommend you to bookmark this article. We will upgrade this article based on the suggestion and feedback from all of you. If you like to add/remove something from the list, please let me know in the comments or you can make a pull request here.

This article was first published at https://codeforgeek.com/awesome-node-js-tools-libraries-and-resources/

Top comments (0)