Setting up an opinionated starter NestJS Starter TypeScript Project with must-have libraries

Eli Elad Elrom
6 min readApr 22, 2022

This article will cover how to set up a starter NestJS professional project with must-have libraries including typescript, linting, formatting, testing, authentication, API docs, and much more. See the final project here:

Background: When it comes to NodeJS Express projects there are two main popular ways to go at the time of writing, either NodeJS+Express pure project or use NestJS.

NestJS sits on top of Node and provides the MVCs structure so your project is clean as well as provides plugins to get the job done quickly. If you ever developed an Angular project you will feel at home but even React developers can appreciate the organization and the straightforward approach.

I created a NestJS starter project that can be used as a starter project with some minimum libraries to help get a project up and running quickly. I have added the following;

- Eslint
- Husky
- Jest
- NestJS
- nestjs-pino
- Node
- Passport
- Prettier
- TypeScript
- Swagger
- Webpack (to enable Hot Module Replacement)

In terms of run scripts;

"prebuild": "rimraf dist",
"check-types": "tsc",
"build": "nest build",
"format": "prettier --write…