35 Building and extending Blue 3
Blue 3 is a TypeScript monorepo with an Electron application, a platform-neutral @blue/data project model, a Java-runtime helper, and a native Blue Engine. The archived Java manual’s Maven and NetBeans-module instructions apply to the older application, not this repository.
Install Node.js 22 or newer and the pnpm version pinned in the root package.json packageManager field. App source builds also need Java 17 or newer, Maven 3 or newer, CMake 3.21 or newer, and a C/C++ toolchain. The native build bootstraps the repository’s pinned vcpkg revision. Install Quarto to build the manual. Csound 7 is required for playback and rendering; it is not required to open and edit projects.
On macOS, the C/C++ toolchain comes from Xcode or the Xcode Command Line Tools. Check that xcode-select -p identifies the installed toolchain.
35.1 Build from a fresh checkout
After installing the prerequisites, run:
git clone https://github.com/kunstmusik/blue.git
cd blue
pnpm install --frozen-lockfile
pnpm build
pnpm test
pnpm lint
pnpm --filter @blue/app manual:build
pnpm --filter @blue/app startThe first build downloads and bootstraps the pinned vcpkg checkout and builds its native dependencies. Maven also downloads the Java helper’s dependencies. Allow network access and extra time for this first build. The final command opens the built Electron app. For development with automatic reload after edits, use pnpm --filter @blue/app dev instead.
To create and verify an unsigned local application package after building:
pnpm --filter @blue/app package:dir
pnpm --filter @blue/app verify:packaged-appThe packaging command rebuilds and bundles the manual. For changes limited to the application, the package scripts under packages/blue-app offer more focused validation. The manual can also be built directly with quarto render docs/manual --to html.
35.2 Correctness checks and speed measurements
The application has separate commands for optional timing work:
pnpm --filter @blue/app test:performance
pnpm --filter @blue/app test:performance:browser
pnpm --filter @blue/app test:performance:engine
pnpm --filter @blue/data test:performanceUse a quiet desktop with recorded hardware and software settings to assess speed. Keep those settings consistent between revisions and save each run’s reports before starting the next. The normal application suites continue to exercise behavior in CI. A manually requested hosted run can help investigate platform differences; its collection status does not certify responsiveness. The source checkout’s docs/performance-testing.md describes how to interpret the reports from both packages. Data correctness checks also retain their large-project scenarios in CI.
35.3 Extension boundaries
Start in packages/blue-data for project models, XML compatibility, note generation, and CSD policy. Host filesystem, processes, the engine, and Java runtime integration belong in the Electron main process or their host packages. Renderer work uses typed preload and IPC contracts. Read the repository’s AGENTS.md, docs/modularization.md, and .specify/memory/constitution.md before changing those boundaries.
Blue 3 does not expose the Java application’s NetBeans RCP plugin APIs. When extending a SoundObject, instrument, Note Processor, or widget, follow the extension type’s model registration and serialization paths, its editor contract, and the ProjectHistory path for user edits. Extend CSD generation or note processing where that feature requires it. For compatibility changes, consult Java behavior and the repository’s XML loading contract. Load supported data, migrate documented historical forms, and diagnose unexpected content. Reject unexpected input unless the contract defines a safe recovery. See docs/README.md in the source checkout for maintainer guides. Feature-specific requirements and validation belong in specs/.