The repo uses npm workspaces. Packages are divided up into a backend application (be) and frontend (fe) packages. To install and run locally:
- clone or fork the repository:
- Make sure to have installed and be using Node.js 20.9 or higher.
- Configure a self-signed certificate for local HTTPS support (see the section below on how to do this).
- Add .env files to both the
packages/be
directory and thepackages/fe
directory (email [email protected] to get these files) - from the repo root run
npm ci
and then runnpm run be:dev
- In a second terminal (or command line) window, from the repo root run
npm run fe:dev
In order to use the site in local development mode, two files must be added to the repo root. The following commands will work on MacOS but if mkcert is installed by another package manager, this can be run on any version of *nix.
In a terminal shell:
cd ~/.ssh
brew install mkcert
mkcert -install
mkcert -key-file localhost_key.pem -cert-file localhost_cert.pem localhost 127.0.0.1
cat localhost_cert.pem > localhost_fullchain.pem
cat "$(mkcert -CAROOT)/rootCA.pem" >> localhost_fullchain.pem
Now, navigate back to your cloned repo, into the root directory. Add the two generated .pem files to the repo with the following command. These keys are .gitignored by default.
cp -v ~/.ssh/localhost_cert.pem ~/.ssh/localhost_key.pem .