Build and run
npm install
npm run ffmpeg # fetch the ffmpeg binaries the video code and its tests use
npm run dev # run the app with hot reloading
npm test # unit tests, plus anonymiser and decoder integration tests
npm run typecheck
npm run smoke # start the built app, fail on console errors, write smoke.png
npm run prose # show where the README and docs use the patterns being removednpm run ffmpeg downloads the pinned ffmpeg binaries into node_modules/.cache/ffmpeg/. Run it again after npm ci, which empties node_modules. See the video decoder.
npm run smoke does not run if out/ is older than src/. After a failed build the previous bundle is still in out/, and testing it would report success for code that does not compile.
Tests on CI
.github/workflows/test.yml type-checks both projects and runs the tests on every push and pull request, on Linux only. Its result is the badge on the README. The installer workflow runs the same tests, but only for a tag or when started by hand. The run summary shows how many tests passed.
vitest.config.ts collects only src/**/*.test.ts. There is no React testing library, so UI logic that needs tests is written as a plain module next to the component and tested there: for example burnIn.ts next to BurnInCheck.tsx, and selection.ts in src/shared/, which decides which images of a stack are uploaded.
Code layout
See architecture for the source folders and the split between the main process and the renderer.
Test data
The DICOM fixtures in src/main/anon/__fixtures__/ come from the anonymiser's repository. They are very small images, enough to test the anonymiser but not to look at. The video fixtures in src/main/codecs/__fixtures__/ are generated by scripts/videoFixtures.mjs.
For anything visual, generate the sample study:
npm run sampleThis writes 49 files to .sample-study/, which git ignores: a CT phantom in two studies six months apart, a diffusion series, and an ultrasound with a banner burnt into its pixels. The screenshots are taken on this study.