Awesome Node.js Tools, Libraries and Resources
Tags: node, opensource
Published: 2020-12-31 13:18:03

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 <a href="https://codeforgeek.com/node-js-tutorial-step-by-step/" rel="noopener noreferrer" target="_blank">entry-level complete Node.js tutorial</a> for beginners to get started.

<h2>Web frameworks</h2>
Here are some of the popular and widely used web frameworks available in the Node.js ecosystem.
<ul>
	<li><a href="https://github.com/expressjs/express" rel="noopener noreferrer" target="_blank">Express</a> - 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 <a href="https://codeforgeek.com/express-nodejs-tutorial/" rel="noopener noreferrer" target="_blank">Express framework</a> and this article is served by an <a href="https://codeforgeek.com/expressjs-router-tutorial/" rel="noopener noreferrer" target="_blank">Express router</a> :) </li>

	<li><a href="https://github.com/koajs/koa" rel="noopener noreferrer" target="_blank">Koa</a> - A expressive framework designed by the team behind Express. Koa aims to provide enjoyable experience to developers while building a web application.</li>
	<li><a href="https://github.com/hapijs/hapi" rel="noopener noreferrer" target="_blank">Hapi</a> - a simple and secure framework to build web applications.</li>
	<li><a href="https://sailsjs.com/" rel="noopener noreferrer" target="_blank">Sails.js</a> - MVC (Model - view - controller) framework for Node.js.</li>
	<li><a href="https://github.com/fastify/fastify" rel="noopener noreferrer" target="_blank">Fastify</a> - Fastify is a web framework entirely focused on speed. It is one of the fastest framework in the Node.js ecosystem. </li>
	<li><a href="https://github.com/senecajs/seneca" rel="noopener noreferrer" target="_blank">Seneca</a> - It's a tool to write <a href="https://codeforgeek.com/microservices-nodejs/" rel="noopener noreferrer" target="_blank">microservices</a> based application in Node.</li>
	<li><a href="https://moleculer.services/" rel="noopener noreferrer" target="_blank">Molecular</a> - A mature, fast and powerful microservices framework for Node.js.</li>
	<li><a href="https://github.com/adonisjs/" rel="noopener noreferrer" target="_blank">AdoniJS</a> - is a framework to write micro-services easily.</li>
</ul>

<h2>HTTP and Networking Stuff</h2>
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.

<ul>
	<li><a href="https://github.com/mzabriskie/axios" rel="noopener noreferrer" target="_blank">Axios</a> - A widely used HTTP client for Node as well as the browser.</li>
	<li><a href="https://github.com/sindresorhus/got" rel="noopener noreferrer" target="_blank">got</a> - A simple and lightweight interface to make HTTP calls.</li>
	<li><a href="https://github.com/http-party/node-http-proxy" rel="noopener noreferrer" target="_blank">HTTP proxy</a> - a very useful tool to build a proxy server effortlessly especially in a microservice architecture.</li>
	<li><a href="https://github.com/micromata/http-fake-backend" rel="noopener noreferrer" target="_blank">HTTP fake backend</a> - a huge time saver tool. Allows you to create a fake backend server for the test and demo apps.</li>
	<li><a href="https://github.com/kevva/download" rel="noopener noreferrer" target="_blank">download</a> - utility to download files from a URL and save it in file system.</li>
	<li><a href="https://github.com/bevry/getmac" rel="noopener noreferrer" target="_blank">getmac</a> - get the MAC address of your computer.</li>
</ul>

<h2>Database drivers and ODM/ORM</h2>
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.
<ul>
	<li><a href="https://github.com/mysqljs/mysql" rel="noopener noreferrer" target="_blank">MySQL</a> - A pure JavaScript based driver to integrate with MySQL database. We have written a detailed tutorial about <a href="https://codeforgeek.com/nodejs-mysql-tutorial/" rel="noopener noreferrer" target="_blank">Node.js and MySQL</a>.</li>

	<li><a href="https://github.com/mongodb/node-mongodb-native" rel="noopener noreferrer" target="_blank">MongoDB</a> - A MongoDB database driver. Refer <a href="https://codeforgeek.com/node-mongodb-tutorial/" rel="noopener noreferrer" target="_blank">this tutorial</a> to learn how to use this driver to connect to MongoDB.</li>
	<li><a href="https://github.com/Automattic/mongoose" rel="noopener noreferrer" target="_blank">Mongoose</a> - A MongoDB object data model i.e ODM. </li>
	<li><a href="https://github.com/brianc/node-postgres" rel="noopener noreferrer" target="_blank">PostgreSQL</a> - A database client for PostgreSQL database.</li>
	<li><a href="https://www.npmjs.com/package/redis" rel="noopener noreferrer" target="_blank">Redis</a> - A client for redis key value database.</li>
	<li><a href="https://github.com/Level/levelup" rel="noopener noreferrer" target="_blank">LevelUP</a> - A levelDB database.</li>
	<li><a href="https://github.com/couchbase/couchnode" rel="noopener noreferrer" target="_blank">Couchbase</a> - A client for a couchbase database.</li>
	<li><a href="https://github.com/balderdashy/waterline" rel="noopener noreferrer" target="_blank">Waterline</a> - A database agnostic that can interact with one or more database.</li>
