CodeVetter · Repo Unpack · Extension points
nestjs/nest
Nest offers explicit extension seams through module metadata, decorators, provider tokens, adapters, and contextual request processing. Discovery APIs expose metadata-indexed provider and controller collections. Testing overrides reuse production scanning and instantiation rather than requiring a separate application architecture. Transport selection and optional integration modules provide additional runtime composition boundaries.
- Root modules may be classes, dynamic modules, forward references, or promises; the scanner merges dynamic imports into reflected imports.
- A custom HTTP implementation plugs into NestFactory.create through AbstractHttpAdapter and the HttpServer contract.
- Context creators assemble pipes, guards, and interceptors for controller methods using module and request-context identifiers.
- ParameterDecoratorOptions accepts a StandardSchemaV1 and pipe list; assignMetadata normalizes both options and legacy positional signatures.
- DiscoveryService.createDecorator creates a metadata key and records discoverable class links; getProviders and getControllers can select by metadata key.
- TestingModuleBuilder exposes provider, module, pipe, guard, interceptor, and filter overrides plus a mocker callback.
- Testing overrides support useValue, useFactory, and useClass replacements applied through container.replace.
- ValidationPipe accepts injected validator and transformer implementations and a custom exceptionFactory.
- ServerFactory is the built-in transport dispatch table; application MessagePattern decorators define transport-level handlers.
- Hybrid applications can attach microservices sharing the container and optionally inherit HTTP application configuration.
- StreamableFile exposes replaceable error-handler and error-logger callbacks for application-specific streaming policy.