Kest

Search

Search the documentation

Recipes

Kest vs NestJS

Every NestJS feature, following docs.nestjs.com, with its Kest equivalent and an honest status.

Honest status of every NestJS feature, following the structure of docs.nestjs.com. Done = implemented and covered by a test that runs against the real thing. Partial = works, with a stated gap. Missing = not built. Test modules: examples/store-api, java-api, parity, microservices-tests, platform-tests, and packages/cli. Start the servers they need with tools/test-infra.sh up all.

Overview

NestJSKestStatus
Controllers, routing, @Get/@Post/...same names; routes compiled into a segment trie, checked at build timeDone
@Param, @Query, @Body, @Headers, @Ip, @Session, @HostParam@Param, @Query, @Body, @Header, @Cookie, @Ip, Session, @HostParam; whole-object @Query dto, @Body("field")Partial (no all-headers map)
@Req(), @Res(), @Res({ passthrough: true })@Request, @Response, @Response(passthrough = true) with RawResponseDone
@HttpCode, @Header, @Redirect@HttpCode, @SetHeader, @RedirectDone
Providers, constructor injection@Injectable, checked at build timeDone
Modules, imports/exports, global modules@Module, global = trueDone (one provider per type across the app, not per module)
MiddlewareMiddleware, useMiddleware(forRoutes, exclude)Done
Exception filters, @Catch, @UseFiltersExceptionFilter, @UseFiltersDone
Pipes: ValidationPipe, Parse*Pipe, DefaultValuePipe, customtyped binding, @Query(defaultValue), ValidationPipe, Pipe, @UsePipesDone
Guards, @UseGuards, rolesGuard, @UseGuards, @Role/@RolesDone
InterceptorsInterceptor, @UseInterceptors; logging, timeout, cacheDone
Custom route decorators, applyDecorators, SetMetadata + Reflector@Guarded, @Intercepted, @Metadata, composite annotations, @ParamDecorator, @MethodAspect (@Async, @Retry, @Cacheable, @Timed, @Traced, your own)Done (method aspects need open classes)

Fundamentals

NestJSKestStatus
Custom providers: useValue, useFactory, useExisting, useClassoverride<T>(), provide<T> { }, alias<A, B>(), @Injectable(binds)Done
Injection tokens, @Inject()Token<T>, @Inject("name")Done
Async providersprovideAsync { future }, provideSuspend { } with a timeoutDone
Dynamic modules (forRoot, register, forFeature)DynamicModule, forRoot { } / register { }Done (no forFeature)
Injection scopesSINGLETON, TRANSIENT, REQUEST with bubblingPartial (request scope for HTTP only; guards and interceptors stay singletons)
Circular dependencies, forwardRefby inject()Done
Module reference (ModuleRef.get/resolve/create)Container: get, resolve, createDone
Lazy-loading modulesMissing
Execution context, ArgumentsHostExecutionContext with annotations of handler and controllerPartial (HTTP-centred; guards on other transports get the message as an HTTP-like request)
Lifecycle events (five hooks)same namesDone
Discovery servicemethodsWith<A>(), classesWith<A>()Done
Platform agnosticismHttpAdapter SPI: Netty (default), JDKDone
Testing: Test.createTestingModule, overrideProvider, overrideGuard, e2eTesting.createModule, overrideProvider/Guard/Interceptor/Pipe/Filter/Middleware, TestServerDone
Standalone applicationsKest.create<AppModule>(); the worker templateDone
LoggerLogger("Ctx"), pluggable LogSinkDone

Techniques

