SOLID is a mnemonic acronym for five object-oriented design principles introduced by Robert C. Martin and named by Michael Feathers around 2004. The principles aim to make software designs more understandable, flexible, and maintainable.
The five principles form the foundation of NestJS’s architecture:
- Single Responsibility Principle — each class has one reason to change
- Open-closed Principle — open for extension, closed for modification
- Liskov Substitution Principle — subtypes must be substitutable for base types
- Interface Segregation Principle — clients shouldn’t depend on unused interfaces
- Dependency Inversion Principle — depend on abstractions, not concretions