Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get started group #452

Merged
merged 3 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions src/shared/redirect-map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const currentRoot = '/docs/en/guides/get-started/quickstart'
const currentRoot = '/docs/en/get-started/quickstart'

// these are soft redirects, not forever/canonical
const tempRedirects = {
Expand Down Expand Up @@ -46,16 +46,16 @@ const permanentRedirects = {

// Intro
// round 1: Q1 2021
'/intro/philosophy': '/docs/en/guides/get-started/why-architect',
'/intro/limits': '/docs/en/guides/get-started/detailed-aws-setup',
'/intro/philosophy': '/docs/en/get-started/why-architect',
'/intro/limits': '/docs/en/get-started/detailed-aws-setup',
'/intro/community': '/docs/en/about/contribute',

// Quickstart
// round 1: Q1 2021
'/quickstart': '/docs/en/guides/get-started/quickstart',
'/quickstart/install': '/docs/en/guides/get-started/quickstart',
'/quickstart/layout': '/docs/en/guides/get-started/project-layout',
'/quickstart/what-next': '/docs/en/guides/get-started/quickstart',
'/quickstart': '/docs/en/get-started/quickstart',
'/quickstart/install': '/docs/en/get-started/quickstart',
'/quickstart/layout': '/docs/en/get-started/project-manifest',
'/quickstart/what-next': '/docs/en/get-started/quickstart',

// Primitives
// round 1: Q1 2021
Expand All @@ -73,10 +73,15 @@ const permanentRedirects = {
// round 1: Q1 2021
'/guides/upgrade': '/docs/en/about/upgrade-guide',
'/guides/testing': '/docs/en/guides/developer-experience/local-development',
'/guides/project-manifest': '/docs/en/guides/get-started/project-layout',
'/guides/project-manifest': '/docs/en/get-started/project-manifest',
'/guides/share-code': '/docs/en/guides/developer-experience/sharing-code',
'/guides/sharing-common-code': '/docs/en/guides/developer-experience/sharing-code',
'/guides/custom-file-paths': '/docs/en/guides/developer-experience/custom-source-paths',
// round 2: Q4 2021
'/docs/en/guides/get-started/why-architect': '/docs/en/get-started/why-architect',
'/docs/en/guides/get-started/quickstart': '/docs/en/get-started/quickstart',
'/docs/en/guides/get-started/project-layout': '/docs/en/get-started/project-manifest',
'/docs/en/guides/get-started/detailed-aws-setup': '/docs/en/get-started/detailed-aws-setup',

// Reference > Project Manifest
// round 1: Q1 2021
Expand Down Expand Up @@ -182,9 +187,9 @@ const permanentRedirects = {
'/guides/custom-dns': '/docs/en/guides/domains/overview',
'/guides/ws': '/docs/en/reference/runtime-helpers/node.js#arc.ws',
'/guides/documentdb': currentRoot,
'/guides/multiple-aws-accounts': '/docs/en/guides/get-started/detailed-aws-setup',
'/guides/iam': '/docs/en/guides/get-started/detailed-aws-setup',
'/guides/yaml-and-json': '/docs/en/guides/get-started/project-layout',
'/guides/multiple-aws-accounts': '/docs/en/get-started/detailed-aws-setup',
'/guides/iam': '/docs/en/get-started/detailed-aws-setup',
'/guides/yaml-and-json': '/docs/en/get-started/project-manifest',
'/guides/deps': '/docs/en/guides/developer-experience/dependency-management',
'/reference/arc-audit': currentRoot,
'/reference/arc-config': currentRoot,
Expand Down
5 changes: 0 additions & 5 deletions src/views/docs/en/:get-started/project-files-folders.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/views/docs/en/:get-started/project-manifest.md

This file was deleted.

62 changes: 0 additions & 62 deletions src/views/docs/en/:get-started/quickstart.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ Architect supports the following runtime versions:
- **Node.js**: `14.x` (default) using `npm`
- **Ruby**: `2.7` using `bundle`
- **Python**: `3.9`, `3.8`, `3.7`, and `3.6` using `pip3`
- **Deno**: `1.6.x` ([under development](../../reference/runtime-helpers/deno))
- **Deno**: `1.6.x` ([under development](../reference/runtime-helpers/deno))

> ⚠️ Working locally with the Architect `sandbox` requires target runtimes to be available in your `$PATH`.

Additionally, standard AWS managed runtimes are supported in live infra, but not while working locally with [Sandbox](../../reference/cli/sandbox) (at present):
Additionally, standard AWS managed runtimes are supported in live infra, but not while working locally with [Sandbox](../reference/cli/sandbox) (at present):

- **Go**: `1.x`
- **.NET**: `3.1`
- **Java**: `11`, and `8`

Architect also supports _any custom runtime_ in live infra using either [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) or [Lambda container images](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html).

Change a project's default runtime by specifying [an explicit environment](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) or an alias in `app.arc` with [the `@aws` pragma](../../reference/project-manifest/aws).
Change a project's default runtime by specifying [an explicit environment](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) or an alias in `app.arc` with [the `@aws` pragma](../reference/project-manifest/aws).

#### Example

Expand All @@ -45,7 +45,7 @@ Change a project's default runtime by specifying [an explicit environment](https
runtime python3.8
```

> ℹ️ This setting can be overridden on a function-by-function basis with [`config.arc`](../../reference/configuration/function-config).
> ℹ️ This setting can be overridden on a function-by-function basis with [`config.arc`](../reference/configuration/function-config).

---

Expand Down
18 changes: 18 additions & 0 deletions src/views/docs/en/get-started/project-files-and-folders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Project files & folders
category: Get started
description: Architect project structure
sections:
- "Overview"
- "Creating new resources & files"
- "Special files & folders"
- "Custom paths"
---

## Overview

## Creating new resources & files

## Special files & folders

## Custom paths
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Project layout
title: Project manifest format
category: Get started
description: The layout and default structure of an Architect project
---
Expand Down Expand Up @@ -61,29 +61,29 @@ The `app.arc` format follows a few simple rules:

These sections are for global system level env configuration. The most important being the `@app` namespace which is used to prefix all generated resources.

- [`@app`](../../reference/project-manifest/app) **[Required]** application namespace
- [`@aws`](../../reference/project-manifest/aws) AWS specific configuration
- [`@views`](../../reference/project-manifest/views) configure path to view source code
- [`@shared`](../../reference/project-manifest/shared) configure path to shared source code
- [`@macros`](../../reference/project-manifest/macros) modify generated CloudFormation
- [`@app`](../reference/project-manifest/app) **[Required]** application namespace
- [`@aws`](../reference/project-manifest/aws) AWS specific configuration
- [`@views`](../reference/project-manifest/views) configure path to view source code
- [`@shared`](../reference/project-manifest/shared) configure path to shared source code
- [`@macros`](../reference/project-manifest/macros) modify generated CloudFormation

### Lambda resource definition

These sections deal with Lambda functions and their event sources. Architect conventionally promotes one event source per function. Single responsibility functions are faster to deploy, easier to debug and secure to least privilege.

- [`@http`](../../reference/project-manifest/http) HTTP routes (API Gateway)
- [`@events`](../../reference/project-manifest/events) Event pub/sub (SNS)
- [`@queues`](../../reference/project-manifest/queues) queues and handlers for them (SQS)
- [`@scheduled`](../../reference/project-manifest/scheduled) Invoke functions specified times (CloudWatch Events)
- [`@ws`](../../reference/project-manifest/ws) Web Socket functions (API Gateway)
- [`@http`](../reference/project-manifest/http) HTTP routes (API Gateway)
- [`@events`](../reference/project-manifest/events) Event pub/sub (SNS)
- [`@queues`](../reference/project-manifest/queues) queues and handlers for them (SQS)
- [`@scheduled`](../reference/project-manifest/scheduled) Invoke functions specified times (CloudWatch Events)
- [`@ws`](../reference/project-manifest/ws) Web Socket functions (API Gateway)

### Persistence resource definition

These pragmas represent persistence resources.

- [`@static`](../../reference/project-manifest/static) Bucket for hosting static assets (S3)
- [`@tables`](../../reference/project-manifest/tables) Database tables and trigger functions (DynamoDB)
- [`@indexes`](../../reference/project-manifest/indexes) Table global secondary indexes (DynamoDB)
- [`@static`](../reference/project-manifest/static) Bucket for hosting static assets (S3)
- [`@tables`](../reference/project-manifest/tables) Database tables and trigger functions (DynamoDB)
- [`@indexes`](../reference/project-manifest/indexes) Table global secondary indexes (DynamoDB)

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ npx arc sandbox
```
> `Cmd / Ctrl + c` exits the sandbox


## Deploy to AWS

Deploy to your built-in `staging` environment:
Expand All @@ -36,4 +35,4 @@ Ship to your built-in `production` environment:
npx arc deploy --production
```

> Be safe! Set the `ARC_APP_SECRET` environment variable in production to secure your HTTP sessions; more information in the [`env` CLI reference](../../reference/cli/env)
> Be safe! Set the `ARC_APP_SECRET` environment variable in production to secure your HTTP sessions; more information in the [`env` CLI reference](../reference/cli/env)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Fast local development creates a tighter feedback loop maximizing developer velo

## Preview

Follow the [quickstart](/docs/en/guides/get-started/quickstart) to get everything wired up. To preview a project running locally in a web browser:
Follow the [quickstart](/docs/en/get-started/quickstart) to get everything wired up. To preview a project running locally in a web browser:

```bash
cd myproject
Expand Down
2 changes: 1 addition & 1 deletion src/views/docs/en/reference/project-manifest/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Define AWS specific configuration for an entire project or [per function](../con

- `region`: [AWS region ID](https://docs.aws.amazon.com/general/latest/gr/rande.html) of the region you'll deploy this project to
- If not specified, defaults to `us-west-2`
- `profile`: name of the profile you prefer to use with this project, as defined in your local [AWS profile](/quickstart)
- `profile`: name of the profile you prefer to use with this project, as defined in your local AWS profile
- Can also be specified in `AWS_PROFILE` environment variable
- Required to deploy to AWS
- `runtime`: Lambda runtime, as defined by the [`lambda-runtimes`](https://github.com/architect/lambda-runtimes/blob/cad3b158968805a01103e47c08da48132620594e/cjs/index.js) lib:
Expand Down
15 changes: 9 additions & 6 deletions src/views/docs/table-of-contents.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
let GetStarted = [
'Why Architect',
'Quickstart',
'Project manifest',
// 'Project files & folders',
'Detailed AWS setup',
]

let Guides = [
{
'Get started': [
'Why Architect?',
'Quickstart',
'Project layout',
'Detailed AWS setup',
],
'Developer experience': [
'Local development',
'Dependency management',
Expand Down Expand Up @@ -85,6 +87,7 @@ let About = [
]

module.exports = {
'Get Started': GetStarted,
Guides,
Reference,
About,
Expand Down
2 changes: 1 addition & 1 deletion test/backend/redirect-map-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test('redirect map middleware', async t => {
const expectedTempResponse = {
statusCode: 302,
headers: {
location: '/docs/en/guides/get-started/quickstart',
location: '/docs/en/get-started/quickstart',
},
}
t.deepEqual(tempRedirectResponse, expectedTempResponse, 'Correctly redirect temporary mapped path')
Expand Down
2 changes: 1 addition & 1 deletion test/backend/sandbox-http-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('sandbox HTTP request', async t => {
await sandbox.start({ quiet: true })
t.pass(`sandbox started on ${host}`)

let quickstart = await tiny.get({ url: `${host}/docs/en/guides/get-started/quickstart` })
let quickstart = await tiny.get({ url: `${host}/docs/en/get-started/quickstart` })
t.ok(quickstart.body, 'got quickstart document')

let playground = await tiny.get({ url: `${host}/playground` })
Expand Down