Monorepo for the NiiVue ecosystem — browser-based medical image visualization.
| Package | Description | npm |
|---|---|---|
@niivue/niivue | Core WebGPU/WebGL2 medical image viewer | |
@niivue/nvreact | React bindings for NiiVue | |
@niivue/nv-web-component | Lit-based Web Components for NiiVue | |
@niivue/nv-ext-drawing | Drawing interpolation and segmentation tools | |
@niivue/nv-ext-image-processing | Image processing (Otsu thresholding, haze removal, etc.) | |
@niivue/nv-ext-save-html | Export a NiiVue scene as a self-contained HTML file | |
@niivue/nv-ext-dcm2niix | DICOM-to-NIfTI conversion in the browser via the dcm2niix WASM build | |
@niivue/nv-ext-niimath | niimath pipelines in the browser via the niimath WASM build | |
@niivue/web-bridge | Typed two-way JSON-envelope bridge between a NiiVue web view and a native (WKWebView) host | — |
NiiVueKit | Swift package (BridgeCore + NiiVueKit) pairing with @niivue/web-bridge to embed NiiVue in SwiftUI apps via WKWebView | — |
@niivue/dev-images | Shared test volumes, meshes, and tractography files (Git LFS) | — |
ipyniivue | Jupyter widget wrapping NiiVue (anywidget) — Python wheel |
| App | Description |
|---|---|
demo-ext-drawing | Demo app for the drawing extension |
demo-ext-image-processing | Demo app for the image processing extension |
demo-ext-save-html | Demo app for the save-to-HTML extension |
demo-ext-dcm2niix | Demo app for the dcm2niix DICOM-to-NIfTI extension |
demo-ext-fullstack | Fullstack demo wiring NiiVue to a Bun server that runs the niimath native binary |
demo-ext-niimath | Browser-only demo running niimath as WASM via @niivue/niimath |
demo-nv-web-component | Demo app for the Web Components package |
medgfx | Native macOS/iOS SwiftUI app embedding NiiVue in a WebView |
Use the hot-reloadable live demos for local development—they provide the fastest feedback loop while working on the project.
git clone git@github.com:niivue/mono.git
cd mono
bun install
bunx nx build niivue
git lfs install
git lfs pull
bun run devCore commands include
bun install # Install all dependencies
bunx nx build <project> # Build a single project (builds deps first)
bunx nx run-many -t build # Build all projects
bunx nx run-many -t test # Run all testsSee CONTRIBUTING.md for detailed setup, tooling, and development instructions.
Packages are versioned and published using Nx Release and bun publish. Ensure you are logged in to npm (npm login) and have publish access to the @niivue scope.
# 1. Version — bumps package.json and updates workspace deps
# Use --first-release if no git tags exist yet for the project
bunx nx release version <version> --projects=<project>
# 2. Changelog (optional) — generate from conventional commits
bunx nx release changelog <version> --projects=<project>
# 3. Build
bunx nx run-many -t build --projects=<project1>,<project2>
# 4. Publish — run from each package directory
# bun publish resolves workspace:* dependencies automatically
cd packages/<project> && bun publish --tag next --access publicUse --tag next for prerelease versions (e.g. 1.0.0-rc.1). Omit --tag for stable releases (defaults to latest). The --access public flag is required for scoped @niivue/* packages.
Pushing to main automatically builds and deploys all examples and demo apps to GitHub Pages. To preview the site locally:
.github/build-pages.sh --serve # build and serve at http://localhost:8080/mono/