paint-brush
Fast Development With NodeJS: NestJS Boilerplateby@rodik
1,641 reads
1,641 reads

Fast Development With NodeJS: NestJS Boilerplate

by Rodion SalnikMarch 17th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

NestJS boilerplate is a project that contains all necessary libraries and solutions like auth, mailing, etc. for fast-starting your project using a classic REST API approach. Created in August 2020 it now has more than 600 stars on Github, and quite a big community around helping to develop it feature.
featured image - Fast Development With NodeJS: NestJS Boilerplate
Rodion Salnik HackerNoon profile picture

NestJS boilerplate is a project that contains all necessary libraries and solutions like auth, mailing, etc., for fast-starting your project using a classic REST API approach.


Created in August 2020, it now has more than 600 stars on GitHub, and quite a big community around helping to develop it feature.

Motivation

I'm working for outsourcing company Brocoders, where we start a new project from scratch quite often. NestJS is a popular framework for Node.js, and we use it widely.


However, setting up the project from scratch every time can be time-consuming, involving stuff such as configuring the database, migrations, seeding, mailing, sign-in, sign-up, translations, file uploading, etc.


To solve this problem, we created NestJS REST API Boilerplate with preconfigured basic features to reduce app setup time from 1 month to just a few hours.


At the time we started our own boilerplate, there weren’t great production-ready alternatives, so we decided to develop our own solution that eventually became quite popular in other companies too.

Modules and Features

We put the most popular modules always requested by our clients and put them together into a Boilerplate. So we finally have such a list of features included from the box:


  • Database (PostgreSQL, TypeORM).
  • Seeds (test data)
  • Config Service (@nestjs/config).
  • Mailing (nodemailer, u/nestjs-modules/mailer).
  • Sign in and sign up via email
  • Forgot password
  • Social sign in (Apple, Facebook, Google, Twitter)
  • Admin and User roles
  • Serialization
  • Translations I18N (nestjs-i18n)
  • File uploads. Support local and Amazon S3 drivers
  • Swagger for API documentation
  • E2E and units tests
  • Docker
  • CI (Github Actions)

Summary

If you want start a project faster - you can try NestJS REST API boilerplate. It's quite simple, supported by our company, and well-written (I hope :-) )


The main objective in our plans currently is to improve documentation and keep all the dependencies up-to date. And if somebody has any other ideas or want to become a contributor - we are always happy to meet new friends and accept pull requests.


Full Credits to the main developer: Vlad Shchepotin 🇺🇦