Skip to content

Commit 32fa5a5

Browse files
Improve readmes (#171)
1 parent 09d60b7 commit 32fa5a5

File tree

14 files changed

+567
-198
lines changed

14 files changed

+567
-198
lines changed

README.md

Lines changed: 38 additions & 46 deletions
Large diffs are not rendered by default.

booking-system/README.md

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,71 @@ When a new appointment is booked, the backend sends a confirmation email to the
66

77
It has a React frontend with both a user facing part and an admin dashboard. Authentication is required for accessing admin dashboard.
88

9-
## Developing locally
9+
## Prerequisites
1010

11-
When you have [installed Encore](https://encore.dev/docs/install), you can create a new Encore application and clone this example with this command.
11+
**Install Encore:**
12+
- **macOS:** `brew install encoredev/tap/encore`
13+
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
14+
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`
15+
16+
**Docker:**
17+
1. [Install Docker](https://docker.com)
18+
2. Start Docker
19+
20+
## Create app
21+
22+
Create a local app from this template:
1223

1324
```bash
1425
encore app create my-app-name --example=booking-system
1526
```
1627

17-
## Running locally
28+
## Run app locally
29+
30+
Before running your application, make sure you have Docker installed and running. Then run this command from your application's root folder:
1831

19-
Run your application:
2032
```bash
2133
encore run
2234
```
2335

36+
## View the frontend
37+
38+
While `encore run` is running, head over to [http://localhost:4000/frontend/](http://localhost:4000/frontend/) to view the frontend for your booking system monitor.
39+
40+
2441
## Local Development Dashboard
2542

2643
While `encore run` is running, open [http://localhost:9400/](http://localhost:9400/) to access Encore's [local developer dashboard](https://encore.dev/docs/observability/dev-dash).
2744

28-
Here you can see API docs, make requests in the API explorer, and view traces of the responses.
45+
Here you can see traces for all the request that were generated when you used your app from the frontend, view your architecture diagram, and see API docs in the Service Catalog.
2946

30-
## View the frontend
31-
32-
While `encore run` is running, head over to [http://localhost:4000/frontend/](http://localhost:4000/frontend/) to view the frontend for your booking system monitor.
3347

3448
## Deployment
3549

36-
Deploy your application to a staging environment in Encore's free development cloud:
50+
### Self-hosting
51+
52+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
53+
54+
### Encore Cloud Platform
55+
56+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
3757

3858
```bash
3959
git add -A .
4060
git commit -m 'Commit message'
4161
git push encore
4262
```
4363

44-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
64+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
65+
66+
## Link to GitHub
67+
68+
Follow these steps to link your app to GitHub:
4569

46-
From there you can also connect your own AWS or GCP account to use for deployment.
70+
1. Create a GitHub repo, commit and push the app.
71+
2. Open your app in the [Cloud Dashboard](https://app.encore.dev).
72+
3. Go to **Settings ➔ GitHub** and click on **Link app to GitHub** to link your app to GitHub and select the repo you just created.
73+
4. To configure Encore to automatically trigger deploys when you push to a specific branch name, go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the **Branch name** and hit **Save**.
74+
5. Commit and push a change to GitHub to trigger a deploy.
4775

48-
Now off you go into the clouds!
76+
[Learn more in the docs](https://encore.dev/docs/how-to/github)

graphql/README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,28 @@
22

33
This starter shows how you can build a GraphQL server with Encore, implementing a basic url shortener as an example.
44

5-
## Developing locally
5+
## Prerequisites
66

7-
When you have [installed Encore](https://encore.dev/docs/install), you can create a new Encore application and clone this example with this command.
7+
**Install Encore:**
8+
- **macOS:** `brew install encoredev/tap/encore`
9+
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
10+
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`
11+
12+
**Docker:**
13+
1. Install [Docker](https://docker.com)
14+
2. Start Docker
15+
16+
## Create app
17+
18+
Create a local app from this template:
819

920
```bash
1021
encore app create my-app-name --example=graphql
1122
```
1223

13-
## Running locally
24+
## Run app locally
1425

15-
Before running your application, make sure you have Docker installed and running. It's required to locally run Encore applications with databases.
26+
Before running your application, make sure you have Docker installed and running. Then run this command from your application's root folder:
1627

1728
```bash
1829
encore run
@@ -62,19 +73,33 @@ query {
6273

6374
## Deployment
6475

65-
Deploy your application to a staging environment in Encore's free development cloud:
76+
### Self-hosting
77+
78+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
79+
80+
### Encore Cloud Platform
81+
82+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
6683

6784
```bash
6885
git add -A .
6986
git commit -m 'Commit message'
7087
git push encore
7188
```
7289

73-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
90+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
91+
92+
## Link to GitHub
93+
94+
Follow these steps to link your app to GitHub:
7495

75-
From there you can also connect your own AWS or GCP account to use for deployment.
96+
1. Create a GitHub repo, commit and push the app.
97+
2. Open your app in the [Cloud Dashboard](https://app.encore.dev).
98+
3. Go to **Settings ➔ GitHub** and click on **Link app to GitHub** to link your app to GitHub and select the repo you just created.
99+
4. To configure Encore to automatically trigger deploys when you push to a specific branch name, go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the **Branch name** and hit **Save**.
100+
5. Commit and push a change to GitHub to trigger a deploy.
76101

77-
Now off you go into the clouds!
102+
[Learn more in the docs](https://encore.dev/docs/how-to/github)
78103

79104
## Testing
80105

hello-world/README.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22

33
This is a RESTful API Starter with a single Hello World API endpoint.
44

5-
## Developing locally
5+
## Prerequisites
66

7-
When you have [installed Encore](https://encore.dev/docs/install), you can create a new Encore application and clone this example with this command.
7+
**Install Encore:**
8+
- **macOS:** `brew install encoredev/tap/encore`
9+
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
10+
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`
11+
12+
## Create app
13+
14+
Create a local app from this template:
815

916
```bash
1017
encore app create my-app-name --example=hello-world
1118
```
1219

13-
## Running locally
20+
## Run app locally
21+
22+
Run this command from your application's root folder:
23+
1424
```bash
1525
encore run
1626
```
@@ -25,21 +35,37 @@ To see that your app is running, you can ping the API.
2535
curl http://localhost:4000/hello/World
2636
```
2737

38+
When you ping the API, you will see traces and logs appearing in the local development dashboard: <http://localhost:9400/>
39+
2840
## Deployment
2941

30-
Deploy your application to a staging environment in Encore's free development cloud:
42+
### Self-hosting
43+
44+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
45+
46+
### Encore Cloud Platform
47+
48+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
3149

3250
```bash
3351
git add -A .
3452
git commit -m 'Commit message'
3553
git push encore
3654
```
3755

38-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
56+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
57+
58+
## Link to GitHub
59+
60+
Follow these steps to link your app to GitHub:
3961

40-
From there you can also connect your own AWS or GCP account to use for deployment.
62+
1. Create a GitHub repo, commit and push the app.
63+
2. Open your app in the [Cloud Dashboard](https://app.encore.dev).
64+
3. Go to **Settings ➔ GitHub** and click on **Link app to GitHub** to link your app to GitHub and select the repo you just created.
65+
4. To configure Encore to automatically trigger deploys when you push to a specific branch name, go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the **Branch name** and hit **Save**.
66+
5. Commit and push a change to GitHub to trigger a deploy.
4167

42-
Now off you go into the clouds!
68+
[Learn more in the docs](https://encore.dev/docs/how-to/github)
4369

4470
## Testing
4571

nextjs-starter/README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22

33
This is an [Encore](https://encore.dev/) + [Next.js](https://nextjs.org/) project starter. It's a great way to learn how to combine Encore's backend capabilities with a modern web framework — perfect for building a web app.
44

5-
## Developing locally
5+
## Prerequisites
66

7-
When you have [installed Encore](https://encore.dev/docs/install), you can create a new Encore application and clone
8-
this example by running this command:
7+
- **Install Encore:**
8+
- **macOS:** `brew install encoredev/tap/encore`
9+
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
10+
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`
11+
12+
- **Docker:**
13+
- 1. Install [Docker](https://docker.com)
14+
- 2. Start Docker
15+
16+
## Create app
17+
18+
Create a local app from this template:
919

1020
```bash
1121
encore app create my-app --example=nextjs-starter
@@ -45,20 +55,21 @@ npm run gen:local # Locally running Encore backend
4555

4656
## Deployment
4757

48-
### Encore
58+
### Encore: Self-hosting
59+
60+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
4961

50-
Deploy your backend to a staging environment in Encore's free development cloud:
62+
### Encore: Cloud Platform
63+
64+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
5165

5266
```bash
5367
git add -A .
5468
git commit -m 'Commit message'
5569
git push encore
5670
```
5771

58-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
59-
60-
From there you can also see metrics, traces, connect your app to a
61-
GitHub repo to get automatic deploys on new commits, and connect your own AWS or GCP account to use for deployment.
72+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
6273

6374
### Next.js on Vercel
6475

slack-bot/README.md

Lines changed: 78 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,105 @@ This is an Encore starter application for a Slack bot. It brings the greatness o
66

77
If you prefer to built it yourself, check out the [written tutorial](https://encore.dev/docs/tutorials/slack-bot) to learn how to build this application from scratch.
88

9-
## Developing locally
9+
## Prerequisites
1010

11-
When you have [installed Encore](https://encore.dev/docs/install), you can create a new Encore application and clone this example with this command.
11+
**Install Encore:**
12+
- **macOS:** `brew install encoredev/tap/encore`
13+
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
14+
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`
15+
16+
**Slack Workspace:**
17+
- You need to have a Slack Workspace where you are authorized to create Slack apps.
18+
19+
## Create app
20+
21+
Create a local app from this template:
1222

1323
```bash
1424
encore app create my-app-name --example=slack-bot
1525
```
1626

17-
## Running locally
27+
## Setup Slack integration
28+
29+
The first step is to create a new Slack app:
30+
1. Head over to [Slack's API site](https://api.slack.com/apps) and create a new app.
31+
2. When prompted, choose to create the app **from an app manifest**.
32+
3. Choose a workspace to install the app in.
33+
34+
Enter the following manifest (replace `$APP_ID` in the URL below with your Encore app id):
35+
36+
```yaml
37+
_metadata:
38+
major_version: 1
39+
display_information:
40+
name: Encore Bot
41+
description: Cowsay for the cloud age.
42+
features:
43+
slash_commands:
44+
- command: /cowsay
45+
# Replace $APP_ID below
46+
url: https://staging-$APP_ID.encr.app/cowsay
47+
description: Say things with a flair!
48+
usage_hint: your message here
49+
should_escape: false
50+
bot_user:
51+
display_name: encore-bot
52+
always_online: true
53+
oauth_config:
54+
scopes:
55+
bot:
56+
- commands
57+
- chat:write
58+
- chat:write.public
59+
settings:
60+
org_deploy_enabled: false
61+
socket_mode_enabled: false
62+
token_rotation_enabled: false
63+
```
64+
65+
Next, head over to the configuration section for your Slack app (go to [Your Apps](https://api.slack.com/apps) &rarr; select your app &rarr; Basic Information).
1866
19-
Run your application:
67+
Copy the **Signing Secret** and then run the following command and paste the secret to store it using Encore's built-in secrets manager:
2068
```bash
21-
encore run
69+
encore secret set --type local,dev,pr,prod SlackSigningSecret
2270
```
23-
To use the Slack integration, set the Slack signing secret (see tutorial above):
71+
72+
## Run app locally
73+
74+
Run this command from your application's root folder:
75+
2476
```bash
25-
encore secret set SlackSigningSecret
77+
encore run
2678
```
2779

28-
## Open the developer dashboard
29-
30-
While `encore run` is running, open [http://localhost:9400/](http://localhost:9400/) to access Encore's [local developer dashboard](https://encore.dev/docs/observability/dev-dash).
80+
**Note:** This app doesn't do much when running locally, you need to deploy it (see below) for Slack to be able to communicate with the program and for the bot to work.
3181

3282
## Deployment
3383

34-
Deploy your application to a staging environment in Encore's free development cloud:
84+
### Self-hosting
85+
86+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
87+
88+
### Encore Cloud Platform
89+
90+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
3591

3692
```bash
3793
git add -A .
3894
git commit -m 'Commit message'
3995
git push encore
4096
```
4197

42-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
98+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
99+
100+
## Link to GitHub
101+
102+
Follow these steps to link your app to GitHub:
43103

44-
From there you can also connect your own AWS or GCP account to use for deployment.
104+
1. Create a GitHub repo, commit and push the app.
105+
2. Open your app in the [Cloud Dashboard](https://app.encore.dev).
106+
3. Go to **Settings ➔ GitHub** and click on **Link app to GitHub** to link your app to GitHub and select the repo you just created.
107+
4. To configure Encore to automatically trigger deploys when you push to a specific branch name, go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the **Branch name** and hit **Save**.
108+
5. Commit and push a change to GitHub to trigger a deploy.
45109

46-
Now off you go into the clouds!
110+
[Learn more in the docs](https://encore.dev/docs/how-to/github)

0 commit comments

Comments
 (0)