'link' — Encore Ts
In your Next.js or React frontend:
import Queue from "encore/queue"; export const emailQueue = new Queue("emails", maxConcurrency: 10, );
// Backend: my-app/hello.ts interface PingParams name: string export const ping = api( method: "POST", path: "/ping/:name", expose: true , async (params: PingParams): Promise< message: string > => return message: Hello, $params.name! ; encore ts
It is still young (first stable release in late 2024), but for greenfield projects, it represents a genuine leap forward in TypeScript backend ergonomics.
// Enqueue a task await emailQueue.enqueue( to: "user@example.com", body: "Welcome" ); One of the most frustrating parts of cloud development is local emulation. Encore.ts provides a local backend daemon that spins up Docker containers for your databases, queues, and caches. You get a local developer dashboard (running on http://localhost:9400 ) that shows every request, trace, and log. 5. Distributed Tracing by Default Every request automatically receives a trace ID. Encore.ts captures spans for database queries, HTTP calls, and queue jobs. In production (if using Encore Cloud), you get a Prometheus/Grafana stack without configuration. How It Compares | Feature | Encore.ts | Express + Manual Setup | | :--- | :--- | :--- | | Database migrations | Automatic via SQLDatabase | Manual ( knex , prisma migrate ) | | Message queues | Built-in Queue type | Manual (BullMQ, SQS SDK) | | API client generation | Automatic, type-safe | Manual (OpenAPI + codegen) | | Infrastructure provisioning | None (encoded in code) | Terraform, CDK, or manual | | Local cloud emulation | Built-in with dashboard | Docker Compose (custom setup) | | Error handling | Structured, traceable | Custom middleware required | The Catch (Current Limitations) Encore.ts is not a drop-in replacement for express in existing projects. It requires you to structure your project in a specific way (top-level api functions, specific file layout). It is not a generic HTTP framework—it is a platform. In your Next
At its core, Encore.ts is a and a runtime combined. It reads your TypeScript code structure to understand your architecture, then spins up the necessary cloud resources without requiring you to write Infrastructure as Code (IaC) files like Terraform or Pulumi. Core Features 1. Infrastructure from Code This is Encore.ts's killer feature. You don't write CREATE TABLE SQL migrations manually or configure SQS queues. Instead, you write TypeScript:
When you deploy, Encore.ts parses this, creates the necessary cloud resources (RDS, Cloud SQL, etc.), and runs your migrations automatically. Forget generating OpenAPI specs (Swagger) and praying your frontend matches. With Encore.ts, your backend endpoints define request/response shapes, and Encore automatically generates a fully type-safe TypeScript client: Encore
);