Skip to content

Runtime examples research record ​

Checked 2026-10-16. This is original implementation and contract-test work informed by the Kadajett inventory and its compiled rule discussion. Existing attribution in SOURCES.md remains intact. No upstream code or numeric performance promises were imported. The upstream inventory observed during research identifies version 1.2.0; the links track upstream main and are not immutable snapshots.

Selected scope and coverage ​

Categories 10 (operations), 2 (DI), and 5 (performance) are completed at the stated teaching-contract level. Runnable sources, 17 checks and limitations are the implementation evidence. NestJS 11.2.7 and TypeScript 5.9.3 remain pinned; no optional infrastructure packages were added.

Upstream ruleLocal evidenceDecision
devops-use-config-moduleparseSettings, provider-construction rejectionValidate configuration once at composition; fixture uses a custom provider because ConfigModule is not installed.
devops-use-loggingCompletionLogger, allowlist and malformed-ID checksBounded application events; framework logger/transport integration remains project-specific.
devops-graceful-shutdownManagedResource, awaited close and phase checksCleanup correctness; no zero-downtime or OS-signal claim.
di-avoid-service-locatorCanReserve constructor dependencyKeep lookup out of business operations; lazy loader is an explicit framework boundary.
di-interface-segregationQuery-only StockReader substituteConsumer does not depend on mutation/admin operations.
di-liskov-substitutionShared behavioral checks plus invalid adapter controlsStructural conformance is insufficient.
di-prefer-constructor-injectionReal Nest construction and missing-token failureRequired dependencies are visible at creation.
di-scope-awarenessSingleton/transient/request context identity checksChoose lifetime for state semantics; no speed percentage.
di-use-interfaces-tokensAlias identity and lookalike Symbol failureImport the same runtime token.
perf-async-hooksAwaited startup, rejection and cleanupLifecycle coordination is not a generic optimization.
perf-use-cachingSingle-value cache, expiry/coalescing/failure checksExplicit size, lifetime and sharing boundaries.
perf-optimize-databaseBounded tenant/projection/order query-port checksReal database plans and adapter tests are still needed.
perf-lazy-loadingReal lazy loader reuse and absent hooksOptional graph deferral, with first-use and lifecycle costs.

Verified sources and corrections ​

  • Nest configuration supports central validation; a typed getter alone cannot establish runtime validity.
  • Custom providers and scopes ground tokens, aliases and context behavior. Tests run those APIs locally.
  • Lifecycle distinguishes explicit close from enabled signal listeners. Request-scoped classes do not receive application lifecycle hooks.
  • Lazy loading documents reuse and lifecycle limitations. The fixture tests both; it does not infer a speedup.
  • Logger distinguishes application logging from Nest bootstrap integration. Current online APIs can differ from the pinned major; the fixture avoids adopting newer logging features without installed-version proof.
  • Caching describes package/store semantics. The dependency-free fixture makes its own cache policy explicit rather than pretending to test CacheModule.
  • Node event-loop guidance explains why an asynchronous declaration does not make synchronous CPU work nonblocking.
  • Queues explicitly distinguishes Bull's named @Process handlers from BullMQ's WorkerHost.process. Do not copy a mixed-package worker example. Queue implementation belongs to category 9 backlog, not this scope; no Redis behavior is claimed.

Ownership across the existing seven skills ​

SkillExisting responsibility and gap addressed by this work
Architecture PrinciplesPrimary owner of DI composition and lifetime. Constructor/token, alias, context and scope assertions turn existing guidance into runtime evidence.
Features and PerformancePrimary owner of operations and performance. Adds executable startup/cleanup, safe event logging, bounded cache, query-request and lazy-module contracts alongside existing diagnosis/deployment guidance.
OOP and Design PatternsOwns substitutability and consumer-shaped collaboration. The same query-port behavior is exercised against two implementations and invalid controls; no new pattern taxonomy is needed.
Professional Software EngineeringOwns implementation conventions and verification. Strict TypeScript compilation and deterministic contracts demonstrate the existing workflow without introducing optional package dependencies.
Code AuditOwns evidence-backed findings. Failed token wiring, invalid adapter results and rejected configuration are reproducible examples; an auditor must still trace the actual target code before reporting a finding.
Feature AuditOwns applicability and roadmap evidence. The coverage matrix separates teaching contracts from absent real infrastructure proofs, so example presence cannot be mistaken for a production feature.
Git Commit and PROwns reviewable change scope and provenance. Relevant/full checks, explicit staging and a local commit preserve the existing workflow; the research record distinguishes upstream inspiration from original code.

Only the primary architecture and runtime references gain pointers. Supporting skills retain their existing ownership; their role here is to interpret evidence rather than duplicate runtime guidance.

Remaining seven categories ​

CategoryBacklog boundary
1 ArchitectureFurther upstream-specific module/cycle/event coverage
3 Error handlingFurther asynchronous and transport contract coverage
4 SecurityFurther authentication/authorization/rate-limit coverage
6 TestingFurther testing-module and external-boundary examples
7 Database & ORMReal driver transactions, migration and N+1 evidence
8 API designFurther upstream-specific versioning and transport coverage
9 MicroservicesReal broker, health and queue integration; correct BullMQ package APIs

These categories already have guidance and some fixtures in this repository. The backlog records deferred expansion, not absence of existing support. Tests added to verify selected rules do not imply category 6 was implemented, and the query-port fixture does not imply category 7 was implemented.

Open-source guidance for deliberate NestJS engineering.

Open-source guidance for deliberate NestJS engineering.

Released under the Apache License 2.0.