NestJS
NestJS is a TypeScript-first Node.js framework that brings Angular-style structure to the server: modules, controllers, providers, dependency injection, decorators, and pipes. It runs on top of Express or Fastify and is popular at companies that want strong typing and architectural guardrails for large Node codebases.
Core building blocks
- Modules. Group related providers and controllers; the unit of feature organization.
- Controllers. Handle HTTP routes via decorators like
@Get(),@Post(),@Body(),@Param(). - Providers (services). Injectable classes containing business logic; resolved via the DI container.
- Pipes, Guards, Interceptors, Filters. Cross-cutting concerns (validation, auth, transformation, error handling) applied declaratively.
- Microservices. Built-in transports for TCP, gRPC, NATS, RabbitMQ, Kafka, Redis.
Common integrations
- TypeORM, Prisma, Mongoose for data access
- Passport for authentication strategies
- GraphQL via Apollo or Mercurius integration
- OpenAPI document generation via
@nestjs/swagger
🔗