NestJS offers a structured method of carrying out back-end development, employing various components. Such as modules, controllers, services, DTOs, guards, interceptors, pipes and decorators in the construction of an application. This kind of architecture is advantageous for big projects. Especially when a team is involved and it is necessary to maintain consistency. Have a clear separation of concerns and possess a reliable way of organising the code. On the other hand for smaller projects or for developers that opt for a lighter approach. The amount of structure can at times seem like excessive extra work.
A simple CRUD endpoint can still call for multiple files, extra configuration and module registration before everything functions properly. Although such conventions can help keep consistency as the application increases in size. They might also hinder development when you are attempting to build something simple and get it working quickly.
If you are working with NestJS and discover that the boilerplate is hindering your progress or if you are considering using it for a new project but you are finding that the learning curve is greater than you anticipated. Then it might be worth looking at other frameworks. Luckily, the TypeScript ecosystem has a many other alternatives which adopt various methods for building back-end applications. Ranging from minimal frameworks that give you more freedom to more structured ones that offer useful features without requiring as much ceremony.
The following post looks at some of the most practical alternatives to NestJS, examining what sets each framework apart, highlighting its main features and identifying the kinds of projects it is best suited for. If you are creating a REST API, developing a back-end for a web application or simply seeking a more straightforward approach to handling routing, middleware, validation and database operations. The alternatives outlined below can assist you in finding a development workflow that suits your requirements better.
1. Hono

Hono differs from NestJS in that it is an ultralight framework created for use in edge runtimes, offering very little guidance regarding application architecture and having a bundle size of about 14 KB. It is compatible with a number of runtimes, such as Cloudflare Workers, Deno, Bun and Node.js, which makes it a versatile choice for developers who wish to build and deploy APIs in various environments.
Should you decide to move away from NestJS since your project doesn’t need its detailed structure, then Hono might be suitable. It provides fast performance, a simple API and flexible deployment possibilities. On the other hand. If your primary issue is the lack of infrastructure support or observability in your current setup. Hono might not be the best choice to replace it. Since it includes fewer built-in conventions and tools in these areas.
Key Features
- The system supports multiple runtimes, such as Node.js, Deno, Bun, and Cloudflare Workers
- Lightweight design suited to edge deployments
- Built-in middleware for features such as JWT authentication, CORS and logging
- Clean, Express-style API
- First-class TypeScript support
Benefits
Hono provides a simple and refreshing approach for developers who are used to working with NestJS, since it doesn’t require the use of decorators, dependency injection, or module registration. You can define routes, include middleware and deploy your application with just a minimal amount of setup. The fact that it is compatible across different runtimes also means that you can use the same code in various environments.
Limitations
Hono offers only a basic indication of how application architecture should be designed, particularly in relation to its middleware strategy. When it comes to larger projects, developers are required to create their own conventions regarding the organisation of code, database access, testing, and the definition of service boundaries. Moreover, the system does not include some of the built-in infrastructure support, observability features, and multi-service tools that developers might reasonably expect from a more complete framework.
When to Consider Hono
If you are developing lightweight APIs for use with edge runtimes, require portability across different JavaScript environments. Or are looking for a simpler development experience without having to deal with the architectural overhead of NestJS then consider Hono.
2. tRPC

