Repository navigation
Development
npm ci
npx playwright install chromium
npm run checknpm run check runs ESLint (TypeScript, React Hooks and promise-safety rules), the deliberately scoped infrastructure formatting check, the checked-in WASM numerical tests, the full Vitest suite, the production build with TypeScript checking, and Playwright against both the Strict Mode development server and production preview. GitHub Actions runs the same gates as separate steps so the failing command and test output remain visible, and uploads browser traces/screenshots. Source formatting is not yet enforced repository-wide; Prettier currently checks only the CI/tooling and browser-test configuration to avoid unrelated formatting churn.
The browser suite uses fresh contexts, temporary downloads and deterministic synthetic/replay fixtures. Its injected RTL adapter exercises the real controller/backend cancellation and retry paths without opening WebUSB or using an existing browser profile. See browser integration tests for focused commands, failure artifacts, the render-callback test boundary and explicit GPU/hardware prerequisites.
The production build uses TypeScript 7. TypeScript ESLint still needs the compiler API, so the lockfile also installs the official TypeScript 6 compatibility package under the typescript name and TypeScript 7 as @typescript/native; their non-conflicting tsc6 and tsc executables let lint and build run side by side. All normal CI tests are hardware-independent and do not request WebUSB, audio hardware or a Rust toolchain.
The spectrum worker uses the measured single-threaded RustFFT WebAssembly kernel by default and retains the original JavaScript implementation as an automatic fallback. Diagnostics identify the active backend and its startup cost. Append ?analysis=js to force the reference path or ?analysis=wasm to exercise WASM explicitly; neither mode uses shared memory, threads or cross-origin isolation.
React Strict Mode remains enabled in development. The receiver controller and analysis worker are created by the mounted effect and destroyed by that same effect instance, so the development setup/cleanup probe gets a fresh worker and an older asynchronous cleanup cannot dispose the current session.
The reviewed WASM binary is checked in so ordinary Node builds do not require Rust. To reproduce it, install rustup, then run npm run wasm:build; wasm/spectrum-analysis/rust-toolchain.toml pins Rust 1.85.0 and Cargo.lock pins RustFFT 6.4.1 and its transitive dependencies. Run npm run test:wasm for numerical parity and the repeatable backend benchmark.
The default remains WASM with JavaScript fallback. Opt in with ?analysis=gpu
(4096 bins), or ?analysis=gpu&fft=16384. GPU results stay on the rendering
device for the spectrum and waterfall. The existing WASM worker remains active
as a reference/fallback; audio and RDS retain their existing processing paths.
Graphics reports startup and wall-clock upload–compute–render completion time.
For numerical checks and a repeatable comparison, run npm run dev, open
/src/testing/gpuFft.html on that local server, and select Run validation.
This explicit validation page performs bounded readbacks; the normal receiver
does not. See GPU FFT experiment for results, limits and manual
hardware checks.
Clone the source repository, select the Node.js version in .nvmrc (22.23.1), and run npm ci. The lockfile pins the build dependencies. Checked-in WebAssembly and the vendored AD9364 source keep normal builds independent of a Rust or Emscripten installation.
Public contract/schema fixtures live in src/testing/fixtures/. No documentation-vault symlink is required. The two RF fine-tuning regression checks and four private SigMF capture imports explicitly skip when the owner's samples/ directory is absent. Those original recordings are deliberately not distributed. Other decoder and replay tests use generated or separately licensed fixtures.
Optional real Atlas tests require an explicitly configured test environment. Never run them against a production store casually. scripts/check-atlas-sigmf-roundtrip.py and scripts/check-geolocation-sigmf.py accept local checkout paths and do not upload data.
The optional diagnostics collector source is in deploy/report-service/; run its tests with npm run test:report-service. The browser application itself builds as a static site. Deployment credentials, live collector stores, web-server logs and owner-specific activation scripts are not part of the public source.
Before publishing, npm run public:check rejects private notes, recordings, credentials, database files, deployment operations and unreviewed top-level files from the tracked/eligible untracked source. CI also enforces this boundary and tests the optional diagnostics collector. Secret scanning is a separate check; file-name checks do not prove secret-free content.