# Setup

This guide is primarily focused on building web-based applications deployed on the [Heroku platform](https://www.heroku.com).

## Before any code has been committed

### Branch protection rules

No code should be contributed unless it has been reviewed by at least one other person. If there are any robots, they should also gives their thumbs up.

Standard rules to enforce:

* [ ] apply to `master`
* [ ] Require pull request reviews before merging
* [ ] Dismiss stale pull request approvals when new commits are pushed
* [ ] Require status checks to pass before merging
* [ ] Require branches to be up to date before merging

### Defined roles

This should have been done as part of the project init. There should be, as a minimum:

* [ ] Developer
* [ ] Lead dev
* [ ] QA
* [ ] PM

### Continuous integration

When code is committed to a shared version control repository, the tests are run on a service, "integrated" with code from other developers. This helps ensure there's nothing specific to the developer's machine making the tests pass.

* [ ] Setup CircleCI using config from existing app

### Netlify integration

If you're building a static app use Netlify.

* [ ] Setup under dev \[at] picketstudio \[dot] com account
* [ ] Add a `netlify.toml` in the root of your project
* [ ] Add any necessary [redirects](https://www.netlify.com/docs/redirects/), [environment variables](https://www.netlify.com/docs/netlify-toml-reference/), et al.
* [ ] Make sure [deploy-previews](https://www.netlify.com/docs/continuous-deployment/) are enabled

NB:

Deploy previews can be accessed at **deploy-preview-{PR#}--{project-name}.netlify.com**.

For example: `https://deploy-preview-14--mmp-admin.netlify.com`

### Heroku integration

Establishing the connection between Heroku and GitHub allows for a number of powerful workflow properties such as Heroku Pipelines and Review Apps.

**Review Apps**

* [ ] Make sure a `app.json` has been created
* [ ] Add add-ons such as `heroku-redis`, `heroku-postgresql`, `papertrail`, `newrelic`
* [ ] Add `buildpack` such as `heroku/node`
* [ ] Ensure there is an `env` field with the relevant environment variables added


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.picketstudio.com/technology/tech.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
