Encore vs

Encore is a backend framework with built-in infrastructure. NestJS structures your code with modules and dependency injection, and leaves infrastructure to you. Encore works with any framework, and your Nest modules and providers can run inside it with infrastructure from code in your own cloud on AWS or GCP, plus local infrastructure and tracing.

Updated November 5, 2026

“What used to take days or weeks of back-and-forth between developers and infra teams is now automated and completed in minutes.”
Josef Sima, Engineering Director at Groupon
3xfaster development speed
90%shorter time to market
See case study
// POWERING DEVELOPMENT AT
GrouponPave BankBookshop.orgCoinbasePalletGradient Labs

How does Encore, a backend framework with built-in infrastructure, compare to NestJS?

NestJS plus Terraform and Docker, next to Encore.

EncoreNestJS
What it isBackend framework with built-in infrastructureStructured Node.js framework with DI
Existing Nest codeModules and providers run inside EncoreNative
API layerapi() endpoints validated from TypeScript typesControllers, decorators, pipes
InfrastructureInfrastructure from code in your own cloudTerraform, Docker and CI you write
ResourcesPostgres, Pub/Sub, cron, buckets, cache, secretsModules plus services you provision
Local developmentencore run starts local infraDocker Compose you maintain
TracingBuilt in, locally and in the cloudAdd OpenTelemetry yourself
Service callsType-safe function callsTransporters and message patterns
EcosystemSmaller, and npm packages such as Nest still workLarge module ecosystem
What you get to skip

What do you stop maintaining next to your NestJS app?

NestJS gives your code structure and leaves the database, queues, environments, CI pipelines and tracing around it for you to build. Encore sets those up from your application code, in your own AWS or GCP account.

  • Terraform modules
  • IAM policies
  • VPC and subnets
  • Security groups
  • Kubernetes
  • Helm charts
  • CI/CD pipelines
  • Load balancers
  • Secrets per environment
  • Staging environments
  • Tracing setup
  • Database networking

How do you run NestJS code inside Encore?

Install the CLI and add Encore to your Nest project as the guide describes. Start Nest as a standalone application context instead of an HTTP server, then turn each controller into an Encore endpoint that calls the same Nest service. Your modules, providers and dependency injection do not change.

Tested with encore.dev 1.58.8, @nestjs/core 12.3.3 and TypeScript 5.9.3.

brew install encoredev/tap/encore && encore app create
Read the NestJS guide →
import "reflect-metadata";
import { Injectable, Module } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import { api } from "encore.dev/api";

interface Cat {
  id: number;
  name: string;
}

@Injectable()
export class CatsService {
  async findAll(): Promise<Cat[]> {
    return [{ id: 1, name: "Pixel" }];
  }
}

@Module({ providers: [CatsService] })
export class CatsModule {}

@Module({ imports: [CatsModule] })
export class AppModule {}

// Run Nest as a standalone application context instead of an HTTP server.
const applicationContext = NestFactory.createApplicationContext(AppModule).then((app) => ({
  catsService: app.select(CatsModule).get(CatsService, { strict: true }),
}));

// The Nest controller becomes an Encore API endpoint.
export const findAll = api(
  { expose: true, method: "GET", path: "/cats" },
  async (): Promise<{ cats: Cat[] }> => {
    const { catsService } = await applicationContext;
    return { cats: await catsService.findAll() };
  },
);

What infrastructure do you get on top of NestJS?

In a Nest project, a database means a TypeORM or Prisma module plus a Postgres instance you provision with Terraform. A scheduled job means @nestjs/schedule on a process you keep running. A queue means a transporter and a broker you host.

With Encore you declare a SQL database, a cron job, a Pub/Sub topic, a bucket or a secret in code. encore run starts the database and Pub/Sub locally, and on deploy Encore creates the matching resources in your AWS or GCP account, such as RDS, SQS and S3 on AWS. Secrets are set per environment with encore secret set --type prod.

See what Encore provisions →

Which teams chose Encore over a NestJS stack?

"Encore maps really cleanly to event-driven architecture. [...] Just subscribe and add a handler, let encore sort out sending those messages through SQS, retrying, and managing the DLQ."

Kyle Chamberlain, Staff Engineer at Later. Later chose Encore over its established NestJS and Kubernetes stack, with zero DevOps engineers assigned to the project. Read the Later story.

When should you pick Encore, and when NestJS?

Pick Encore when the hard part of your backend is not code structure but everything around it: databases, queues, cron jobs and several services in your own AWS or GCP account. You can keep your Nest services and dependency injection while you move over.

Pick NestJS on its own when your team relies on controllers, guards, interceptors and Nest modules such as GraphQL or WebSockets, and you already have a deploy pipeline and infrastructure you are happy with. NestJS is mature, well documented and familiar to Node.js developers.

Migrating from NestJS

Keep your Nest modules and providers. Run Nest as a standalone application context and replace controllers with Encore endpoints one at a time.

The guide covers adding Encore to a Nest project, running Nest standalone, defining an Encore service and replacing controllers.

Read the NestJS migration guide
NestJSEncore
Controllerapi() endpoints calling your Nest service
Modules and providersUnchanged, loaded via application context
GuardsEncore auth handler
@nestjs/scheduleCron job calling an API endpoint
Microservice transporterType-safe service calls and Pub/Sub

Top rated on G2

See how we stack up in the market.

Read G2 reviews →
G2 User LoveG2 High Performer Summer 2025G2 High Performer Fall 2025G2 High Performer Winter 2026

Frequently asked questions

Common questions about Encore vs NestJS.

Yes. Run Nest as a standalone application with NestFactory.createApplicationContext and select the services you need. Your modules, providers and dependency injection stay as they are. You replace the controllers with Encore API endpoints that call your Nest services.

Not for the resources Encore covers. Databases, Pub/Sub topics, cron jobs, object storage buckets, caches and secrets are declared in code and provisioned in your own cloud on AWS or GCP when you deploy, on Fargate ECS, EKS, Cloud Run or GKE.

They are tied to Nest controllers and are replaced along with them. Request validation comes from the TypeScript types on each Encore endpoint, and access control moves to an Encore auth handler and middleware.

Pick NestJS on its own when your team is invested in controllers, guards and the wider Nest module ecosystem, when you already run a deploy pipeline you are happy with, or when you need Nest features such as its GraphQL or WebSocket modules exactly as they work today.

Nest microservices talk through a transporter. The default TCP transporter needs no broker, while transporters such as Redis, NATS or Kafka need a broker that you provision and run. With Encore, services call each other with type-safe function calls, and Pub/Sub topics are provisioned for you in your own cloud.

Start building with Encore

Deploy to your own AWS or GCP account, with infrastructure provisioned automatically.