Skip to content

Commit

Permalink
docs: add pubsub outbox, sync docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eandre committed May 2, 2023
1 parent 9e1d0f5 commit 39a992d
Show file tree
Hide file tree
Showing 48 changed files with 602 additions and 443 deletions.
6 changes: 3 additions & 3 deletions docs/community/contribute.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
seotitle: How to contribute to Encore Open Source Project
seodesc: Learn how to contribute to Encore's Open Source project by submitting pull requests, reporting bugs, or contributing documentation or example projects.
seodesc: Learn how to contribute to the Encore Open Source project by submitting pull requests, reporting bugs, or contributing documentation or example projects.
title: Ways to contribute
subtitle: Guidelines for contributing to Encore
---

We’re so excited that you are interested in contributing to Encore! All contributions are welcome, and there are several valuable ways to contribute.

### Open Source Framework
### Open Source Project

If you want to contribute to the Encore framework Open Source project, you can submit a pull request on [GitHub](https://github.com/encoredev/encore/pulls).
If you want to contribute to the Encore Open Source project, you can submit a pull request on [GitHub](https://github.com/encoredev/encore/pulls).

### Report issues

Expand Down
8 changes: 4 additions & 4 deletions docs/community/open-source.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
seotitle: Encore is Open Source
seodesc: We believe Open Source is key to a sustainable and prosperous technology community. The Encore framework builds on Open Source software, and is itself Open Source.
seodesc: We believe Open Source is key to a sustainable and prosperous technology community. Encore builds on Open Source software, and is itself Open Source.
title: Open Source
subtitle: Encore is Open Source Software
---

We believe Open Source is key to a long-term sustainable and prosperous technology community. The Encore framework builds on Open Source software, and is itself Open Source. This means the Encore framework is free to use and open to contributions.
We believe Open Source is key to a long-term sustainable and prosperous technology community. Encore builds on Open Source software, and is largely Open Source itself.

## License

The Encore framework is Open Source under Mozilla Public License 2.0.
The Encore infrastructure SDK, parser, and compiler are Open Source under Mozilla Public License 2.0.

> The MPL is a simple copyleft license. The MPL's "file-level" copyleft is designed to encourage contributors to share modifications they make to your code, while still allowing them to combine your code with code under other licenses (open or proprietary) with minimal restrictions.
You can learn more about MPL 2.0 on [the official website](https://www.mozilla.org/en-US/MPL/2.0/FAQ/).

## Contribute

Contributions to improve the Encore framework are very welcome. Contribute to Encore on [GitHub](https://github.com/encoredev/encore).
Contributions to improve Encore are very welcome. Contribute to Encore on [GitHub](https://github.com/encoredev/encore).
2 changes: 1 addition & 1 deletion docs/deploy/custom-domains.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ On the Custom Domains settings page, you can see the various statuses throughout

| Status | Description |
| - | - |
| `Pending` | The domain is currently queued to be provisioned by the Encore platform. |
| `Pending` | The domain is currently queued to be provisioned by Encore. |
|`Waiting for CNAME` | Encore is waiting for the CNAME to become active and for the SSL certificate to be issued for the domain. |
| `Configuring Edge Routers` | The SSL certificate has been issued and the Encore edge routers are being configured to route traffic on the domain. |
| `Active` | The domain is serving traffic to your Encore application. |
Expand Down
4 changes: 2 additions & 2 deletions docs/deploy/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Environments always stay in sync, as they are created based on the needs of your

## Creating environments

To create an environment for your app, open your app in the [Encore web platform](https://app.encore.dev) and go to the **Environments** page,
To create an environment for your app, open your app in the [Cloud Dashboard](https://app.encore.dev) and go to the **Environments** page,
then click on `Create env` in the top right.

There you can pick a name, and decide if you want a production
Expand Down Expand Up @@ -54,7 +54,7 @@ When you [connect your application to GitHub](/docs/how-to/github), Encore will

Preview Environments are named after the pull request, for example PR #72 creates a preview environment named `pr:72` with the API base url `https://pr72-$APP_ID.encr.app`.

You can also view the environment in the web platform, where the url will be `https://app.encore.dev/$APP_ID/envs/pr:72`.
You can also view the environment in the Cloud Dashboard, where the url will be `https://app.encore.dev/$APP_ID/envs/pr:72`.

See the [infra docs](/docs/deploy/infra#preview-environments) if you're curious about exactly how Preview Environments are provisioned.

Expand Down
32 changes: 17 additions & 15 deletions docs/deploy/infra.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ title: Infrastructure provisioning
subtitle: How Encore provisions infrastructure for your application
---

Encore automatically provisions all necessary infrastructure, in all environments and across all major cloud providers, without requiring any application code changes. All you need to do is [connect your cloud account](./own-cloud) and create an environment.
Encore automatically provisions all necessary infrastructure, in all environments and across all major cloud providers, without requiring application code changes. You simply [connect your cloud account](./own-cloud) and create an environment.

<img src="/assets/docs/infraoverview.png" title="Infrastructure Overview" className="noshadow"/>
<img src="/assets/docs/encore_overview.png" title="Infrastructure Overview" className="noshadow"/>

This is powered by the Encore framework. It lets you write regular Go code, and use infrastructure primitives (databases, caches, queues, and scheduled jobs) directly in application code through cloud-agnostic APIs.
This is powered by Encore's [Infrastructure SDK](/docs/primitives/overview), which lets you write regular Go code and declare infrastructure resources (databases, caches, queues, and scheduled jobs) in application code.

This completely removes the need for infrastructure configuration files, and avoids creating cloud-specific dependencies in your application.
At compile time, Encore creates an [Application Model](/docs/introduction#meet-the-encore-application-model) with a definition of the infrastructure your application requires. Encore then uses this model to provision the infrastructure in both your cloud account, and development and preview environments in Encore Cloud.

At compile time, Encore creates an [Application Model](/docs/introduction#meet-the-encore-application-model) containing a precise definition of the infrastructure your application requires. The Encore Platform uses this model to provision necessary infrastructure in your own cloud account, and development and preview environments in Encore Cloud.
The approach removes the need for infrastructure configuration files and avoids creating cloud-specific dependencies in your application.

This end-to-end integration between application code and infrastructure enables Encore to always keep your environments in sync.
Having an end-to-end integration between application code and infrastructure also enables Encore to keep environments in sync and track cloud infrastructure, giving you an up-to-date view of your infrastructure to avoid unnecessary cloud costs.

<img src="/assets/docs/infratracking.png" title="Infrastructure Tracking"/>

## Environment types

Encore provisions every type of environment, and ensures they stay in sync.
By default, Encore provisions infrastructure using contextually appropriate objectives for each environment type. You retain control and configurability of infrastructure in your cloud account, and can access settings via your cloud provider as if you set up the infrastructure manually.

| | Local | Encore Cloud | GCP / AWS / Azure |
| - | - | - | - | - | - |
Expand Down Expand Up @@ -78,11 +80,11 @@ Encore provisions production infrastructure resources using best-practice guidel

| | GCP | AWS | Azure |
| - | - | - | - |
| **Networking:** | [VPC][gcp-vpc] | [VPC][aws-vpc] | [VPC][azure-vpc] |
| **Compute:** | [Cloud Run][gcp-cloudrun] | [Fargate ECS][aws-fargate] | [App Service][azure-app-service] & [App Service Plan][azure-app-service-plan] |
| **SQL Databases:** | [GCP Cloud SQL][gcp-cloudsql] | [Amazon RDS][aws-rds] | [Azure Database][azure-sqldb] |
| **Pub/Sub:** | [GCP Pub/Sub][gcp-pubsub] | [Amazon SQS][aws-sqs] & [Amazon SNS][aws-sns] | [Azure Service Bus][azure-service-bus] |
| **Caches:** | [GCP Memorystore (Redis)][gcp-redis] | [Amazon ElastiCache (Redis)][aws-redis] | [Azure Cache (Redis)][azure-redis] |
| **Networking:** | [VPC](#google-cloud-platform-gcp) | [VPC](#amazon-web-services-aws) | [VPC](#microsoft-azure) |
| **Compute:** | [Cloud Run](#google-cloud-platform-gcp) | [Fargate ECS](#amazon-web-services-aws) | [App Service](#microsoft-azure) & [App Service Plan](#microsoft-azure) |
| **SQL Databases:** | [GCP Cloud SQL](#sql-databases) | [Amazon RDS](#sql-databases-1) | [Azure Database](#sql-databases-2) |
| **Pub/Sub:** | [GCP Pub/Sub](#pubsub) | [Amazon SQS][aws-sqs] & [Amazon SNS](#pubsub-1) | [Azure Service Bus](pubsub-2) |
| **Caches:** | [GCP Memorystore (Redis)](#caching) | [Amazon ElastiCache (Redis)](#caching-1) | [Azure Cache (Redis)](#caching-2) |
| **Cron Jobs:** | [Encore Managed][encore-cron] | [Encore Managed][encore-cron] | [Encore Managed][encore-cron] |
| **Secrets:** | [Secret Manager][gcp-secrets] | [AWS Secrets Manager][aws-secrets] | [App Service App][azure-app-service-secrets] |

Expand Down Expand Up @@ -131,7 +133,7 @@ Additionally, Encore sets up:
* A 10% memory buffer to better memory fragmentation, and active defragmentation

#### Cron Jobs
When using [Cron Jobs][encore-cron], Encore's Cloud Platform triggers the execution
When using [Cron Jobs][encore-cron], Encore Cloud triggers the execution
of cron jobs by calling the corresponding API using a signed request so the application can verify
the source of the request as coming from Encore's cron functionality. No infrastructure is
provisioned for this to work.
Expand Down Expand Up @@ -181,7 +183,7 @@ Additionally, Encore sets up:
* A 10% memory buffer to better memory fragmentation, and active defragmentation

#### Cron Jobs
When using [Cron Jobs][encore-cron], Encore's Cloud Platform triggers the execution
When using [Cron Jobs][encore-cron], Encore Cloud triggers the execution
of cron jobs by calling the corresponding API using a signed request so the application can verify
the source of the request as coming from Encore's cron functionality. No infrastructure is
provisioned for this to work.
Expand Down Expand Up @@ -231,7 +233,7 @@ Additionally, Encore sets up:
* An [Azure Private Link][azure-private-link] connection for secure connectivity from the VPC

#### Cron Jobs
When using [Cron Jobs][encore-cron], Encore's Cloud Platform triggers the execution
When using [Cron Jobs][encore-cron], Encore Cloud triggers the execution
of cron jobs by calling the corresponding API using a signed request so the application can verify
the source of the request as coming from Encore's cron functionality. No infrastructure is
provisioned for this to work.
Expand Down
11 changes: 5 additions & 6 deletions docs/deploy/own-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ within Encore, you need to manually remove the infrastructure that was created b

Encore provides a GCP Service Account for each Encore application, letting you grant Encore access to provision all the necessary infrastructure directly in your own GCP Organization account.

To find your app's Service Account email and configure GCP deployments, head over to the Cloud Deploy page by going to
**[the Encore web platform](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Cloud Deploy**.
To find your app's Service Account email and configure GCP deployments, head over to the Connect Cloud page by going to Encore's **[Cloud Dashboard](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Connect Cloud**.

![Connect GCP account](/assets/docs/connectgcp.png "Connect GCP account")


## Amazon Web Services (AWS)
To configure your Encore app to deploy to your AWS account, head over to the Cloud Deploy page by going to
**[the Encore web platform](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Cloud Deploy**.
To configure your Encore app to deploy to your AWS account, head over to the Connect Cloud page by going to Encore's
**[Cloud Dashboard](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Connect Cloud**.

Follow the instructions to create an IAM Role, and then connect the role with Encore.
[Learn more in the AWS docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html).
Expand All @@ -51,8 +50,8 @@ After connecting your app to AWS, you will be asked to choose which region you w

## Microsoft Azure

To configure for Azure deployments, head over to the Cloud Deploy page by going to
**[the Encore web platform](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Cloud Deploy**.
To configure for Azure deployments, head over to the Connect Cloud page by going to Encore's
**[Cloud Dashboard](https://app.encore.dev/) > (Select your app) > App Settings > Integrations > Connect Cloud**.

Start by filling in your Azure Tenant ID, then click on **Connect app to Azure**.
This will redirect you to Microsoft's Azure portal requesting that you grant permission for
Expand Down
3 changes: 1 addition & 2 deletions docs/deploy/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ subtitle: Keeping your application secure by default

Encore's security practices are informed by our team's decades-long experience working with payments, and other sensitive systems, at Spotify, Google, and Monzo.

This expertise has also been used when designing the Encore framework, ensuring that building secure applications
is more convenient than building insecure ones.
This expertise has also been used when designing the Encore infrastructure SDK, ensuring that building secure applications is more convenient than building insecure ones.

For example, Encore's [secrets management](/docs/primitives/secrets) gives you
an incredibly simple way of using secret keys, while at the same time providing
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/api-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ But the effort of maintaining inevitably leads to them becoming stale and out of
Encore provides the best of both worlds &mdash; great API docs that never become out of date &mdash;
by leveraging the [Encore Application Model](/docs/introduction#meet-the-encore-application-model) to determine the structure of every API.

The API docs are available to your whole team via [the Encore platform](https://app.encore.dev).
The API docs are available to your whole team via the [Cloud Dashboard](https://app.encore.dev).

<video autoPlay playsInline loop controls muted className="w-full h-full">
<source src="/assets/docs/apidocs.mp4" className="w-full h-full" type="video/mp4" />
Expand All @@ -21,5 +21,5 @@ The API docs are available to your whole team via [the Encore platform](https://

You can also view API docs when developing locally.
When running your app with `encore run`, simply open up the API URL in your browser (by default `http://localhost:4000`).
You'll see the *local development dashboard* which gives you access to
You'll see the *Local Development Dashboard* which gives you access to
request traces, logs and API docs for local development, right at your fingertips.
4 changes: 2 additions & 2 deletions docs/develop/api-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func GetBlogPost(ctx context.Context, id int, path string) (*BlogPost, error) {
}
```

### Fallback paths
### Fallback routes

Encore supports defining fallback routes that will be called if no other endpoint matches the request,
using the syntax `path=/!fallback`.
Expand Down Expand Up @@ -190,7 +190,7 @@ Note that inputs to [auth handlers](/docs/develop/auth) are automatically marked

<Callout type="info">

The `encore:"sensitive"` tag is ignored for local development environments to make development and debugging with the Development Dashboard easier.
The `encore:"sensitive"` tag is ignored for local development environments to make development and debugging with the Local Development Dashboard easier.

</Callout>

Expand Down
6 changes: 5 additions & 1 deletion docs/develop/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: Adding authentication to APIs to auth users
seodesc: Learn how to add authentication to your APIs and make sure you know who's calling your backend APIs.
title: Authenticating users
subtitle: Knowing what's what and who's who
infobox: {
title: "Authentication",
import: "encore.dev/beta/auth",
}
---
Almost every application needs to know who's calling it, whether the user
represents a person in a consumer-facing app or an organization in a B2B app.
Expand Down Expand Up @@ -108,7 +112,7 @@ You can of course combine auth params like this with custom user data (see the s

Cookies are generally only used by browsers and are automatically added to requests made by browsers.
As a result Encore does not include cookie fields in generated clients' authentication payloads
or in the [local development dashboard](/docs/observability/dev-dash).
or in the [Local Development Dashboard](/docs/observability/dev-dash).

</Callout>

Expand Down
4 changes: 4 additions & 0 deletions docs/develop/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: Configuration for environment specific changes
seodesc: See how you can use configuration to define different behavior in each environment. Making it simpler to develop and test your backend application.
title: Configuration
subtitle: Define behavior in specific environments
infobox: {
title: "Configuration",
import: "encore.dev/config",
}
---

Configuration files let you define default behavior for your application, and override it for specific environments. This allows you to make changes without affecting deployments in other environments.
Expand Down
4 changes: 4 additions & 0 deletions docs/develop/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: API Errors – Types, Wrappers, and Codes
seodesc: See how to return structured error information from your APIs using Encore's errs package, and how to build precise error messages for complex business logic.
title: API Errors
subtitle: Returning structured error information from your APIs
infobox: {
title: "API Errors",
import: "encore.dev/beta/errs",
}
---

Encore supports returning structured error information from your APIs using the [encore.dev/beta/errs](https://pkg.go.dev/encore.dev/beta/errs) package.
Expand Down
4 changes: 4 additions & 0 deletions docs/develop/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: Metadata API – Get data about apps, envs, and requests
seodesc: See how to use Encore's Metadata API to get information about specific apps, environments, and requests.
title: Metadata
subtitle: Use the metadata API to get specifics about apps, environments, and requests
infobox: {
title: "Metadata API",
import: "encore.dev",
}
---

While Encore tries to provide a cloud-agnostic environment, sometimes it's helpful to know more about the environment
Expand Down
4 changes: 4 additions & 0 deletions docs/develop/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: Using Middleware in your backend application
seodesc: See how you can use middleware in your backend application to handle cross-cutting generic functionality, like request logging, auth, or tracing.
title: Middleware
subtitle: Handling cross-cutting, generic functionality
infobox: {
title: "Middleawre",
import: "encore.dev/middleware",
}
---

Middleware is a way to write reusable code that runs before or after (or both)
Expand Down
4 changes: 4 additions & 0 deletions docs/develop/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ seotitle: Automated testing for your backend application
seodesc: Learn how create automated tests for your microservices backend application, and run them automatically on deploy using Go and Encore.
title: Automated testing
subtitle: Confidence at speed
infobox: {
title: "Testing",
import: "encore.dev/et",
}
---

Go comes with excellent built-in support for automated tests.
Expand Down
Loading

0 comments on commit 39a992d

Please sign in to comment.