šŸ  Local Installation

These instructions will help you get a copy of the project up and running for development and testing.

This project runs on an Express backend and React frontend with TypeScript. You will needĀ npmĀ andĀ yarnĀ installed to start.

Once setup, look at the Development Lifecycle to contribute.

🤫 Environment Variables

Both the frontend and backend make use of environment variables that will need to be present out before building.

In both the client and api directories, there is an example .example.env which should be filled out and renamed to .env

api/.example.env

# Server settings
NODE_ENV=development
SERVER_PORT=5000

# Authentication settings
EMAIL_KEY=https://example.com/email
AUTH0_AUDIENCE=
AUTH0_ISSUER=
JWKS_URI=

# SSL settings
SSL_CRT_FILE=../server.cert
SSL_KEY_FILE=../server.key

# Database settings
DB_ENDPOINT=
DB_NAME=
DB_USERNAME=
DB_PASSWORD=

# AWS
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=

client/.example.env

# API settings
REACT_APP_API_URL=https://localhost:5000/api/

# Authentication settings
REACT_APP_AUTH0_DOMAIN=
REACT_APP_AUTH0_CLIENT_ID=
REACT_AUDIENCE=

The keys used in the default deployment can be found in the #keys channel in Slack.

šŸ”’ SSL Certificates

Before running the API, you will need an SSL certificate. In the root directory, start by creating a certificate:

openssl req -nodes -x509 -newkey rsa:4096 -keyout server.key -out server.cert -days 365

To specify the certificates, inĀ api, add the following lines to theĀ .env:

SSL_CRT_FILE=../server.cert
SSL_KEY_FILE=../server.key

Self signed SSL certificates will be rejected by most applications for dev, some workarounds:

In Chrome, into the address bar type, and enable:
	chrome://flags/#allow-insecure-localhost

In Postman, disable SSL verification