NestJSKestStatus
Configuration (.env, schema validation, namespaces, registerAs, forRootAsync with ConfigService)config: env, .env, .properties, YAML, JSON, loaders, validate, getOrThrow, typed getAs, registerAs; forRootAsync { config: ConfigService -> } on the ORM, JWT, cache, queue, mailer, throttler, metrics and tracing modulesDone
Database: TypeORM, @InjectRepositoryorm: @InjectRepository(Entity::class, "ds") with Repository<T> (SQL) and MongoRepository<T>, entities, @CreateDate/@UpdateDate/soft delete, @Column options, @Index, derived queries, relations (foreign keys and junction tables), cascades, orphan removal, lazy loading, join fetch, @Transactional, generated migrationsDone on PostgreSQL, MySQL, MongoDB
Mongo (Mongoose)orm-mongo shares the entity model; MongoDB migrations (indexes, collections)Partial (no schemas or middleware)
Sequelize, MikroORM, PrismaMissing
Validationvalidation: constraints, groups, custom constraints, @ValidDone
Cachingcache: service, interceptor, @Cacheable/@CachePut/@CacheEvict; memory, Caffeine, file, Redis, Memcached, layeredDone
Serialization (class-transformer, ClassSerializerInterceptor)@Exclude, @Expose (name, groups), @Transform, @SerializeGroups, ClassSerializerInterceptorDone (Jackson codec)
VersioningenableVersioning URI, header, media typeDone
Task schedulingschedule: @Cron, @Interval, @Timeout, registryDone
Queues (BullMQ)queue, queue-redis: delays, retries, priorities (also in Redis), repeatable and cron jobs, rate limiterPartial (no flows or job dependencies, no pause)
LoggingLogger in core: NestJS layout, colour per level, Logging.configure, JSON mode, overrideLogger, start-up lines in the NestJS structureDone (no request logging beyond LoggingInterceptor)
Cookies, Session@Cookie, ResponseCookie, useSession (memory or Redis)Done
Eventsevent-emitter: @OnEvent, wildcards, priorityDone
Compression, Helmet, CORS, CSRFuseCompression, useSecurityHeaders, enableCors, useCsrfDone
File upload, streaming files, SSE@FormFile, StreamableFile, SseStreamDone (uploads held in memory)
HTTP modulehttp-client with timeouts, retries, interceptorsDone
MVC and template enginesviews: @Render, View; Mustache built in, FreeMarker, ThymeleafDone
Performance (Fastify)Netty engine; @NonBlocking with a watchdogDone
Task: Server-Sent EventsSseStreamDone
Mailermailer with Mustache, FreeMarker or Thymeleaf templatesDone

Security

NestJSKestStatus
Authentication, @nestjs/jwtsecurity: JwtService (HS256/384/512, RS256), JwtAuthGuard, @Public, API-key and Basic strategiesDone
OAuth and social loginOAuth2Provider: authorization code with PKCE; Google, GitHub, Microsoft, any OIDC providerPartial (tested against a local provider, not the real ones; no SAML, no LDAP)
Authorization (roles, claims, policies)@Role, @Roles, custom guardsPartial (no CASL-style policy engine)
Encryption and hashingPasswordHasher: PBKDF2, bcrypt, argon2idDone (bcrypt and argon2id need Bouncy Castle on the classpath)
Rate limitingthrottler, throttler-redisDone

GraphQL, WebSockets, microservices

NestJSKestStatus
GraphQL schema-first, resolvers, @ResolveFieldgraphqlDone
GraphQL dataloader@BatchLoader with DataLoader parametersDone
GraphQL subscriptions@Subscription with Publisher, graphql-transport-ws, TopicsDone (in-process topics)
GraphQL code-first, federationMissing
WebSocket gateways, rooms, guards and pipes on messageswebsocket (Netty)Partial (plain WebSocket; rooms per instance)
Socket.IO adapterthe same gateways answer Socket.IO v4 (namespaces, acks, rooms) over the WebSocket transportPartial (no long polling, no binary, no Redis adapter)
Microservices: TCP, Redis, NATS, MQTT, RabbitMQ, Kafkamicroservices and one package per broker, same handler modelPartial (single reply per request; single-broker restarts tested, cluster failover not; NestJS interop untested)
gRPCmicroservices-grpc: four call types, metadata, guards, TLS and mutual TLSPartial (no reflection or health service; Wire version pinned)
Hybrid applicationshttp plus microservice(...) on one containerDone

Recipes and tooling

NestJSKestStatus
CQRS: buses, aggregates, eventscqrsDone
CQRS sagas as RxJS streams@Saga fun f(events: Stream<Any>): Stream<*> with ofType, delay, debounce, buffer, merge...Partial (a small push stream, not RxJS)
OpenAPI (Swagger)api-docs: annotations, reference site with sandbox, OpenAPI 3 exportDone
Health checks (Terminus)health, health-orm (PostgreSQL, MySQL, MongoDB indicators)Done
OpenTelemetry, metricsopentelemetry (tracing over OTLP), metrics (Prometheus)Partial (no OTel metrics or logs, no ORM or messaging spans)
Nest CLI: new, generate, librarykest new, kest generate (19 schematics), library, Gradle tasksPartial (no build/start --watch, no monorepo app mode)
REPL, DevtoolsMissing
HTTP/2, raw HTTPSNetty TLSPartial (no HTTP/2)
Prisma, Sentry, Nest CommanderMissing

Beyond NestJS

  • Compile-time module graph and route, validator and ORM generation (KSP): wiring mistakes fail the build; no runtime reflection.
  • Handlers run on virtual threads in parallel, jobs and messages likewise; one process can use every core, and processes can still be added. See the concurrency page.
  • Java support: records, plain classes and Java annotations as entities, DTOs, controllers and guards (examples/java-api).
  • One generated entity mapper serves SQL and MongoDB; several databases in one app; atomic writes, @Version, @Unique.
  • A watchdog that catches @NonBlocking handlers that block.