Skip to content
Last updated

Getting Started

1. Install Requried Dependencies

node/npm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash # Install nvm

# Restart your shell

nvm install latest
nvm use latest

docker:

brew install docker

commitizen:

brew install commitizen

pre-commit:

pip install pre-commit

2. Setup Environment Variables

Populate the mandatory environment variables in .env

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_SECRET_NAME=

3. Configure AWS VPN Client

Download and install the AWS VPN Client.

Configuration is available in 1password under aws vpn client config

4. Done

Preview the documentation at localhost:3000/nowatch/swagger

Development and Deployment

Commit Convention

We use conventional commits. A quick summary: Commits are grouped into fix, chore, ci, docs, feat. Commits that break existing functionality append a ! to the group (for example feat!). A description is added after the group separated by a colon. A couple examples:

fix: fixed a simple bug
feat!: added a new feature that breaks existing functionality
ci: updated ci

Formatting

Formatting is handled by Prettier. Install the vsc extension or the cli. It is recommended to turn on the Format On Save vsc setting. Formatting rules are defined in .prettierrc and are currently in sync with the dashboard as well.

Deployment targets

EnvironmentEB environmentURLPurpose
Testingapi-testing-envapi-testing.nowatch.techUsed by backend to test backend deployments, ran on every commit
Devapi-dev-envapi-dev.nowatch.techUsed by app developers to smap app test data
Testapi-test-envapi-test.nowatch.techInternal company testing environment, staging, incorrectly called "test"
Productionapi-prod-envapi.nowatch.comCustomer facing live API

Deployment strategy

We use trunk-based development. New releases should only be done on the main brahc. This is the process of creating a new release:

  1. Create a release tag using make release (for example it creates 5.7.3)
  2. Push the tag (git push origin 5.7.3)

This flow runs a github action that deploys it to testing and uploads the app version. To promote it to different environments (after the github action has finished):

eb deploy api-dev-env --version 5.7.3
eb deploy api-test-env --version 5.7.3
eb deploy api-prod-env --version 5.7.3