Skip to content

Build dmsforall

At the end of this page, you can build every package, export the API contract, and build the two container images.

  • Node.js 22 or later.
  • pnpm 11, as pinned in package.json.
  • Docker with Compose v2, for the database and the images.
Terminal window
pnpm install --frozen-lockfile

The --frozen-lockfile flag makes the install fail if pnpm-lock.yaml does not match package.json.

Terminal window
pnpm --filter @dfa/shared build
pnpm build

Build @dfa/shared first. The API and the web interface use its compiled output.

Export the API contract and generate the web types

Section titled “Export the API contract and generate the web types”

After you change a controller or a DTO, regenerate the OpenAPI document and the web types:

Terminal window
pnpm api:openapi
pnpm web:types

Do not run pnpm api:openapi while pnpm dev is running. Both write to the same build folder.

To build the images of the stack from source, use the override file:

Terminal window
docker compose -f docker-compose.yml -f docker-compose.build.yml build

To build one image by hand, run from the repository root, because the Dockerfiles copy the workspace packages:

Terminal window
docker build -f apps/api/Dockerfile -t dmsforall:local .
docker build -f apps/web/Dockerfile -t dmsforall-web:local .

The API image also contains the mdbtools programs, which the data import needs.

Terminal window
pnpm typecheck
pnpm lint
pnpm format:check

For the full list of checks that CI runs, read Testing and Contributing.