The Dependency Inversion Principle (DIP) states that high-level modules should not depend on low-level modules; both should depend on abstractions. Abstractions should not depend on details; details should depend on abstractions.

This is the principle that NestJS’s entire dependency injection system is built upon. Providers are registered with injection tokens (abstractions) rather than concrete class references, allowing implementations to be swapped without changing consuming code. The FactoryProvider Pattern and Provider Definition Methods are direct applications of DIP.