</ul>
<h2>Logging</h2>
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.
<ul>
	<li><a href="https://github.com/winstonjs/winston" rel="noopener noreferrer" target="_blank">winston</a> - Asynchronous multi-transport logging library.</li>

	<li><a href="https://github.com/pinojs/pino" rel="noopener noreferrer" target="_blank">pino</a> - Fast logging library.</li>

	<li><a href="https://github.com/guigrpa/storyboard" rel="noopener noreferrer" target="_blank">storyboard</a> - a real time and colorful log.</ul>
</li>

<h2>Documentation</h2>
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.
<ul>
	<li><a href="https://github.com/jsdoc3/jsdoc" rel="noopener noreferrer" target="_blank">JSDoc</a> - API documentation generator similar to JavaDoc.</li>
	<li><a href="https://github.com/documentationjs/documentation" rel="noopener noreferrer" target="_blank">documentation</a> - library with modern JavaScript support.</li>
	<li><a href="https://github.com/esdoc/esdoc" rel="noopener noreferrer" target="_blank">ESDoc</a> - documentation generator with ES2015 support.</li>
</ul>
<h2>Control flow</h2>
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.
<ul>
	<li><a href="https://github.com/caolan/async" rel="noopener noreferrer" target="_blank">async</a> - a popular library to write asynchronous code in JavaScript using callbacks.</li>
	<li><a href="https://github.com/petkaantonov/bluebird" rel="noopener noreferrer" target="_blank">Bluebird</a> - a library to handle and write asynchronous code using promises.</li>
</ul>

<h2>Streams</h2>
<ul>
	<li><a href="https://github.com/sindresorhus/get-stream" rel="noopener noreferrer" target="_blank">get-stream</a> - library to get a stream as a buffer or string.</li>
	<li><a href="https://github.com/feross/multistream" rel="noopener noreferrer" target="_blank">multistream</a> - combine multiple steams into a single stream.</li>
	<li><a href="https://github.com/sindresorhus/into-stream" rel="noopener noreferrer" target="_blank">into-stream</a> - convert existing buffer, array, string into a stream.</li>
</ul>
<h2>Real time</h2>
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.
<ul>
	<li><a href="https://github.com/socketio/socket.io" rel="noopener noreferrer" target="_blank">Socket.io </a>- A really useful library to develop real time web application.</li>

	<li><a href="https://github.com/uWebSockets/uWebSockets" rel="noopener noreferrer" target="_blank">uWebSockets</a> - A library that support event based real time features.</li>

	<li><a href="https://github.com/deepstreamIO/deepstream.io-client-js" rel="noopener noreferrer" target="_blank">deepstream.io</a> - A scalable real time framework to develop advanced application like games,etc.</li>

	<li><a href="https://github.com/mqttjs/MQTT.js" rel="noopener noreferrer" target="_blank">MQTT</a> - A pubsub library to develop applications with lightweight communication.</li>
</ul>
<h2>Authentication and Authorization</h2>
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.
<ul>
	<li><a href="https://github.com/jaredhanson/passport" rel="noopener noreferrer" target="_blank">Passport</a> - A widely used authentication library that support wide range of SSO.</li>
	<li><a href="https://github.com/simov/grant" rel="noopener noreferrer" target="_blank">Grant</a> - A middleware for web frameworks such as Express, koa, and Hapi.</li>
	<li><a href="https://github.com/casbin/node-casbin" rel="noopener noreferrer" target="_blank">node-casbin</a> - Authorization library with ACL, RBAC and ABAC access control support.</li>
</ul>
<h2>Email</h2>
You can use the libraries mentioned below to send an email from your application. 
<ul>
	<li><a href="https://github.com/andris9/Nodemailer" rel="noopener noreferrer" target="_blank">Nodemailer</a> - A popular and widely used library to send emails.</li>

	<li><a href="https://github.com/eleith/emailjs" rel="noopener noreferrer" target="_blank">emailjs</a> - A simple and useful library to send text/html emails with attachment.</li>

	<li><a href="https://github.com/mjmlio/mjml" rel="noopener noreferrer" target="_blank">MJML</a> - Markup based to create responsive emails.</li>