tRPC differs from NestJS in its approach to back-end development. Instead of creating REST endpoints with the help of controllers and decorators. tRPC allows for type-safe calls between the front-end and the back-end. It is not necessary to specify the HTTP methods or URL paths for each procedure or to keep a separate API client. Rather, the TypeScript types are passed directly from the back-end procedures to the front-end code.
When developing a full-stack TypeScript application and you find that dealing with a REST API results in unnecessary extra work. tRPC provides a simpler option. With tRPC your front-end is able to call back-end procedures enjoying full type checking and autocomplete. Which in turn makes development easier.
Key Features
- End-to-end type safety between front-end and back-end
- No code generation required
- Input validation with libraries such as Zod
- Subscription support for real-time data
- Compatibility with React Query, Next.js and other front-end frameworks
Benefits
tRPC avoids an entire class of bugs by ensuring that the types used on the front-end and on the back-end remain in sync. If you modify the input or output types of a procedure, TypeScript can determine which callers need to be updated. You don’t have to regenerate the API client or keep an OpenAPI specification for the tRPC interface, which in turn reduces the likelihood of the front-end and back-end becoming out of sync. In the case of full-stack TypeScript applications. This can greatly enhance developer productivity.
Limitations
tRPC functions most effectively when both the front-end and the back-end make use of TypeScript. However, if you need to expose your API to mobile applications, to third-party integrations or to services written in other languages. Then its approach based on TypeScript alone may not be enough and in such situations you might need to offer a REST or GraphQL API together with tRPC. Moreover, it does not include comprehensive infrastructure tooling, database management or observability features since its main focus is on enabling type-safe communication between the front-end and the back-end.
When to Consider tRPC
When building a full-stack TypeScript application with the aim of achieving end-to-end type safety and where your API is mainly used by your own front-end, consider using tRPC. It is especially well suited to use with Next.js and other React-based frameworks.
3. Express.js

Express is at the other end of the spectrum from NestJS. While NestJS gives a highly structured method for back-end development. Express provides only a minimal HTTP layer and thus allows you to organise your code in the way you prefer. If you’re moving from NestJS because its architecture seems too restrictive. Then Express could prove to be a pleasant change. On the other hand, if you’re in fact looking for more built-in features. Switching to Express might feel like a step backwards.
Even though it is simple, Express has one of the largest ecosystems of all Node.js frameworks. Since the extensive range of middleware available makes it easy to find solutions to specific requirements and because of its widespread use developers are usually familiar with its conventions. Which in turn makes hiring and on-boarding easier.
Key Features
- Minimal core with an extensive middleware ecosystem
- Flexible routing without strict architectural conventions
- Template engine support for server-rendered pages
- Built-in static file serving
Benefits
Express keeps out of your way and lets you concentrate on developing your application; you don’t need to learn any module system. There’s no need to understand decorators and no need to set up a dependency injection container. All you have to do is write request handlers and then connect them using routes and middleware. It’s suitable for small APIs. For prototypes and for straightforward back-end applications; this simplicity can help you get going quickly.
Limitations
Express came before TypeScript and its design takes this historical fact into account. Although type definitions are available for TypeScript. Developers might discover that the request and response types it provides are less thorough than those available in frameworks that place a greater emphasis on TypeScript. Input validation has to rely on external libraries and features like schema-based API documentation and infrastructure tooling have to be obtained separately. If a project is going to benefit from the structure that NestJS offers. Then you will have to set up your own conventions and create the required infrastructure.
When to Consider Express
It makes sense to use Express if you are developing a simple API. If you need access to certain Express middleware or if your team is already familiar with the framework. It is also a good option for projects that do not need the extra structure and tooling offered by a larger and more opinionated framework.
4. Encore

