encore

Encore is the Backend Development Platform purpose-built to help you create event-driven and distributed systems.

MPL-2.0 License

Downloads
5.9K
Stars
4.7K
Committers
68

Bot releases are visible (Hide)

encore - Secrets 2.0

Published by eandre over 1 year ago

Introducing Secrets 2.0! 🎉

Encore has had built-in secrets management from day one, but it was quite limited: each secret value only applied to either {production} environments or to {development,preview,local} environments. This worked fine for basic use cases but was insufficient for many other use cases. For example, it's common to want a different secret value for local development specifically. In other use cases it was common to want to use the same secret value for all environments, which previously required setting the same value twice.

Today we're excited to announce a much more flexible secrets management experience that better addresses these use cases! Starting today, each secret value can be individually configured to apply to exactly the environment(s) you want.

For example:

# Set for local only
$ encore secret set --type local MySecret

# Set for all environments
$ encore secret set --type prod,dev,pr,local SomeOtherSecret

# Set for all preview environments and the environment named 'staging'
$ encore secret set --type pr --env staging SecretPassword

Read the docs for more information.

There's also a brand new secrets management UI on the Encore Platform:

secrets2

Redacting sensitive data

Encore now supports redacting sensitive data from traces. Fields marked with the struct tag encore:"sensitive" (in request/response structs) are automatically redacted. This works for both individual values as well as nested fields.

Note that inputs to auth handlers are automatically marked as sensitive and are always redacted.

Read the docs for more information.

Database driver

The encore.dev/storage/sqldb package now supports accessing the underlying connection pool using sqldb.Driver.
See the package documentation for more information.

