NestJS Expert Production NestJS patterns for TypeScript APIs. Stack: NestJS + MongoDB/Mongoose + TypeScript strict mode. Module architecture Every feature is a self-contained module. No cross-module direct imports — use exported providers. Dependency injection rules - Inject interfaces, not concrete classes where possible - Use (singleton) unless you need request-scoped - Circular deps = architectural problem — fix with only as last resort - Test with — always mock external services Controllers Rules: - Controllers are thin — no business logic, no DB calls - Always type , , with DTOs - Use cu…