Encore adopts a more straightforward method when it comes to creating TypeScript APIs. In the case of a standard NestJS endpoint, you would usually need a controller, a service, a DTO and registration of the module; with an Encore endpoint you can define it as a function having typed parameters. By making use of TypeScript types. Encore provides support for request validation, routing and API documentation, thus reducing the amount of boilerplate code required.
For those developers who have experience with NestJS. The most notable difference is the extent of configuration and wiring that Encore carries out for you. The system supports structured services, type-safe API calls and has built-in observability; each service is placed in its own folder together with a declaration file called encore.service.ts. Meaning that when you add a new service there is no need to register it with a module or use a dependency injection container.
Encore also includes facilities for managing infrastructure. In TypeScript you are able to declare resources such as databases, Pub/Sub topics and cron jobs and you can run them locally while in development. If you deploy your application using Encore’s cloud service then you can set up the resources in your own AWS or Google Cloud account. Alternatively, you can build Docker images and self-host the application. Using your own infrastructure configuration.
Key Features
- Open-source framework used in production by companies including Echo (Coinbase) and Groupon
- Type-safe request and response handling using TypeScript types
- Built-in infrastructure primitives for databases, Pub/Sub, cron jobs and caches
- Automated deployment to your own AWS or Google Cloud account through Encore’s cloud platform
- Type-safe service-to-service communication with generated clients
- Built-in distributed tracing across services
- Service catalog and automatically generated API documentation
- Streaming APIs with WebSocket support
Benefits
Encore offers most of the structure which makes NestJS attractive, all without the same amount of boilerplate code. Services are arranged in folders, APIs are specified as typed functions, and the infrastructure can be declared directly in your code as well. You also receive distributed tracing without having to set up OpenTelemetry on your own. Together with a service catalog that remains in sync with your application.
For those teams that selected NestJS because of its conventions, type safety and support for multi-service architectures, Encore provides similar advantages along with a more efficient development process. The conventions it offers are intended to keep projects well organised without asking developers to deal with extensive use of decorators, complicated dependency injection configurations or intricate module relationships.
A new developer is often able to understand an Encore service just by reading the code since the structure and functionality are closely related. The framework thus becomes easier to learn and to maintain. Especially when teams are working on back-end systems that need to scale.
Encore employs established conventions for defining both services and infrastructure in order to maintain consistency among applications as they grow. Although it provides built-in features. If you want to use a specific ORM or require extra HTTP customisation you can make use of the standard npm libraries. The system is based on Node.js and has a Rust-based runtime; it is mainly intended for use in production back-end systems not for edge computing.
When to Consider Encore
If you’re looking for many of the production features linked with NestJS—such as a multi-service architecture, type safety, and observability. Then consider using Encore, as it provides these capabilities without requiring as much boilerplate code. It is especially appropriate for teams who are developing distributed systems and who need infrastructure automation as well as type-safe communication between services.
Encore could also attract developers who wish to use AI coding agents in order to generate and deploy back-end code making use of infrastructure-aware tooling and guardrails.
5. Fastify

Fastify is positioned somewhere between the minimalistic approach of Express and the more complete architecture of NestJS. It offers a degree of structure via features including JSON Schema validation, Pino logging and a plugin-based architecture. All without the need for a class-based design or dependency injection. If you are looking for a more organised development experience without having to accept the extra burden of NestJS. Then Fastify is something you should consider.
A major strength of Fastify is its use of JSON Schema for both validation and serialization. The schema definitions you create can be put to several uses. Such as validating incoming requests, improving the serialization of responses and producing OpenAPI documentation. Since you define your schemas just once. You eliminate duplication and ensure that your API specifications remain consistent.
Key Features
- JSON Schema validation with optimised response serialization
- Plugin-based architecture with encapsulated scopes
- Built-in integration with Pino for logging
- First-class TypeScript support
- OpenAPI documentation generation through plugins
Benefits
Fastify offers a helpful level of structure without having to rely on heavy abstractions. Its plugin system aids in keeping the code organised as the application increases in size and JSON Schema serves as a consistent base for request validation, serialization and API documentation. When compared to NestJS. It is possible to obtain the same level of functionality with a great deal less boilerplate. Which makes Fastify a practical option for developers who want a balance between flexibility and organisation.
Limitations
JSON Schema definitions can tend to become quite lengthy, especially when dealing with complex request bodies that include nested objects and a number of validation rules. Whether or not they are easier to read and maintain than simpler TypeScript interfaces or NestJS DTOs will depend on the method you adopt. Fastify also has a smaller range of available tools than Express, particularly in the area of established architectural patterns. Moreover, it lacks built-in infrastructure automation and service discovery. And full observability usually demands the use of extra tools and configuration.
When to Consider Fastify
You should choose Fastify if you are looking for a schema-driven method of development, need a plugin architecture to help organise your API and want good performance without having to use a heavy weight framework. It is especially appropriate for developers who are used to JSON Schema and are seeking a balance between the flexibility of Express and the structured conventions of NestJS.
Discover more from SomeWhat Creative
Subscribe to get the latest posts sent to your email.