encr.dev

module
v1.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MPL-2.0

README

encore icon

Encore – Backend Development Platform

Encore is an end-to-end backend development platform that automatically provisions your application's infrastructure in your cloud account. It's designed to help you build your product without platform distractions, removes boilerplate, and comes with built-in tools for observability and collaboration.

Start building today and unlock your creative potential, free from cloud complexity.

🏁 Try Encore: Quick Start Guide / Example Applications

⭐ Star this repository to help spread the word.

👋 Have questions? Join the friendly developer community, or say hello on Slack.

📞 See if Encore fits your project: Book a 1:1 demo.

How Encore works

Encore Overview

Most backend applications use a small set of common building blocks: services, APIs, databases, queues, caches, and cron jobs. The real complexity lies in provisioning and managing the underlying infrastructure, and the endless boilerplate that's required to tie it all together in your application.

Encore simplifies backend development by providing an infrastructure SDK that lets you declare and use these common building blocks as objects directly in your code.

Encore parses your application and builds a graph of both its logical architecture and its infrastructure requirements. It then automatically provisions the necessary infrastructure, instruments your application with logs and traces, and much more.

It works the same way for local development, preview and test environments, and in production using your cloud account.

This completely removes the need for infrastructure configuration files, increases standardization in both your codebase and infrastructure, and makes your application portable across cloud providers by default.

Learn more about using Encore's building blocks in the docs:

Key features

  • Microservices without complexity: Define services and API endpoints with a single line of Go code, and call APIs using regular function calls.

  • Develop as if the infrastructure is already in place: Encore's infrastructure SDK lets you define databases, queues, caches, and scheduled tasks, as objects in your code.

  • Built-in DevOps: Run git push encore to build, test, provision the necessary cloud infrastructure, and deploy.

  • Provision environments automatically: Deploy to unlimited dev/preview/cloud environments without code changes. Encore provisions the necessary infrastructure and ensures environments stay in sync.

  • Preview environments: Integrate with GitHub to automatically set up each pull request as an ephemeral preview environment.

  • Deploy to your existing cloud account: Encore deploys your application to your existing cloud account in AWS or GCP, using best practices for building secure and scalable distributed systems.

  • Intelligent architecture diagrams: Visualise your application in with automated and interactive architecture diagrams.

  • Distributed Tracing: Your application is automatically instrumented to capture information about API calls, goroutines, HTTP requests, database queries, and more.

  • Metrics: Encore comes with built-in metrics and dashboards, and provides simple integrations with your favorite observability tools.

  • Secrets management: Securely store and use secrets, and API keys, without doing any work. Define secrets in your code, like any other variable, and Encore takes care of the rest.

  • Automated API documentation: Encore parses your source code to understand the request/response schemas for all your APIs and automatically generates high-quality API Documentation.

  • Generated Frontend Clients: Automatically generate type-safe API clients to integrate with your frontend.

Why choose Encore?

  • Faster Development: Encore streamlines the development process with its infrastructure SDK, clear abstractions, and built-in development tools, enabling you to build and deploy applications more quickly.
  • Reduced Costs: Encore's infrastructure management minimizes wasteful cloud expenses and reduces DevOps workload, allowing you to work more efficiently.
  • Scalability & Performance: Encore simplifies building microservices applications that can handle growing user bases and demands, without the normal boilerplate and complexity.
  • Control & Standardization: Built-in tools like automated architecture diagrams, infrastructure overviews, and approval workflows make it easy for teams and leaders to get an overview of the entire application.
  • Security & Compliance: Encore helps ensure your application and data is secure and compliant by enforcing standards and provisioning infrastructure according to best practises for each cloud provider.

Common use cases

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:

  • High-performance B2B Platforms
  • Fintech & Consumer apps
  • Global E-commerce marketplaces
  • Microservices backends for SaaS applications and mobile apps
  • And much more...

Getting started

Open Source

The Encore infrastructure SDK, parser, compiler, and CLI are all Open Source. A free Encore account is needed to unlock features like distributed tracing, secrets management, and deploying to cloud environments, as this functionality is orchestrated by the Encore Platform.

Join the most pioneering developer community

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 Slack.

We rely on your contributions and feedback to improve Encore for everyone who is using it. Here's how you can contribute:

  • Star and watch this repository to help spread the word and stay up to date.
  • Share your ideas and ask questions on Discourse.
  • Meet fellow Encore developers and chat on Slack.
  • Follow Encore on Twitter.
  • Share feedback or ask questions via email.
  • Leave feedback on the Public Roadmap.
  • Send a pull request here on GitHub with your contribution.

Demo video

demo video
Play full video on YouTube

Visuals

Code example

https://github.com/encoredev/encore/assets/78424526/f511b3fe-751f-4bb8-a1da-6c9e0765ac08

Local Development Dashboard

https://github.com/encoredev/encore/assets/78424526/565ab682-8c39-468e-8d21-c4d648b2dcb2

Generated Architecture Diagrams & Service Catalog

https://github.com/encoredev/encore/assets/78424526/a880ed2d-e9a6-4add-b5a8-a4b44b97587b

Auto-Provisioning Infrastructure & Multi-cloud Deployments

https://github.com/encoredev/encore/assets/78424526/8116b387-d4d4-4e54-8768-3686ba0245f5

Distributed Tracing & Metrics

https://github.com/encoredev/encore/assets/78424526/35189335-e3d7-4046-bab0-1af0f00d2504

Frequently Asked Questions (FAQ)

Who's behind Encore?

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.

Who is Encore for?

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 teams in mature 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.

How is Encore different?

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.

