Open Source Development Platform for building robust type-safe distributed systems with declarative infrastructure
Encore provides Open Source development tools, from local development to your cloud:
⭐ Star this repository to help spread the word.
💿 Install Encore:
brew install encoredev/tap/encore
curl -L https://encore.dev/install.sh | bash
iwr https://encore.dev/install.ps1 | iex
🕹 Create your first app:
encore app create --example=ts/introduction
encore app create --example=hello-world
🧩 See example apps: Example Apps Repo
🚀 See products being build with Encore: Showcase
👋 Have questions? Join the friendly developer community on Discord.
📞 Talk to a human: Book a 1:1 demo with one of our founders.
Watch the intro video for a quick introduction to Encore concepts & code examples.
Cloud services enable us to build highly scalable applications, but often lead to a poor developer experience — forcing developers to manage significant complexity during development and do a lot of repetitive manual work.
Encore is purpose-built to solve this problem and provides a complete toolset for backend development — from local development and testing, to cloud infrastructure integration and DevOps.
Encore's open source backend frameworks Encore.ts and Encore.go enable you to define resources like services, databases, cron jobs, and Pub/Sub, as type-safe objects in your application code.
With the frameworks you only define infrastructure semantics — the things that matter to your application's behavior — not configuration for specific cloud services. Encore parses your application and builds a graph of both its logical architecture and its infrastructure requirements, it then automatically generates boilerplate and helps orchestrate the relevant infrastructure for each environment. This means the same application code can be used to run locally, test in preview environments, and deploy to cloud environments on e.g. AWS and GCP.
This often removes the need for separate infrastructure configuration like Terraform, increases standardization in both your codebase and infrastructure, and makes your application highly portable across cloud providers.
Encore is fully open source, there is no proprietary code running in your application.
Defining microservices and API endpoints is incredibly simple, requiring less than 10 lines of code to define a production-ready deployable service and API endpoint.
Using Encore.ts, it looks like this:
import { api } from "encore.dev/api";
export const get = api(
{ expose: true, method: "GET", path: "/hello/:name" },
async ({ name }: { name: string }): Promise<Response> => {
const msg = `Hello ${name}!`;
return { message: msg };
}
);
interface Response {
message: string;
}
Using Encore.go, it looks like this:
package hello
//encore:api public path=/hello/:name
func World(ctx context.Context, name string) (*Response, error) {
msg := fmt.Sprintf("Hello, %s!", name)
return &Response{Message: msg}, nil
}
type Response struct {
Message string
}
If you want a Pub/Sub Topic, you declare it directly in your application code and Encore will integrate the infrastructure and generate the boilerplate code necessary. Encore supports the following Pub/Sub infrastructure:
Using the Encore.ts, it looks like this:
import { Topic } "encore.dev/pubsub"
export interface SignupEvent {
userID: string;
}
export const signups = new Topic<SignupEvent>("signups", {
deliveryGuarantee: "at-least-once",
});
Using Encore.go, it looks like this:
import "encore.dev/pubsub"
type User struct { /* fields... */ }
var Signup = pubsub.NewTopic[*User]("signup", pubsub.TopicConfig{
DeliveryGuarantee: pubsub.AtLeastOnce,
})
// Publish messages by calling a method
Signup.Publish(ctx, &User{...})
See how to use the Backend Frameworks in the docs:
Encore provides purpose-built tooling for each step in the development process, from local development and testing, to cloud DevOps. Here we'll cover the key features for each part of the process.
When you run your app locally using the Encore CLI, Encore parses your code and automatically sets up the necessary local infrastructure on the fly. No more messing around with Docker Compose!
You also get built-in tools for an efficient workflow when creating distributed systems and event-driven applications:
Here's a video showing the local development dashboard:
https://github.com/encoredev/encore/assets/78424526/4d066c76-9e6c-4c0e-b4c7-6b2ba6161dc8
Encore comes with several built-in tools to help with testing:
Encore Cloud Platform is Encore's product offering for teams wanting to focus their engineering effort on their product development, avoiding investing time in platformization and DevOps.
Encore Cloud Platform provides automatic infrastructure provisioning in your cloud on AWS & GCP. So instead of writing Terraform, YAML, or clicking in cloud consoles, you connect your cloud account and simply deploy your application. Because wyou don't need to specificy any configuration for specific cloud services when using Encore's frameworks, Encore Cloud Platform enables you to configure and change your infrastructure over time, without needing to make code changes or manually update infrastructure config files.
When you deploy, Encore Cloud Platform automatically provisions infrastructure using battle-tested cloud services on AWS and GCP, such as:
Encore Cloud Platform also provides tools to help you reduce DevOps work by >90%:
Encore Cloud Platform also includes cloud versions of Encore's built-in development tools:
Here's a video showing the Cloud Platform Dashboard:
https://github.com/encoredev/encore/assets/78424526/8116b387-d4d4-4e54-8768-3686ba0245f5
Encore is designed to give teams a productive and less complex experience when solving most backend use cases. Many teams use Encore to build things like:
brew install encoredev/tap/encore
curl -L https://encore.dev/install.sh | bash
iwr https://encore.dev/install.ps1 | iex
encore app create --example=ts/introduction
encore app create --example=hello-world
Everything needed to develop and deploy Encore applications is Open Source, including the backend frameworks, parser, compiler, runtime, and CLI. This includes all code needed for local development and everything that runs in your application when it is deployed.
The Open Source CLI also provides a mechanism to generate a Docker images for your application, so you easily self-host your application. Learn more in the docs.
Developers building with Encore are forward-thinkers who want to focus on creative programming and building great software to solve meaningful problems. It's a friendly place, great for exchanging ideas and learning new things! Join the conversation on Discord.
We rely on your contributions and feedback to improve Encore for everyone who is using it. Here's how you can contribute:
https://github.com/encoredev/encore/assets/78424526/f511b3fe-751f-4bb8-a1da-6c9e0765ac08
https://github.com/encoredev/encore/assets/78424526/4c659fb8-e9ec-4f14-820b-c2b8d35e5359
https://github.com/encoredev/encore/assets/78424526/a880ed2d-e9a6-4add-b5a8-a4b44b97587b
https://github.com/encoredev/encore/assets/78424526/8116b387-d4d4-4e54-8768-3686ba0245f5
https://github.com/encoredev/encore/assets/78424526/35189335-e3d7-4046-bab0-1af0f00d2504
Encore was founded by long-time backend engineers from Spotify, Google, and Monzo with over 50 years of collective experience. We’ve lived through the challenges of building complex distributed systems with thousands of services, and scaling to hundreds of millions of users.
Encore grew out of these experiences and is a solution to the frustrations that came with them: unnecessary crippling complexity and constant repetition of undifferentiated work that suffocates the developer’s creativity. With Encore, we want to set developers free to achieve their creative potential.
For individual developers building for the cloud, Encore provides a radically improved experience. With Encore you’re able to stay in the flow state and experience the joy and creativity of building.
For startup teams who need to build a scalable backend to support the growth of their product, Encore lets them get up and running in the cloud within minutes. It lets them focus on solving the needs of their users, instead of spending most of their time re-solving the everyday challenges of building distributed systems in the cloud.
For individual teams in large organizations that want to focus on innovating and building new features, Encore lets them stop spending time on operations and onboarding new team members. Using Encore for new feature development is easy, just spin up a new backend service in a few minutes.
Encore is the only tool that understands what you’re building. Encore uses static analysis to deeply understand the application you’re building. This enables a unique developer experience that helps you stay in the flow as you’re building. For instance, you don't need to bother with configuring and managing infrastructure, setting up environments and keeping them in sync, or writing documentation and drafting architecture diagrams. Encore does all of this automatically out of the box.
Unlike many tools that aim to only make cloud deployment easier, Encore is not a cloud hosting provider. With Encore, you can use your cloud account with AWS and GCP. This means you’re in control of your data and can maintain your trust relationship with your cloud provider. You can also use Encore's development cloud for free, with pretty generous "fair use" limits.
We've found that to meaningfully improve the developer experience, you have to operate across the full stack. Unless you understand how an application is deployed, there are a large number of things in the development process that you can't simplify. That's why so many other developer tools have such a limited impact. With Encore's more integrated approach, we're able to unlock a radically better experience for developers.
Encore is designed to let you go outside of the framework when you want to, and easily drop down in abstraction level when you need to, so you never run into any dead-ends.
Should you want to migrate away, it's straightforward and does not require a big rewrite. 99% of your code is regular Go or TypeScript.
Encore provides tools for self-hosting your application, by using the Open Source CLI to produce a standalone Docker image that can be deployed anywhere you'd like.
See CONTRIBUTING.md.