Encore Ts May 2026

import SQLDatabase from "encore/storage"; // This single line provisions a real database in dev/prod const db = new SQLDatabase("user-db", migrations: "./migrations", );

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. encore ts

import ping from "./client"; // auto-generated const result = await ping( name: "World" ); // fully typed Encore.ts treats background jobs as first-class citizens. You define a queue, and Encore handles the message broker (e.g., Redis, SQS, GCP Pub/Sub):

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: You get a local developer dashboard (running on

In your Next.js or React frontend:

is a new breed of TypeScript backend framework that flips the script. It is not just an HTTP router; it is a complete backend development platform that includes infrastructure tooling, type-safe clients, and built-in distributed systems primitives. What is Encore.ts? Developed by the team behind Encore (originally a Go framework), Encore.ts brings the same "backend development platform" philosophy to TypeScript. It is an opinionated framework that compiles your TypeScript code into a deployable backend, automatically handling infrastructure provisioning (like databases, queues, and cron jobs) and generating idiomatic API clients. Encore

// 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! ;