Bugfixes and other improvements

  • Improved API Explorer to use JSON fields instead of struct fields (#577)
  • Fixed trace id lookups on the Encore Platform

Thanks to our contributors!

We rely on the community to improve Encore, and we're always amazed by your incredible support and encouragement. A massive thank you to Patryk Siemiński, Mason Stewart, Sami Moustachir, Alex Yakubenko, Sean Knowles, David Mytton, Prasanna Balaji, Gabriel Bellon, and others for your contributions and feedback!

What’s next

We're very close to releasing support for metrics! We're also working on Kubernetes support, using existing infrastructure, and more.
– Remember to vote on your favorite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.

We’re excited to hear your feedback! ❤️

Full Changelog: https://github.com/encoredev/encore/compare/v1.12.1...v1.13.0

encore - Trace filters & loads of improvements

Published by marcuskohlberg almost 2 years ago

Trace filtering is here!

trace filter

We've finally added filtering to the tracing dashboard, making it easier to find exactly what you're looking for when working on a big system.

  • You can now filter on duration, User ID, Trace ID, and X-Request-ID
  • Check it out for yourself in the web platform

Bugfixes and other improvements

Thank you for all your bug reports and feedback! Here are some improvements we've made lately:

Thanks to our contributors!

We rely on the community to improve Encore, and we're always amazed by your incredible support and encouragement. A massive thank you to Patryk Siemiński, Amr, Daniel Stocks, @Willyham, @klaidliadon, MaxD, @melkstam, Jakob Nordfeldt, Prasanna Balaji for your contributions and feedback!

What’s next

We're very close to releasing a huge upgrade to Encore's infrastructure provisioning system. This will give you more flexibility, and it will be simple to add specific requirements, e.g. deploying to existing Kubernetes clusters. We're also about to release built-in metrics dashboards and an upgraded secrets manager!
– Remember to vote on your favorite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.

We’re excited to hear your feedback! ❤️

Full Changelog: https://github.com/encoredev/encore/compare/v1.10.1...v1.11.0

encore - Tracing improvements & Performance upgrade

Published by marcuskohlberg almost 2 years ago

Tracing is now sooo much better

We've just released a much-improved trace view. Here's what you need to know:

  • Raw endpoints are now traced – including HTTP path, method, request/response bodies and headers.
  • Traces now come with a JSON viewer, letting you expand/collapse parts of the payload if it's unwieldy to view.
  • Remember to update before trying it out: encore version update

Speed improvements to parser and tests

To make Encore better for everyone with a very large code base, we've improved Encore's static analysis performance. The parser is now 5x faster!

With Encore you run tests with encore test instead of go test. This is a wrapper that compiles the Encore app and then runs go test. It supports all the same flags that the go test command does. For bigger projects, we want to make sure this is snappy! – In the latest release, we've improved test speed 2x, both for local development as well as for CI/CD

Bugfixes and other improvements

We're always thankful when we get feedback and bug reports from anyone using Encore. Here are some improvements we've made lately, thanks to your input:

  • The metadata APIs that provide information about the current request also contains information about PubSub messages and Cron Job executions.
  • You can now override auth information for the current request inside tests.
  • Improved documentation for how to structure your Encore app (thanks to @Minivera!).

Thanks to our contributors
We rely on the community to improve Encore, and we continue to be surprised and humbled by your incredible support and encouragement. A massive thank you to @Minivera , Patryk Siemiński, Amr, Daniel Stocks, @Willyham, MaxD, @melkstam, Jakob Nordfeldt, Prasanna Balaji, and Juan Álvarez for your contributions and feedback!

What’s next

We're close to releasing a big upgrade to infrastructure provisioning, making it more flexible and easier for you to add specific requirements like deploying to existing Kubernetes clusters. We'll also soon release new observability and metrics capabilities.
– Remember to vote on your favorite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack or post on the Community Forum.

We’re excited to hear your feedback! ❤️

Full Changelog: https://github.com/encoredev/encore/compare/v1.9.3...v1.10.1

encore - Configure the World!

Published by DomBlack almost 2 years ago

Or maybe just your application to start with.

In this release, we're introducing a new config package that combines the power of CUE lang with the smooth Encore developer experience. It gives you both the type safety of Go, and the powerful flexibility of CUE. This lets you focus on writing your business logic, safe in the knowledge that Encore's compiler will prevent invalid configurations from ever reaching your production environment.

To use it, you simply call config.Load[*MyConfigType]() and assign the returned instance of your config type to a package-level variable (Remember to first update with encore version update.)

As with many of Encore's features, config comes with isolated test support. This allows you to override configuration values on inside tests, without impacting any other concurrently running tests.

For more information about Encore native config support, check out the docs.

Bugfixes and other improvements

We're always thankful when we get feedback and bug reports from anyone using Encore!
Here are some improvements we've made lately, thanks to your input:

  • Added documentation to the encore.dev Go package to explain why those functions all panic, as well as including links to the underlying implementation (encoredev/encore.dev#11)
  • Fixed an issue with walking recursive types (#439)
  • Fixed an issue with the rendering of pointer types in the development dashboard (#440)
  • Improved the documentation by improving clarity on some pages, rewriting others and fixing various typos.

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. A huge thank you to @SarojWasti & @ArjunSharda for your contributions to this release!

What's next

Over the next couple of weeks, we're going to release a next-generation cloud provisioning system for Encore. Check out this blog post to get a sneak preview. – Remember to vote on your favorite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack or our Community Forums.

We're excited to hear your feedback! ❤️

Catch you in the cloud,
Dom & the Encore team

Full Changelog: https://github.com/encoredev/encore/compare/v1.8.0...v1.9.0

encore - Introducing next-generation error reports

Published by DomBlack about 2 years ago

If there's an error, at least it's a nice one now

Compiler errors are a source of frustration for most developers, as they often force us to decipher confusing or misleading error messages. To make this a better experience we've taken inspiration from Elm and Rust, and we've modified how Encore reports into human-readable errors.

Instead of simply reporting a filename, line number, and column number with a single line of text describing the error, Encore now shows a summary of the error, the line(s) of code which caused the error, and also show other lines of code to provide additional context.

multi-file-error

All errors returned by Encore will now render in this format. Over the coming months, we plan to improve the readability of all errors by providing additional context or help text within the error itself.

GoLand Plugin

Version

We are happy to announce that Encore now has an official plugin for GoLand and IntelliJ. The plugin allows you to run unit tests on Encore applications from the comfort of your IDE, as well as allowing you to run those same tests in debug mode with breakpoint support!

image

As with Encore itself, the plugin is open source. Bug reports and contributions are welcome at encoredev/intellij-plugin.

Download the plugin today: https://plugins.jetbrains.com/plugin/20010-encore/

Bugfixes and other improvements

We're always thankful when we get feedback and bug reports from anyone using Encore. Here are some improvements we've made lately, thanks to your input:

  • We've made multiple improvements to the local dashboard from fixing the font loading to adding scrolling to the logs shown in the trace view.
  • When you use the encore logs command to stream logs, we show a "waiting for logs" message to indicate that the stream is connected successfully.
  • We've fixed an issue with authorization tokens to the Encore platform becoming corrupted and not refreshing correctly.
  • Fixed a bug where if a DI-based API was used in a cronjob, Encore was unable to parse the application if the encore.gen.go file was missing. (Thanks @Willyham for the bug report)
  • Various improvements to the documentation.

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. A huge thank you to @kVarunkk, @eddy-geek, @AM1TB, @Minivera, @michizhou for your contributions to this release!

What's next

Over the next couple of weeks, we're super excited to announce we'll be releasing Encore native support for per-service configuration, powered by the CUE language. Remember to vote on your favourite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack or our Community Forums.

We're excited to hear your feedback! ❤️

Catch you in the cloud,
Dom & the Encore team

Full Changelog: https://github.com/encoredev/encore/compare/v1.7.0...v1.8.0

encore - Introducing Caches: Use Redis as a native code concept in Encore

Published by marcuskohlberg about 2 years ago

redis caches now available in encore

In-memory caches are vital when you're building real-time applications like games, ad systems, or financial applications. They're also practical when you want a convenient way to store key values without needing a database. That's why we're excited to let you know that Encore now has native support for in-memory caches, using Redis!

Here's what you need to know

  • The Encore framework now has a native API for working with caches, and as usual, it works the same across Encore cloud, GCP, and AWS. (Azure coming soon!)
  • Before trying it out, remember to first update using: encore version update and thengo get encore.dev@latest

Check out the docs to see how the new cache API works.

Upgrades to Encore Flow

We've also been busy making improvements to Encore Flow:

  • Cron Jobs are now included in the Encore Flow architecture diagrams, making it dead simple to see which services have Cron Jobs attached.
  • You can now easily download an image of your system architecture using the little camera icon in the upper right corner of the Encore Flow view.

newflowfeatures

Local dev dash refresh

It's been a long time coming, but it's finally done: The local dev dash is now using the same styling as the web platform! We've also made a bunch of usability improvements to make it more intuitive and easier to use. We'd love to hear what you think on Slack!
devdash

Bugfixes and other improvements

We're always thankful when we get feedback and bug reports from anyone using Encore. Here are some improvements we've made lately, thanks to your input:

  • We've given the Encore website a big performance boost, so it loads faster and feels snappier!
  • We've improved the responsiveness and layout of the docs section so it's easier to use side-by-side with your IDE.
  • We fixed a bug where Flow wouldn't render properly on Firefox.

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement.
Thanks to @BogDAAAMN, @Minivera, @Willyham, @davidmytton, @melkstam, MaxD for your ideas, bug reports and feedback!

Introducing our new community forums

For a long time, we've had an active Slack group. It's been a great way for everyone to engage in meaningful conversations, and for us quickly provide help when there are questions. Lately, we've noticed that the drawback with Slack is that it makes it hard for new joiners to discover answers to common questions and refer to past conversations.

That's why we've launched a community forum!

We'll use this for asynchronous conversations and to build up a knowledge base of community questions and answers.

  • If you haven't already, sign up and introduce yourself!

We're not going to stop using Slack, rather we're going to focus it on synchronous and time-sensitive conversations.

What's next

In the coming weeks we'll be adding even more flexibility to the Encore framework, with improved support for configuration. We're also working on a big upgrade to infrastructure provisioning, making it more flexible and easier for you to add specific requirements like deploying to existing Kubernetes clusters. - Remember to vote on your favorite feature on the roadmap!

As always, if you have questions or feedback, tell us on Slack.

We're excited to hear your feedback! ❤️

Catch you in the cloud,
André & the Encore team

encore - Encore Flow

Published by eandre about 2 years ago

Introducing Encore Flow — Visualize your cloud microservices architecture with one click!

Flow is the world's first intelligent visual backend architecture tool for the cloud. Flow helps you improve your microservices architecture, and makes it easy for everyone on the team to understand it. It lets you instantly identify which services depend on each other and how they work together. With Flow, building backends has never been easier – from designing your architecture and collaborating on pull requests, to onboarding new team members.

image

Flow is now available for all Encore users! If you haven’t tried Encore yet, get started here.

🥐 If you already have Encore installed, run encore version update to upgrade.

Flow Key Features

  • Flow gives your entire team an accurate and up-to-date view of your entire system – point and click in all parts of your microservices architecture to instantly reveal how it’s wired.
  • Flow gives you a real-time view of the changes you’re making as you code, and will soon integrate with GitHub to automatically add visual context to every pull request.
  • Use Flow to follow API calls across services and visualize dependencies, to track down bottlenecks before they grow into big problems

Over the coming months we’ll extend Encore Flow with a suite of intelligent development tools, to make it even simpler to build your cloud backend. Follow us on Twitter or Star Encore on GitHub to stay up to date.

Azure Pub/Sub

Encore Pub/Sub now officially supports Azure, bringing the support to all the major cloud providers! Give it a spin and let us know what you think.

Bug fixes and other improvements

  • Encore now runs Go 1.19.1
  • Encore now provisions Cloud SQL instances with PostgreSQL 14
  • Fixed provisioning of Pub/Sub topics without subscribers

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Thanks to @bjaanes, @Willyham, @raymondbutcher and others for your feedback and contributions!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What's next

Over the coming weeks we'll be adding support for configuration, caching, Kubernetes deployments, and more. Vote on your favorite feature on the roadmap!

If you like what we're up to, why not star Encore here on GitHub?

As always, if you have questions or feedback, tell us on Slack or just reply to this email.

We're excited to hear your feedback! ❤️

Catch you in the cloud,

The Encore Team

encore - Middleware, Validation, Dependency Injection, oh my!

Published by eandre about 2 years ago

We're excited to announce Encore now supports three of the most highly requested features: Middleware, Validation support, and Dependency Injection! Each one is large enough to warrant its own release but here's a three-for-one!

This means you can now:

  • Define service-specific or global middleware to implement cross-cutting concerns spanning several endpoints
  • Automatically validate incoming requests before invoking handlers
  • Simplify testing of Encore APIs and services
  • Hook into the service initialization and graceful shutdown process for custom logic

🥐 Run encore version update to grab the latest version, or read on for more information.

Encore Middleware

Middleware has been one of the most highly requested Encore features, and it's finally here! Unlike typical Go HTTP middleware, Encore's middleware operates on fully unmarshalled types which enables some incredible workflows. Here's how you define a middleware:

import (
    "encore.dev/middleware"
    "encore.dev/rlog"
)

//encore:middleware target=all
func MyMiddleware(req middleware.Request, next middleware.Next) middleware.Response {
    resp := next(req)
    rlog.Info("returning response", "payload", resp.Payload)
    return resp
}

See the middleware docs for more information!

Validation support

Encore now supports request validation out of the box! To use it, simplify define a Validate() error method on your request types. For example:

//encore:api public
func MyEndpoint(ctx context.Context, p *Params) error {
    // ...
}

type Params struct {
    Worry bool
}

func (p *Params) Validate() error {
    if p.Worry {
        return errors.New("don't worry, be happy")
    }
    return nil
}

See the validation docs for more information!

Dependency Injection

You can now define Encore APIs as methods on a Service Struct, which allows you to use dependency injection for easier testing of your Encore API endpoints. It introduces the new //encore:service directive that you can use to define a struct type as a Service Struct. It looks like this:

//encore:service
type Service struct { /* dependencies go here */ }

//encore:api public
func (s *Service) MyAPI(ctx context.Context) error { /* ... */ }

The new Service Struct approach also comes with several other features, like service initialization and graceful shutdown hooks!
Read the docs on Service Structs and
Dependency Injection for more information.

Bug fixes and other improvements

  • Fixed a case where the runtime was not fully initialized for test-only packages using sqldb.Named (#335)
  • Fixed trace viewer tooltip being difficult to hover into (#332)
  • Fixed encore.dev/docs keyboard shortcuts

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Thanks to @Willyham, @melkstam, @bjaanes, @Minivera, @davidmytton, @MaxD and others for your feedback and contributions!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What's next

Over the coming weeks we'll be adding support for configuration, Azure Pub/Sub, caching, and more. Vote on your favorite feature on the roadmap!

If you like what we're up to, why not star Encore here on GitHub?

As always, if you have questions or feedback, tell us on Slack or just reply to this email.

We're excited to hear your feedback! ❤️

Catch you in the cloud,

The Encore Team

encore - PubSub AWS support and Go 1.19

Published by DomBlack about 2 years ago

Asynchronous event processing, like PubSub, is a core building block in most modern distributed systems. It lets you build systems that communicate with each other by broadcasting events asynchronously. In the last release, we added added GCP support for Encore PubSub, and this week we're adding full AWS support.

This means you can now:

  • Effortlessly build event driven backend applications and deploy to both GCP and AWS.
  • Off-load expensive business logic into the background.
  • Process queues of work in a reliable, scalable, and cloud-agnostic way.
  • Easily decouple systems from each other.

🥐 Run encore version update to grab the latest version, or check out the docs to learn how to build with Encore PubSub.

Bug fixes and other improvements

  • Encore's been updated with Go 1.19 support.
  • The Encore runtime has seen major changes to improve testability and simplicity of new development. (#313)
  • We've squashed a few visual bugs in the Docs and have improved the Search functionality.
  • The local development dashboard now has search for API endpoints, making it easier to use when working on a large application.
  • And much much more!

Thanks to our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Thanks to David Mytton, Minivera, Vilhelm Melkstam, MaxD, Nick Klauer, and John Stern for your feedback and contributions!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What's next

Over the coming weeks we'll be adding even more flexibility to the Encore framework, with things like: extended configuration support and dependency injection. Vote on your favorite feature on the roadmap!

If you like what we're up to, why not star Encore here on GitHub?

As always, if you have questions or feedback, tell us on Slack or just reply to this email.

We're excited to hear your feedback! ❤️

Catch you in the cloud,

The Encore Team

encore - Introducing Encore PubSub

Published by eandre over 2 years ago

We're excited to share Encore's world-class developer experience now extends to asynchronous event processing with the addition of Encore PubSub!

Pub/Sub is one of the core building blocks of modern distributed systems. This means you can now easily:

  • Effortlessly build event driven backend applications
  • Off-load expensive business logic into the background and not during request processing
  • Process queues of work in a reliable, scalable, and cloud-agnostic way
  • Decouple systems from each other

Building such applications typically involves endless repetition and tedious boilerplate. No more.

Run encore version update to grab the latest version and experience it for yourself!

— If you're new to Encore, check out the Quick Start Guide to get started building.

Encore PubSub

Encore PubSub takes the same approach to building distributed systems as the rest of Encore, and makes building event-driven, asynchronous a breeze. With Encore you define your topics and subscriptions directly in your backend code, like any other object.

With just a few lines of code we have a serverless backend that scales from zero to hundreds of millions of users, with zero boilerplate and with static type safety. Encore takes care of all the complex, boring parts, so you can focus on building your product:

  • Provisioning and configuring the necessary cloud infrastructure
  • Connecting it all together, generating all the boilerplate code and configuration to use the infrastructure within your backend application
  • Connecting it all together with distributed tracing for effortless observability

The best part of all? It works the same way for local development as well as the major cloud providers. Encore provisions the cloud native infrastructure component for your specific cloud provider of choice, but the code works the same way.

To define a topic and begin publishing messages is just a handful lines of code:

import "encore.dev/pubsub"

type SignupEvent struct {
	Username string
	Email    string
}

var Signups = pubsub.NewTopic[*SignupEvent]("user-signups", pubsub.TopicConfig{
	DeliveryGuarantee: pubsub.AtLeastOnce,
})

// To publish a message:
_, err := Signups.Publish(ctx, &SignupEvent{Username: "jane.doe", Email: "[email protected]"})

To begin receiving messages is equally simple:

import "encore.dev/pubsub"

var _ = pubsub.NewSubscription(
    user.Signups, "send-welcome-email",
    pubsub.SubscriptionConfig[*user.SignupEvent] {
        Handler: SendWelcomeEmail,
    },
)

func SendWelcomeEmail(ctx context.Context, event *user.SignupEvent) error {
    // .. send email ...
}

Testing PubSub

To complement the new PubSub support Encore now comes with a new et (encore testing) package to simplify testing distributed systems.

We're starting with support for testing PubSub behavior, but over time we plan to expand on it to support easy testing of various distributed system behaviors. Read the package docs for more information.

Bug fixes and other improvements

  • Improved handling of max connections for local development (#300)
  • Improved keep-alive of encore db shell database sessions (#263)
  • Improved error messages for several common Encore syntax errors
  • Added support for customizing GOARCH and the docker base image for encore eject docker (#269)
  • Improved CORS handling for local development (#276, #278, #286)
  • Fixed running encore run before encore auth login on new systems (#299)
  • Fixed rendering of encore.dev/rlog log output when using structured logging of booleans (#308)

Thanks to all our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Big thanks to @davidmytton, @bscott, @bjaanes and others for your bug reports and feedback!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What’s next

Over the coming weeks we'll be adding much requested flexibility to the Encore framework, with improved support for things like: middleware, configuration and dependency injection. Vote on your favorite feature on the roadmap
– If you like what's going on, why not give the project a star?

As always, if you have questions or ideas, come tell us on Slack.
We’re excited to hear your feedback! ❤️

Catch you in the cloud,
André & the Encore team

encore - Introducing native HTTP headers support

Published by marcuskohlberg over 2 years ago

We're hard at work adding much requested flexibility to the Encore framework. In this week's release, we've added native support for HTTP headers in Encore APIs and authentication handlers. No more having to use only JSON!

This means you can now easily:

  • Model REST APIs like you're used to
  • Return HTTP headers
  • Use the local development dashboard to see how each field will be encoded

Run encore version update to grab the latest version and experience it for yourself!
– If you're new to Encore, check out the Quick Start Guide to get started building.

Improved authentication support

Encore now supports a more flexible way to express authentication handlers, using struct payloads in the same way you're used to for regular endpoints. The struct payloads can include multiple fields that can be sourced from either HTTP Headers or query strings.

That means you can do things like:

  • Implement more advanced authentication methods that go beyond simple Bearer tokens
  • Accept client_id as a query string and an API key in the Authorization header, at the same time
  • Support HTTP Basic Authentication

Improved client code generation

The Encore client code generation has received a major upgrade for both TypeScript and Go clients.

  • Support for HTTP headers
  • Support for structured authentication handlers
  • API errors are now reported as structured errors rather than strings
  • The TypeScript client now properly supports raw endpoints, including specifying the request body, HTTP method, and arbitrary fetch options

Note: The Go client now validates the provided HTTP method for calling raw endpoints. In the rare case that a raw endpoint was called without a valid Method, the behavior of the new client generator will differ by returning an error. In previous versions it instead defaulted to making a GET request.

Bug fixes and other improvements

  • Forward slashes encoded as %2F within string path segments no longer causes that path segment to be treated as two separate segments.
  • In the rare case that path segment parameters conflict with reserved keywords or names the generated names are now prefixed with _ to avoid name collisions.
  • Blank or missing auth tokens in generated TypeScript clients will no longer be sent in the Authorization header
  • The encore.Meta function now reports the correct value for the APIBaseURL field for local development (#245)
  • Encore now supports ejecting an application as a standalone docker container. See encore eject docker --help for more information.
  • A more helpful error message is now displayed when an environment cannot be found when generating a client (#118)

Thanks to all our contributors

We rely on the community to improve Encore, and we're overwhelmed by your support and encouragement. Big thanks to @ValeriaVG, @Qolzam, Prasanna Balaji, @vilhelmmelkstam, and @MaxDanielsson for your bug reports and feedback!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What’s next

Over the coming weeks we'll be adding much requested flexibility to the Encore framework, with improved support for things like: middleware, configuration and dependency injection. Vote on your favorite feature on the roadmap
– If you like what's going on, why not give the project a star?

As always, if you have questions or ideas, come tell us on Slack.
We’re excited to hear your feedback! ❤️

Catch you in the cloud,
André & the Encore team

encore - Introducing the Encore App Metadata API

Published by marcuskohlberg over 2 years ago

As developers, we often find ourselves in situations where we need to change something in our codebase, but don't want to change it everywhere the code is deployed.

Using Encore's new App Metadata API, you can now query the runtime to find out what environment the application is running in. Which means you can easily load the appropriate configuration files into memory and get the correct behavior for each environment.

This makes it a breeze to do things like:

  • Use different cloud services per environment
  • Define environment specific business logic

Check out the docs to learn more.

Upgrading

With this release, we've updated the runtime API with the new metadata API's and types. To upgrade you will need to both:

  • Run encore version update to download v1.1.0 of the Encore compiler.
  • In each of your Encore applications, you will also need to run go get -u encore.dev to upgrade to the latest runtime API.

Bugfixes and other improvements

  • We've made a ton of improvements to Encore's SQLDB handling! Including upgrading to PostgreSQL 14, and adding support for external DB clusters for CI/CD.
  • The Encore runtime now shuts down with grace.
  • Encore now runs on Go 1.18.2.
  • In case you've missed it, we've launched a new visual identity and have given the website a lot of love!
  • ...and much more.

— Thanks to @davidmytton, @klemmster, @ValeriaVG, @vilhelmmelkstam, @kwihl, and @MaxDanielsson for your contributions, bug reports, and feedback!

Join the most pioneering developer community

Developers building with Encore are forward-thinkers working on exciting and innovative products. Join the conversation on Slack to see what's going on, learn from others, and share what you're working on.

What's next

Over the coming weeks we'll be releasing a vastly improved web UI, and focus on adding much requested flexibility to the Encore framework. We'll add improved support for things like: http headers in Encore APIs, middleware, and dependency injection.

As always, if you have questions or feedback, tell us on Slack or just reply to this email.
We're excited to hear your feedback! ❤️

Catch you in the cloud,
The Encore team

encore - Encore v1.0 — A new day for backend dev

Published by marcuskohlberg over 2 years ago

We're incredibly excited to announce Encore v1.0. With this release, Encore is fully prepared to support you in your next creative endeavour.

It's our belief that Encore will transform developers' lives. Our work will become far more joyful and creative. Rather than it being 80% about configuring tools and services that have been reconfigured thousands of times before, we'll spend our days building new products that have a real impact. And that could have huge benefits for society. Imagine the exciting innovations if the world's 25+ million developers are freed up to be five times more productive!

We hope that Encore will open things up to a broader range of folk. You won't need to have a deep understanding of the nuances of cloud services to develop world-changing software that is available on a global scale. Now more people who are passionate about real-world issues which they're trying to solve will be empowered to have an incredible impact.

Highlights of what's been added in this release

AWS Cloud deployments now generally available

We're happy to announce that we've added full support for deploying your Encore applications to Amazon Web Services. This is a huge milestone, as Encore now supports deploying seamlessly to all major cloud providers.

If you wish, you can easily deploy your application to all of them, for those multi-cloud bragging rights.
With Encore it's as easy as connecting your cloud account. There's no second step.

Check out the docs to learn how to connect your Encore app to your AWS account and start deploying in minutes.

Speedier builds and structured logs

When you deploy your Encore application, the platform takes care of building your app, provisioning the necessary infrastructure, and orchestrating the deployment. With this release, we've made builds blazing fast and laid the foundation for better and more structured build logs. Behind the scenes we've ripped out GCP Cloud Build and replaced it with our own firecracker based builder. If this tickles your fancy, we're busy writing an in-depth article on this very topic. Watch this space for more details.

Improvements & Bugfixes

  • We've upgraded the Encore fork of the Go runtime to 1.18.1 (it's now 0.0.1 better than before)

Catch you in the cloud,
The Encore Team

encore - Full support for Azure is here! (This is not a joke.) ​

Published by DomBlack over 2 years ago

One of the core beliefs behind Encore is that developers shouldn't need to worry about the intricacies of cloud infrastructure. Instead you should focus on being creative and crafting unique software for your users.

To achieve this, Encore enables you to deploy your applications to any supported clouds (yes plural), without making code changes. We're super excited to announce we've now added full support for Microsoft Azure to the list!

Float into the flow with Azure:

  • Create a new environment and deploy your app to Azure in minutes.
  • Keep using all Encore features in exactly the same way as before!
  • Run multiple environments across Azure / GCP / Encore for the same app. (AWS dropping soon!)

Check out the docs to learn more.

image

Bugfixes and other improvements

  • Added support for line based comments on struct fields.
    – Thanks to Javi Alvarez, Valeria Viana Gusmao, Denis Denis, Vilhelm Melkstam, Max D, Alessandro Resta and Richard Palm for your contributions and bug reports. (WOW, what a long list, and what a great community!)

What's next

Over the coming weeks we'll be adding AWS to the mix, dropping a huge UI update, and get on with adding native support for Queues and Object storage.

– Remember, you can share your comments and ideas on our Public Roadmap.

As always, if you have questions or feedback, join us on Slack or just reply to this email.

We're excited to hear your feedback!

encore - Shipping with Encore just got better

Published by marcuskohlberg over 2 years ago

We're continuously refining the Encore experience to make it even more frictionless, and give you more control and flexibility. This week we've released a bunch of big improvements to how deployments work for all your Encore applications.

Highlights of what we shipped the past week:

  • Much improved overview – Builds, infrastructure changes, and deploys in one view.
  • No surprises in your cloud bills – You can now choose whether you want to manually approve any infrastructure changes for each environment.
  • You can now easily re-trigger deploys from the Web Platform.

deployments improved

Bugfixes and other improvements

  • We refined the internal alerting and monitoring for the Web Platform to ensure availability.
  • We fixed a subtle bug related to parsing errors in app log messages.
    – Thanks to Valeria Viana Gusmao, Dinesh Katwal, and Glenn Lewis for their bug reports and contributions!

Join the most pioneering developer community

Developers building with Encore are forward thinkers working on interesting and exciting projects. Join the conversation on Slack to see what's going on, and share what you're working on.

What’s next

Over the coming weeks we’ll be reactivating AWS and Azure support for all Encore users, releasing a polished version of the Web Platform, adding native support for queues and object storage, and much more.
– Remember, you can share your comments and ideas on our Public Roadmap.

As always, if you have questions or feedback, join us on Slack.
We’re excited to hear your feedback! ❤️

encore - Go 1.18 Support – Generics, API fuzzing, and more

Published by marcuskohlberg over 2 years ago

To celebrate the release of Go 1.18, we’ve updated Encore with first-class support for generics, API fuzzing, and more!
Simply run encore version update to upgrade and get all these goodies.

Generics are here!

Encore v0.21 comes with full support for Go 1.18's generics! You can now write generic code with Encore, use generic types in API request and response schemas, and more:

  • The automated API documentation has been taught to understand and render generic types
  • The client code generation has been extended to generate generic types

Fuzzing

Encore extends Go 1.18's support for fuzzing to include fuzz testing Encore APIs. Use encore test -fuzz=. to start fuzzing! Fuzzing is a great way to improve the security of your APIs by ensuring they can handle arbitrary inputs.

✨ Join the most pioneering developer community

Developers building with Encore are forward thinkers working on interesting and exciting projects.
Join the conversation on Slack to see what's going on, and share what you're working on.

🗓️ What's next

We'll shortly be releasing improvements to the Deployment UX, and in the coming weeks give you more knobs in the Distributed Tracing dashboard, add native support for Object Storage, and much more!

— Remember, you can share your comments and ideas on our Public Roadmap.

We're excited to hear your feedback! ❤️

Keep building,
André (Founder) & the Encore team

encore - Custom domains, Cron in PR environments, Go Upgrade, and more

Published by marcuskohlberg over 2 years ago

🎁 Bring Your Own Domain Names

Custom Domains
You asked for it, and so it's here! We've just released Custom Domains, which lets you serve your Encore powered backend API's from your own domains. No proxy, no certificates, and no hassle!

The best part? No need to update your CLI tools, just head to the Web Platform and try it out yourself!

📚 Check out the docs to learn more.

🔥 PR Environments just got even better

One of the lesser known — but very powerful — features of Encore just got even better!

In case you didn't know: When you've linked your app with GitHub, Encore will automatically provision dedicated Preview Environments for each pull request. (See how in the docs)

PR environments work just like regular development environments, and lets you test your changes before merging.
This week, we made PR environments even better, and added full support for Encore's native Cron Jobs!

💡 Improvements & Bugfixes

  • We've added support for GitHub login to make things even smoother.
  • We upgraded the platform to Go 1.17.8, and are standing ready for the release of 1.18.

— Thanks to @MaxDanielsson, @VilhelmMelkstam, and @gmlewis for giving us feedback!

✨ Join the most pioneering developer community

Developers building with Encore are forward thinkers working on interesting and exciting projects.
Join the conversation on Slack to see what's going on, and share what you're working on.

🗓️ What's next

Over the coming weeks we'll be improving the Deployment UX, give you more knobs in the Distributed Tracing dashboard, add native support for Object Storage, and much more!

— Remember, you can share your comments and ideas on our Public Roadmap.

We're excited to hear your feedback! ❤️

Keep building,
André (Founder) & the Encore team

encore - It's about time — Cron Jobs are here!

Published by eandre over 2 years ago

When building backend applications you often need to run periodic and recurring tasks. For example, to send a welcome email to everyone who signed up recently. Encore provides native support for these types of use cases using Cron Jobs. Here's how easy it is:

import "encore.dev/cron"

// Send a welcome email to everyone who signed up in the last two hours.
var _ = cron.NewJob("welcome-email", cron.JobConfig{
    Title:    "Send welcome emails",
    Every:    2 * cron.Hour,
    Endpoint: SendWelcomeEmail,
})

That's it! When this is deployed, the Encore Platform will call the SendWelcomeEmail endpoint (not pictured) every 2 hours. There is no need to maintain any infrastructure; Encore itself takes care of the scheduling, monitoring and execution. Hooray! ✨

What's more, Encore's web platform has a shiny new Cron Jobs dashboard to help you keep track of all your jobs. Check it out:

Cron Job dashboard

This means you can now schedule recurring tasks without worrying about:

  • How yet another configuration language works –– it's just plain Go.
  • Setting up and maintaining servers or third-party services –– it's all handled by Encore.
  • Keeping track of what jobs are running in each environment – just check the dashboard!

To get started, install the latest Encore release with encore version update and upgrade your application's dependency with go get encore.dev@latest.

Check out the docs 📚 to learn more.

Bugfixes and other improvements

  • Added support for code coverage with encore test -cover (#144)
  • Improved documentation on using external databases
  • Improved documentation on handling database migration errors
  • Improved documentation on how to use GCP (#102)
  • Fixed encore test mistakenly requiring Docker when the app has no database (#98)

Thanks to @ValeriaVG and @wisdommatt for the contributions!

encore - Faster, Reliabler™, Better

Published by eandre over 2 years ago

Happy 2022! (We're a bit late to the party, we know...) We’ve been heads down improving our platform and are super excited to finally announce these product updates. 🎉

  • If you'd like to give Encore a go for the first time, check out our quick start.
  • If you already have Encore installed, you can update with encore version update.

We’ve just shipped some huge platform improvements to make your applications faster, and ensure our service is more reliable as you’re developing.

Encore now offers full support for Google Cloud Run, adding an even easier and cheaper way to deploy to your own cloud account. Perfect for getting your next idea up and running quickly.

We’ve also integrated with Cloudflare, giving you the full power of their edge network, for even lower latency and higher performance. This works transparently across all the cloud providers we support, including Encore Cloud.

Infrastructure

🔑 Auth Keys

Sometimes it’s practical to use the Encore CLI in an automated fashion, for instance to automatically run tests in a CI/CD pipeline beyond what Encore already provides. That was trickier than it should have been, since the CLI required interactive login. But no longer!

We now support pre-authenticated keys that grant a machine user access to a single Encore application, perfect for your CI environments and other automated tools.
Read more about auth keys in the docs.

Auth Keys

🚪 Password-based & Social Login

Logging in with one-time codes over email can be annoying because you can’t use your password manager. We hear you! That’s why we’re happy to announce we’ve now rolled out password-based login and social login.
— Next time you log in you’ll need to set a password using “Reset password” on the login screen, using the same email address as before.

🗓️ What’s next

Over the next fews weeks we’ll be adding lots more powerful features to help you build your next great product faster. Soon we’re adding native support for Cron Jobs, Custom API Domains, Object Storage (S3), Pub/Sub, and more.
— Remember, you can share your comments and ideas on our Public Roadmap.

That’s it for this time!
As always, if you have questions or feedback, join us on Slack. We’re excited to hear your feedback.

encore - v0.17.2: REST APIs, ORM Support, and more!

Published by eandre about 3 years ago

We're excited to announce Encore v0.17, our most feature-packed and best release yet!

If you'd like to give Encore a go for the first time, check out our quick start.
If you already have Encore installed, you can update with encore version update.

The simplest way to build a REST API

We've heard you: the Encore developer experience is great, but building REST APIs was too cumbersome. No more! You can now define REST APIs with incredible speed and productivity, through the power of Encore's static analysis and code generation engine. Just take a look:

// The List endpoint returns a list of blog articles.
// It can be called simply as:
//
//     GET /blog?limit=30&offset=0
//
//encore:api public method=GET path=/blog
func List(ctx context.Context, p *ListParams) (*ListResponse, error) {
	// Fetch results...
}

// ListParams are the query parameters for the List endpoint.
type ListParams struct {
	Limit int
	Offset int
}

// ListResponse is the response schema for the List endpoint.
type ListResponse struct {
	Posts []*Post
}

If it looks just like regular, plain Go code, you'd be exactly right! Since it's a GET endpoint, Encore automatically parses the ListParams fields and parses them from the query string in the HTTP request.

This approach lets you think and develop your API in terms of functions and data structures, instead of worrying about low-level HTTP request parsing. The end result is a remarkably simple programming paradigm that dramatically increases productivity.

We call it the Encore Application Model — a combination of static analysis and code generation — and it's all about understanding what you're trying to do and helps you achieve it faster and easier than ever before. By taking all the boilerplate out of backend development we're left with a much more enjoyable developer experience as well.

ORM Support and Query Helpers

Encore's SQL Database support now works seamlessly with the large Go ecosystem of ORMs and query helpers! This means if you want to use tools like:

... and so on, you can! In your Encore service, use the new sqldb.Named function to get a database object, and then use its Stdlib method to get a *sql.DB object that you can integrate with any of these packages as you see fit.

package foo

// db is a *sql.DB that is automatically connected
// to the database belonging to the "foo" service.
//
// Like always with Encore, you don't need to worry
// about provisioning, database passwords, or having
// to set up schema migrations. It's all taken care of.
var db = sqldb.Named("foo").Stdlib()

Testing auth endpoints

If you're building an application with Encore's built-in authentication support, you're in luck! Testing endpoints that required authentication is now much easier than before, with the introduction of auth.WithContext:

import "encore.dev/beta/auth"

func TestAuthEndpoint(t *testing.T) {
	ctx = auth.WithContext(context.Background(), "some-user-id", &AuthData{})
	err := MyAuthEndpoint(ctx)
	// ...
}

//encore:api auth
func MyAuthEndpoint(ctx context.Context) error {
	// ....
}

This functionality is actually not limited to testing, and can be used anywhere, including in your business logic for cases where you need to make an API call on behalf of an authenticated user.

Bugfixes and other improvements

We also made lots of smaller improvements and bugfixes:

  • Added --port and --listen options to encore run to change listen port/address (#94)
  • Overhauled code generation for increased performance and maintainability
  • Fixed database request tracking in tests (#89)
  • Fixed a bug where the Dev Dashboard sometimes didn't show the latest result (#53)
  • Fixed return type mismatch between Encore runtime and client library (#55)
  • Fixed using unicode in API Explorer (#97)

We're looking forward to seeing what you build! Join us in Slack to participate in the growing community of Encore developers, and stay tuned for more updates soon!