> For the complete documentation index, see [llms.txt](https://manual.picketstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.picketstudio.com/technology/tech.md).

# 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
