Back to Encore

README

README.md

1.57.610.9 KB
Original Source
<p align="center" dir="auto"> <a href="https://encore.dev"></img></a>

<b>Encore: Infrastructure orchestration from local to your cloud</b>

</p>

What is Encore?

Encore derives infrastructure from your application code and manages it across local and cloud environments.

Build a backend that runs the same way on your laptop and in production: type-safe, traceable, and deployable to your own AWS or GCP account without Terraform or YAML.

You declare resources semantically in code, like “I need a Postgres database.” Encore turns your code into an application graph, then provisions the right infrastructure for each environment: local sandbox, managed cloud on AWS/GCP, or self-hosted Docker.

Because infrastructure is derived from the code that uses it, it stays in sync as your application evolves.

Example: Declaring resources

typescript
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Topic } from "encore.dev/pubsub";
import { Bucket } from "encore.dev/storage/objects";

// Define a Postgres database
const db = new SQLDatabase("users", { migrations: "./migrations" });
// Define a Pub/Sub topic
const signups = new Topic<SignupEvent>("signups", {
  deliveryGuarantee: "at-least-once"
});
// Define an object storage bucket
const avatars = new Bucket("avatars", { versioned: true });

Each declaration becomes a node in the application graph. Encore runs the migrations and stands up local equivalents on encore run, and provisions the cloud equivalents on deploy:

ResourceLocalAWSGCP
SQL DatabasePostgresRDSCloud SQL
Pub/SubNSQSNS + SQSCloud Pub/Sub
Object StorageLocal FSS3GCS
CacheRedisElastiCacheMemorystore
CronManually triggeredEncore CloudEncore Cloud
SecretsEncore vaultSecrets ManagerSecret Manager
ComputeLocalFargate / EKSCloud Run / GKE

When you push a change that adds or modifies a resource, Encore diffs the application graph against the environment, provisions whatever is missing in your AWS or GCP account, and rolls out the new code against it.

Configuration

Encore separates application semantics from environment-specific configuration. In code, you define what resources your app needs, not how each environment should configure them. That keeps services portable across clouds, regions, accounts, scale profiles, and local development.

Encore provisions every resource with sane production defaults, then helps you manage configuration separately from your application code:

  • Encore Cloud dashboard: easy to use knobs for all common settings like process allocation, instance sizes, replicas, etc. See more in docs.
  • Your AWS or GCP console: tweak anything directly in your cloud provider console. Encore picks up the changes on the next deploy.
  • IaC: manage config for Encore-provisioned resources alongside the rest of your infrastructure via the Terraform provider.

Language SDKs

LanguageDocs
TypeScriptencore.dev/docs/ts
Goencore.dev/docs/go
PythonComing soon

What Changes

Before Encore:

  • Configure Localstack and docker compose to run app locally while developing.
  • Write Terraform to go to prod. Open a PR. Get approval. Apply.
  • Something breaks: IAM doesn't match what the code calls, a queue name drifts, a secret is missing in prod.
  • Fix, push, wait for the next apply, find the next thing.
  • Application code and infrastructure code meet for the first time in production.

After Encore:

  • Declare the resource in code. Run locally with encore run.
  • Open a PR and get a cloud preview environment for end-to-end testing.
  • git push to deploy. Infrastructure is derived from the application code, validated at build time.
  • IAM is configured from real code paths. No missing permissions. No unnecessary access.

The fail-loop moves from "push, wait, fix" to "run locally, see it work, push." Platform teams set guardrails once. Encore enforces them on every deploy.

Adopting Encore

You don't need a rewrite, and you don't need to use Encore for every resource in your stack.

  • Use any infrastructure as normal: Encore doesn't try to own every resource. Import the AWS SDK, GCP client libraries, or any third-party API and provision the resource yourself, or wire it up alongside Encore-managed resources via the Terraform provider.
  • Migrate service-by-service: Build new services in Encore and run them next to your existing system, integrated over APIs.
  • Deploy where your stack already lives: Encore can deploy into your existing Kubernetes cluster or into your VPC in AWS or GCP.

Start with a low-risk, frequently-changed service. See the migration guide for the full playbook.

Migrating Away

Encore is designed to make leaving easy. 99% of your code is regular Go or TypeScript, so there's not much to rewrite. See the migrate-away guide for more.

Limitations

Encore integrates at the application layer, which means a few constraints to be clear about up front:

  • Language: Your services need to be written in a supported language: TypeScript (Node.js) or Go. Python is coming soon.
  • Infrastructure scope: Encore is designed to solve the 99% use case, making it easier to work with the resources you use over and over again; services, databases, Pub/Sub, object storage, caches, cron jobs, and secrets. For the remaining 1% that is specific to your domain, you can still integrate any other service as you normally would. Encore doesn't prevent it or make it harder.
  • Cloud providers: Encore Cloud's fully-automated provisioning currently supports AWS and GCP. Azure is on the roadmap. Self-hosting via encore build docker works on any provider.

How Encore Compares

ToolWhat it doesHow Encore differs
Pulumi / CDK / Terraform / SSTInfrastructure-as-Code for provisioning cloud resourcesNo separate IaC to write. Infrastructure is generated from your application code, so the same code runs locally and deploys to AWS or GCP.
Convex / Supabase / FirebaseManaged backend-as-a-service platformsRuns in your own AWS or GCP account. No vendor lock-in.
Render / Fly.io / Railway / VercelPaaS-style deployment platformsDeploys to your own cloud account, not a managed runtime.

Quick Start

bash
encore app create     # scaffold a project
cd myapp
encore run            # run locally with provisioned infra + dev dashboard

Install Encore:

  • macOS: brew install encoredev/tap/encore
  • Linux: curl -L https://encore.dev/install.sh | bash
  • Windows: iwr https://encore.dev/install.ps1 | iex

Full walkthrough in the Quickstart guide.

AI Integration

Encore is built for AI-assisted development. Every Encore app comes with built-in CLAUDE.md and an MCP server that lets agents introspect your app and generate type-safe code that follows your patterns. See the AI integration docs for more details.

Local Dev Dashboard

The Encore CLI ships a local dashboard for inspecting services, APIs, traces, databases, Pub/Sub messages, and architecture diagrams in real time. Run encore run and it is there at localhost:9400.

https://github.com/user-attachments/assets/461b902f-8fd3-46f1-a73c-0ebbfa789ce3

Deployment Platform

Encore Cloud is the optional managed platform. It connects to your AWS or GCP account and provisions the resources your code declares in your own VPC. Other features:

  • Preview environments for each PR
  • Distributed tracing, metrics, and logs across services
  • Architecture diagrams generated from the application graph
  • Cost analytics and infrastructure approval workflows
  • Service catalog and API documentation

See pricing and learn more.

You can also skip the platform entirely. Run encore build docker to produce a standalone image you supply an infra config to.

Who's Using Encore

150+ Teams are already shipping production apps with Encore, including: Groupon, Echo.xyz (a Coinbase company), Bookshop.org, Gradient Labs, Ashby, Later.com, Pallet, Pave Bank, and Playwire. Use cases span AI, fintech, logistics, commerce, web3, and more. See case studies to learn more.

Resources

License

Encore is licensed under the Mozilla Public License 2.0.

The framework, parser, compiler, runtime, CLI, and everything needed to develop, build, and self-host an Encore application is Open Source. Encore Cloud, the optional managed deployment platform, is a commercial service.

See CONTRIBUTING.md for additional details.