Why is the Encore SDK integrated with a cloud platform?

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.

What if I want to migrate away from Encore?

Encore has been designed to let you go outside of the SDK when you want to, and easily drop down in abstraction level when you need to. This means you're not likely to run into any "dead ends".

Should you want to migrate away, it's easy. As when you build an Encore application, the vast majority of code is just plain Go. So in practice, the amount of code specific to Encore is very small.

Encore has built-in support for ejecting your application as a way of removing the connection to the Encore Platform. Ejecting your app produces a standalone Docker image that can be deployed anywhere you'd like, and can help facilitate the migration away according to the process above.

Migrating away is low risk since Encore deploys to your cloud account from the start, which means there's never any data to migrate.

Open Source also plays a role. Encore's code generation, compiler, and parser are all open source and can be used however you want. So if you run into something unforeseen down the line, you have free access to the tools you might need.

And since Encore is designed for building distributed systems, it's straightforward to use it in combination with other backends that aren't built with Encore. So if you come across a use case where Encore for some reason doesn't fit, you won't need to tear everything up and start from scratch. You can just build that specific part without Encore.

We believe that adopting Encore is a low-risk decision, given it needs no initial investment in foundational work. The ambition is to simply add a lot of value to your everyday development process, from day one.

Contributing to Encore and building from source

See CONTRIBUTING.md.

Directories

Path Synopsis
cli
cmd/git-remote-encore
Command git-remote-encore provides a gitremote helper for interacting with Encore's git hosting without SSH keys, by piggybacking on Encore's auth tokens.
Command git-remote-encore provides a gitremote helper for interacting with Encore's git hosting without SSH keys, by piggybacking on Encore's auth tokens.
daemon
Package daemon implements the Encore daemon gRPC server.
Package daemon implements the Encore daemon gRPC server.
daemon/dash
Package dash serves the Encore Developer Dashboard.
Package dash serves the Encore Developer Dashboard.
daemon/dash/dashproxy
Package dashproxy proxies requests to the dash server, caching them locally for offline access.
Package dashproxy proxies requests to the dash server, caching them locally for offline access.
daemon/internal/manifest
Package manifest reads and writes Encore app manifests.
Package manifest reads and writes Encore app manifests.
daemon/internal/sym
Package sym parses symbol tables from Go binaries.
Package sym parses symbol tables from Go binaries.
daemon/run
Package run starts and tracks running Encore applications.
Package run starts and tracks running Encore applications.
daemon/secret
Package secret fetches and caches development secrets for Encore apps.
Package secret fetches and caches development secrets for Encore apps.
daemon/sqldb/external
Package external implements a cluster driver for an external cluster.
Package external implements a cluster driver for an external cluster.
internal/browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
internal/gosym
Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.
Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.
internal/jsonrpc2
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
internal/jsonrpc2/servertest
Package servertest provides utilities for running tests against a remote LSP server.
Package servertest provides utilities for running tests against a remote LSP server.
internal/login
Package login handles login and authentication with Encore's platform.
Package login handles login and authentication with Encore's platform.
internal/xos
Package xos provides cross-platform helper functions.
Package xos provides cross-platform helper functions.
internal
clientgen
Package clientgen generates code for use with Encore apps.
Package clientgen generates code for use with Encore apps.
conf
Package conf writes and reads the Encore configuration file for the user.
Package conf writes and reads the Encore configuration file for the user.
env
Package env answers where Encore tools and resources are located.
Package env answers where Encore tools and resources are located.
gocodegen
Package gocodegen contains shared code used for generating Go code by both the compilers code generator, and the CLI's client generator.
Package gocodegen contains shared code used for generating Go code by both the compilers code generator, and the CLI's client generator.
goldfish
Package goldfish provides a short-term cache of values.
Package goldfish provides a short-term cache of values.
parser
pkg
ansi
Package ansi provides helper functions for writing ANSI terminal escape codes.
Package ansi provides helper functions for writing ANSI terminal escape codes.
appfile
Package appfile reads and writes encore.app files.
Package appfile reads and writes encore.app files.
eerror
Package eerror stands for Encore Error and is used to provide a little more information about the underlying error's metadata.
Package eerror stands for Encore Error and is used to provide a little more information about the underlying error's metadata.
fns
github
Package github provides utilities for interacting with GitHub repositories.
Package github provides utilities for interacting with GitHub repositories.
scrub/metascrub
Package metascrub computes scrub paths for a metadata type.
Package metascrub computes scrub paths for a metadata type.
svcproxy
Package svcproxy provides an HTTP proxy which allows the daemon to serve HTTP requests on behalf of services within the app and forward then to the appropriate process.
Package svcproxy provides an HTTP proxy which allows the daemon to serve HTTP requests on behalf of services within the app and forward then to the appropriate process.
vcs
vfs
Package vfs represents a virtual filesystem
Package vfs represents a virtual filesystem
tools
v2
app
compiler/build
Package build supports building and testing Encore applications with codegen and rewrite overlays.
Package build supports building and testing Encore applications with codegen and rewrite overlays.
internals/perr
Package perr provides utilities for handling parse errors.
Package perr provides utilities for handling parse errors.
internals/resourcepaths
Package resourcepaths parses API and other resource paths.
Package resourcepaths parses API and other resource paths.
internals/schema
Package schema implements parsing of Go types into Encore's schema format.
Package schema implements parsing of Go types into Encore's schema format.
internals/schema/schematest
Package schematest provides utilities for writing tests that make assertions about schema types and declarations.
Package schematest provides utilities for writing tests that make assertions about schema types and declarations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL