NestJS Practice

April 3, 2026 · View on GitHub

Repository created to record my practice learning NestJS with exercises based on the Udemy Course of Stephen Grider.

Table of contents

Status

  • Current repo's version is NestJS practice version
  • This course has been completed on 03/04/2026 - Certificate

Setup

After cloning the repo, go to the created folder and install the node packages.

git clone https://github.com/NicolasOmar/nest-practice.git
cd nest-practice
npm run setup-all

setup-all is the command to install all the projects, but if you want to do it one by one, you can change that last line for one of the following:

App SetupCommand
Allnpm run setup-all
From Scratchnpm run setup-scratch
Project with CLInpm run setup-with-cli
Persistance and Authenticationnpm run setup-persistance-and-auth

How to run it

To run any specific exercise, execute the following command in the project´s folder:

npm start

Repo structure & what I learned in each exercise

  • From Scratch (1-scratch folder)
    • Installing minimal libraries to create a NestJS server.
    • Basic understanding of concepts such as Controller and Module.
    • Understanding of naming conventions for files.
  • Project with CLI (2-project-with-cli folder)
    • How to create a new NestJS project using its CLI.
    • Understanding of creation commands such as generate module and generate controller.
    • How to use other decorators such as Body and Param.
    • How to use a DTO (Data Transfer Object).
    • How to implement the Inversion of Control principle using the Injectable decorator.
  • Persistence and Authentication (3-persistance-and-auth folder)
    • How to integrate a SQL database using TypeORM and SQLite.
    • How to execute CRUD action on the entity layer with TypeORM.
    • Understand the usage of remove and save methods to help logging in the database layer.
    • How to implement an interceptor to handle data at several levels.
    • How to create and implement a custom decorator.
    • Use node functions like randomBytes, scrypt, and promisify for password hashing.
    • How to handle session data through a session cookie in different ways (including ParamDecorators and Interceptors).
    • How to handle access for any handler through a Guard.
    • How to create and maintain unit tests with Jest.
    • Basic understanding of end to end testing.
    • How to add table relations in TypeORM.
    • How to handle and implement authentication through a middleware layer.
    • How to build complex queries using createQueryBuilder.

Other practice repos

NodeReactAngularGraphQLHTML & CSSStylingTypescriptNextJSPython
Node Practice RepoReact Practice RepoAngular Practice RepoGraphQL Practice RepoHTML and CSS Practice RepoStyling Practice RepoTypescript Practice RepoNextJS Practice RepoPython Practice Repo