Any class decorated with @Injectable() that can be injected via the DI container is a provider. Services, repositories, factories, helpers, and guards are all providers. They are registered in a module's providers array and instantiated by the NestJS IoC container.
The main idea of a provider is that it can be injected as a dependency. NestJS manages the lifecycle and instantiation of providers through its IoC (Inversion of Control) container.
Services — contain business logic.
Repositories — handle data access.
Guards — handle authorization.
Interceptors — transform requests/responses.
Pipes — validate and transform input data.
Factories — create and configure instances.