Skip to main content

Development environment

To configure the monorepo in a development environment:

Install mkcert on your machine and generate local TLS certificates with:

pnpm mkcert

Install dependencies:

pnpm install

Setup environment files:

cp ./packages/server/.env.example ./packages/server/.env

Note: Look into the .env file for instructions on how to change the required secrets (OPAQUE setup, signature key pair, session keys etc).

Start the Docker compose stack:

docker compose up -d

Build the server and its dependencies:

pnpm build:server

Setup the database by applying pending migrations, and optionally seed the database with the usual suspects.

pnpm db migrations apply
pnpm db seed

Start the dev script:

pnpm dev

The dev script will:

Port list

  • 3000 Vite SPA to host the devtools
  • 3001 Server
  • 3002 PostgreSQL database
  • 3003 Redis key/value store & cache
  • 3004 Docusaurus documentation

Test users

A list of sample identities can be seeded to the development database. The seed provides an identity and a device for each user.

To login as a particular user, you'll have to use their deviceRegistrationURI to save their credentials to your local development browser. This can be done with a call to the registerEnrolledDevice on the e2esdk client, or via the devtools.