The Best Node.js Boilerplate to Speed Up Your Project Development
Which option is right for your project?
What is Boilerplate?
Boilerplate is the term used to describe sections of code that can be included in many places with little or no alteration. It is more often used when referring to languages which are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs. Boilerplate code is a piece of code which can be used over and over again or we can say it, a piece of reusable code.
Here is a list of boilerplate code you should consider when starting your Node.js project:
- Sahat Boilerplate
The first is Sahat boilerplate. Sahat for Node.js web applications is the most complete boilerplate and comes with a complex package. Sahat makes it as generic and reusable as possible to cover most use cases of hackathon web apps, without being too specific. In the worst case, you can use this as a learning guide for your projects. They have over 24k stars on GitHub.
A boilerplate for Node.js web applications. Contribute to sahat/hackathon-starter development by creating an account on…
2. Kriasoft Boilerplate
Kriasoft creates a Node.js API starter; this is a boiler and a tool for creating API data backend with Node.js, GraphQL, and bundle with Docker. This boilerplate is the most suitable for developing the GraphQL API endpoint. It can be built as an independent microservice or for creating a web front-end back-up and mobile application. If you are interested in GraphQL, this boilerplate is recommend to start your project.
Boilerplate and tooling for authoring data API backends with Node.js and GraphQL - kriasoft/nodejs-api-starter
3. Madhums’ Boilerplate
Madhums’ boilerplate is a boilerplate application for building web apps using Express, Mongoose, and Passport. Madhums’ boilerplate comes with MVC base pattern to implement the project. If you are familiar with MVC pattern it can be easier to switch from another language to Node.js
A boilerplate application for building web apps using express, mongoose and passport. - madhums/node-express-mongoose
4. Icebob Boilerplate
Icebob boilerplate is a full-stack web app boilerplate project with VueJS, ExpressJS, and MongoDB. Inspired by Sahat boilerplate, it focused on a starter project which contains common functions like user signup, login, OAuth, and user profile. So, we can create a new web app and only need to develop the business logic.
star: MEVN Full stack JS web app boilerplate with NodeJS, Express, Mongo and VueJS …
5. Talyssonoc Node API boilerplate
The last one is Talyssonoc Node API boilerplate. This boilerplate was built for creating backend API. The folder structure and logical architecture of this boilerplate focused on the separation of concerns based on domain-driven design and clean architecture. Instead of using the MVC pattern, this boilerplate has layers inside the src folder. Each of the folder layers is scoping by a namespace on the concern it is about (like the user, errors, logging and so on). For detailed information about the structure behind the boilerplate, read this. Unlike the others, this API base boilerplate by Talyssonoc is the simplest way to install the API project.
All boilerplates have advantages and disadvantages, each depending on the type of project. You can choose Sahat or Icebob to create an application with back end and front end support. Talyssonoc, Kriasoft, or Madhums boilerplate is suitable to create an API back end. You can choose Madhums boilerplate if you’re familiar with the MVC pattern, but if you’re looking for clean architecture and scalability, go for Talyssonoc.