Introduction
Introduction
What Kest is, what it borrows from NestJS, and where it goes beyond it.
Kest is a framework for building backends on the JVM in Kotlin or Java. If you know NestJS you know most of the vocabulary: modules group providers and controllers, providers are injected through constructors, controllers declare routes, and guards, interceptors, pipes and filters wrap handlers.
The difference is when the wiring happens. NestJS reads decorator metadata through reflection when the process starts. Kest runs a KSP processor during compilation, reads the same declarations, checks the module graph, and generates plain Kotlin that builds your application. A missing provider is a build error, not a startup crash.
Status
Kest is at version 0.4.0, the current release. The documentation is at https://kest.rokenite.com. The test suite has over 430 tests, and it runs against real PostgreSQL, MySQL, MongoDB, Redis, Memcached, NATS, RabbitMQ, MQTT, Kafka, RustFS (S3) and SMTP servers. Several features are partial; What is not built yet lists them without rounding up.
Why the JVM changes the picture
A Node.js process runs your code on one thread. A JVM process runs requests, jobs and messages in parallel on virtual threads, uses every core, can block without penalty, and can still be scaled across processes. Kest is built for that: components are thread-safe, queues have parallel workers, @Async and @Retry are one annotation away. Read the Concurrency model.
What you get
- A small
coreplus opt-in packages, the way NestJS splits@nestjs/commonfrom the rest. - Custom decorators of four kinds: metadata and guards, composite annotations, parameter decorators, and method aspects (
@Async,@Retry,@Cacheable,@Timed,@Traced,@Transactional, your own). See Custom decorators. - An ORM with
@Columnoptions, junction tables, cascades, lazy loading, transactions and generated migrations. - Messaging over six brokers and gRPC with TLS, WebSockets, queues with repeatable jobs and rate limits, CQRS with stream sagas.
- Caching on memory, Caffeine, files, Redis and Memcached; MVC views; mail templates; GraphQL with data loaders.
- Metrics (Prometheus) and OpenTelemetry tracing, health checks including databases.
- A command line,
kest, that scaffolds projects and generates code.
What it is not
Kest is not a drop-in for NestJS. It does not run TypeScript, it has not been run against NestJS services, and some NestJS features have no equivalent yet (Socket.IO, GraphQL subscriptions, federation, code-first schemas among them). Read Kest vs NestJS before committing to it.