Legend SparkExperimental — not for production

Examples and validation

Explore Kitchen Sink, generate focused apps, and run source and platform checks.

Kitchen Sink

From the current source checkout:

bun run kitchen-sink

Prepare the source SDK and register a matching Runner first. To build a custom runtime for Kitchen Sink:

cd examples/kitchen-sink
bun run rebuild:macos
bun run macos
# On Windows:
# bun run rebuild:windows
# bun run windows

Kitchen Sink demonstrates desktop APIs, camera, rich text, and native controls. Results and errors appear inline. Filesystem demos create and recycle test data.

bun run kitchen-sink:prepare /absolute/path/to/KitchenSinkCheck packs the SDK and creates a separate copied consumer for integration testing. It preserves that consumer's generated identity/configuration rather than changing the checked-in app.

Smaller applications

Create a focused app with npm:

npm create @legendapp/spark MyNotes -- --example notes-lite
npm create @legendapp/spark MyMusic -- --example music-lite
npm create @legendapp/spark MyDiff -- --example diff-lite
npm create @legendapp/spark MyEditor -- --example document-editor

Then run the generated app, for example:

cd MyNotes
npm run macos

For local SDK development, prepare the source SDK and run bun run spark create /absolute/path/to/MyNotes --example notes-lite from its checkout.

Notes Lite covers local notes, search, import/export, recovery, and session restoration. Music Lite covers playback/queue ownership. Diff Lite covers text comparison. Document Editor covers file operations, menus, document requests, and desktop lifecycle. These examples are distinct from the full Legend Apps products.

The helper example demonstrates an app-supplied executable without a Node runtime in Hermes. The universal Settings starter uses native controls plus platform adapters.

Source checks

From the SDK checkout:

bun run typecheck
bun run test
bun run test:templates

bun run test uses Vitest, not Bun's test runner. Source checks cover APIs, lifetimes, and tooling. Template checks create real apps; packed consumer checks verify distributed dependencies and types.

Native and platform checks

Native suites need their toolchains and disposable consumer projects. Read prerequisites before running them. Relevant commands include:

CommandPurpose
bun run test:nativeNative API probes
bun run test:uiPacked native UI consumer
bun run test:platform --platform <target>Shared contract catalog on a target
bun run test:windowsWindows Runner → Fast Refresh → added module → custom build
bun run test:windows:prepareGeneration/bundles without Windows native execution
bun run test:runtimes:allRunner/dev/release background runtimes and pruning
bun run test:universal / bun run test:universal:devUniversal generation/bundles and shared sessions
bun run test:add-desktopExisting Expo app preservation/composition

Run your app on each target OS and architecture to check native behavior as well as generation and bundling.

See the platform testing guide, manual testing checklist, and platform limits.