HenniOKF
Documentation

Reference

Commands

Every npm script, the Docker commands, single tests and the ports.

npm scripts

All run in the root of the project.

CommandWhat it does
npm run devdevelopment server with Turbopack on port 3370, reads .env.local
npm run buildproduction build into .next, with standalone output
npm startstarts the build with next start on port 3370
npm testVitest, once
npm run test:watchVitest, at every change
npm run test:e2ePlaywright: builds, starts on port 3371 with a fresh .data-e2e, checks desktop and mobile
npm run lintESLint
npm run typecheckcreates the route types (next typegen), then tsc --noEmit
npm run formatPrettier writes all files
npm run format:checkPrettier only checks
npm run checkformat:check, lint, typecheck, test one after another
npm run rename -- <Name> <Port> [<prefix_>]scripts/rename.mjs: name, port and API key prefix of a project from the template

Besides:

CommandWhat it does
npm ciinstalls exactly what package-lock.json lists
npx next buildthe build, as "Check" runs it after check
npx playwright install chromiumthe Chromium for the browser tests
npx prettier --write <files>formats single files

Single tests

npx vitest run tests/env.test.ts
npx vitest run -t "the first admin"
npx playwright test e2e/docs.spec.ts --project=desktop

Docker

CommandWhat it does
docker/build.sh -t henniokfbuilds the image, with commit and build time. Further arguments go to docker buildx build
docker/build.sh --platform linux/amd64 -t ghcr.io/arpablo/henniokf:latestbuilds for a VPS with amd64
docker build -f docker/Dockerfile -t henniokf .without the script, without version
docker compose -f docker/compose.local.yml up -d --buildbuilds and starts locally, requires LOCAL_ROOT_DIR, optionally LOCAL_PORT
docker compose -f docker/compose.vps.yml up -dpulls and starts on the VPS, reads docker/.env
docker/backup.shbacks up the root directory on the VPS

GitHub

CommandWhat it does
gh run list --limit 5the last runs
gh run list --workflow Image --limit 3the last runs of "Image"
gh workflow run Imagestarts "Image" by hand

Ports

PortWhat for
3370development, npm start, container
3371browser tests