NestJs Flow

Source code Github: nestjs-flow

End to end build a project with NestJS. This series demo is just for learning or practicing purpose on NestJS.

When working with Node.js on large projects, a well-structured project becomes crucial. If you’re a fan of TypeScript, NestJS can be your go-to solution for this challenge.

So, what exactly is NestJS?

Nest (or NestJS) is a progressive Node.js framework, open-source in nature, designed for building efficient, scalable, and testable applications. It’s developed with TypeScript and integrates key elements of Object-Oriented Programming (OOP), Functional Programming (FP), and Functional Reactive Programming (FRP). Nest leverages robust design patterns such as Dependency Injection, Model-View-Controller (MVC), microservices, and Command Query Responsibility Segregation (CQRS).

Nest comes with numerous features out of the box, allowing you to quickly prepare your project for production.

Now, let’s delve into creating a simple REST API project with NestJS, progressing from basic to advanced concepts.

Each significant step will be organized into separate branches within your Git repository

All branches of projects

  • Init project: Controller, services, modules
  • Database, typeorm
  • Auth with passpord, jwt
  • Error handling & data validation
  • Serializing response with interceptors
  • Database relationship
  • Unit testing, integration testing
  • End to end testing
  • Upload file to Amazon s3(Public bucket)
  • Managing private files with amazon S3 (Private bucket)
  • Elastic search
  • Implement refresh token jwt
  • Explore SQL database with indexes, transactions, array data type
  • Exploring idea of microservices (TCP Layer, RabbitMQ, gRPC framework)
  • Pattern Command-Querry-Responsibility-Segregation (CQRS)
  • Storing JSON with PostgresSQL & TypeORM
  • Implementing in-memory cache to increase the performance
  • Cache with Redis. Running the app in a Nodejs cluster