FRAMEWORKExperimental — 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

After installing/preparing the source SDK, normal development starts the managed session; it does not compile a native runtime. A matching registered Runner is required. If needed, build from the checked-in app:

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

Kitchen Sink demonstrates windows/geometry, menus/shortcuts, files/dialogs, streaming/Trash, settings, clipboard, notifications/system APIs, audio, and native controls. Progress, results, and errors appear inline with detailed logs. Disposable filesystem demos create/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@next MyNotes -- --example notes-lite
npm create @legendapp/spark@next MyMusic -- --example music-lite
npm create @legendapp/spark@next MyDiff -- --example diff-lite
npm create @legendapp/spark@next 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 validate contract behavior, export policy, lifecycle transitions, and tooling; template checks create real consumers. Packed consumer checks separately validate the archive's dependency graph and declarations.

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.