Decoupling NestJS Logic with Custom Providers
Stop hard-coding your service dependencies. Learn how to use NestJS Custom Providers (useClass, useValue, and useFactory) to build a decoupled architecture that is easy to test and configure.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop hard-coding your service dependencies. Learn how to use NestJS Custom Providers (useClass, useValue, and useFactory) to build a decoupled architecture that is easy to test and configure.
A technical decision guide for NestJS developers comparing TypeORM and Prisma, focusing on type safety, architectural patterns, and deployment constraints.
Learn how to diagnose and fix circular dependency errors in NestJS using architectural refactoring and the forwardRef() utility to resolve bootstrap crashes.
NestJS’s ValidationPipe turns DTOs into hard runtime contracts. Learn how to register it globally, enforce whitelisting, handle errors, and balance performance in this practical guide.
Enforce payload shape and type safety at the application edge using ValidationPipe and class-validator to prevent invalid data from reaching your service layer.
Stop passing user and tenant IDs through every service method. Learn how to use NestJS Request Scope to handle per-request state cleanly while understanding the performance trade-offs.
The goal is to guarantee a reversible upgrade path when a NestJS major release alters decorator signatures or DI configuration, allowing teams to restore the pre‑upgrade state without losing uncommitted work. The nest update CLI speeds up dependency resolution to the latest compatible versions but provides no built‑in mechanism to revert transitive changes,
I need a little help with migration. I'm trying to seed DB using migration. But I get an error "QueryFailedError: relation "account" does not exist". I think it's just typical newbie mistake. So please check my code: account.entity.ts import { BeforeInsert, Column, Entity, OneToMany } from 'typeorm'; import { AbstractEntity } from '../../common/abstract.enti
The goal is to achieve zero‑downtime deployments while preserving the ability to roll back a schema change safely in a NestJS application that uses TypeORM. Two documented approaches exist: enabling the synchronize flag so TypeORM updates the schema automatically on startup, or generating explicit up/down migration scripts and running them via the NestJS/Typ