</ul>
<h2>Job Queues and Message queues</h2>
Job quues and message queues allows you to develop complex applications and schedule your job based on the requirenment. 
<ul>
	<li><a href="https://github.com/OptimalBits/bull" rel="noopener noreferrer" target="_blank">bull</a> - extensible job and message queue. We use bull in Codeforgeek.</li>

	<li><a href="https://github.com/rschmukler/agenda" rel="noopener noreferrer" target="_blank">agenda</a> - Job scheduler using mongodb as a backend.</li>

	<li><a href="https://github.com/taskrabbit/node-resque" rel="noopener noreferrer" target="_blank">node-resque</a> - Job queue based on Redis.</li>

	<li><a href="https://github.com/smrchy/rsmq" rel="noopener noreferrer" target="_blank">rsmq</a> - Message queue based on Redis.</li>

	<li><a href="https://github.com/bbc/sqs-consumer" rel="noopener noreferrer" target="_blank">sqs-consumer</a> - library to handle amazon simple queue service in your application.</li>
</ul>

<h2>Process Management</h2>
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.
<ul>
	<li><a href="https://github.com/Unitech/pm2" rel="noopener noreferrer" target="_blank">PM2</a> - a popular and widely used process manager for Node. We use PM2 in codeforgeek.</li>

	<li><a href="https://github.com/remy/nodemon" rel="noopener noreferrer" target="_blank">nodemon</a> - monitor changes in your file and restart the server on change detection.</li>

	<li><a href="https://github.com/petruisfan/node-supervisor" rel="noopener noreferrer" target="_blank">supervisor</a> - process manager which restarts the server upon crash.</li>
</ul>
<h2>Static Site Generator</h2>
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.
<ul>
	<li><a href="https://github.com/jnordberg/wintersmith" rel="noopener noreferrer" target="_blank">Wintersmith</a> - Multi-platform static site generator.</li>

	<li><a href="https://github.com/assemble/assemble/" rel="noopener noreferrer" target="_blank">Assemble</a> - Static site generator with a grunt extension.</li>

	<li><a href="https://github.com/docpad/docpad" rel="noopener noreferrer" target="_blank">DocPad</a> - static site generator with wide range of plugin ecosystem.</li>
</ul>
<h2>Content Management System</h2>
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.
<ul>
	<li><a href="https://github.com/TryGhost/Ghost" rel="noopener noreferrer" target="_blank">Ghost</a> - widely popular blogging and content management framework and platform.</li>

	<li><a href="https://github.com/hexojs/hexo" rel="noopener noreferrer" target="_blank">Hexo</a> - Simple yet powerful blogging framework.</li>

	<li><a href="https://github.com/NodeBB/NodeBB" rel="noopener noreferrer" target="_blank">nodeBB</a> - forum platform in Node.js.</li>

	<li><a href="https://github.com/keystonejs/keystone" rel="noopener noreferrer" target="_blank">KeystoneJS</a> - content management system built on Express and MongoDB.</li>

	<li><a href="https://github.com/strapi/strapi" rel="noopener noreferrer" target="_blank">Strapi</a> - Headless content management system to build API's.</li>

	<li><a href="https://buttercms.com/docs/api-client/nodejs" rel="noopener noreferrer" target="_blank">ButterCMS</a> - Headless content management system.</li>
</ul>

<h2>Hardware</h2>
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.
<ul>
	<li><a href="https://github.com/rwaldron/johnny-five" rel="noopener noreferrer" target="_blank">Johnny-Five</a> - The JavaScript Robotics Programming Framework.</li>

	<li><a href="https://github.com/voodootikigod/node-serialport" rel="noopener noreferrer" target="_blank">Node Serialport</a> - Access serial port with Node. Works on cross-platform.</li>

	<li><a href="https://github.com/nonolith/node-usb" rel="noopener noreferrer" target="_blank">USB</a> - Node library for communicating with USB devices.</li>

	<li><a href="https://github.com/fivdi/onoff" rel="noopener noreferrer" target="_blank">onoff</a> - Supports RaspberryPI communication.</li>

	<li><a href="https://github.com/infusion/GPS.js" rel="noopener noreferrer" target="_blank">GPS</a> - Library to handle GPS receiver communication.</li>
</ul>

<h2>Miscellaneous</h2>
<ul>
	<li><a href="https://github.com/atom/electron" rel="noopener noreferrer" target="_blank">Electron</a> - Build a cross-platform desktop application using Node and JavaScript.</li>

	<li><a href="https://github.com/peterbraden/node-opencv" rel="noopener noreferrer" target="_blank">OpenCV</a> - Binding for OpenCV computer vision library.</li>

	<li><a href="https://github.com/indexzero/nconf" rel="noopener noreferrer" target="_blank">nconf</a> - Nodejs configuration file management.</li>

	<li><a href="https://github.com/cheeriojs/cheerio" rel="noopener noreferrer" target="_blank">Cheerio</a> - HTML DOM parser for Node and JavaScript.</li>

	<li><a href="https://github.com/Marak/Faker.js" rel="noopener noreferrer" target="_blank">Faker.js</a> - Generate huge amounts of fake data.</li>

</ul>

<h2>Conclusion</h2>
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 <a href="https://github.com/shaikh-shahid/awesome-node#natural-language-processing" rel="noopener noreferrer" target="_blank">here</a>.

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