The example applications for SoftN: every demo the softn.com directory lists, as source, with the scripts that pack, test and release them. Each one is a worked example of some part of the runtime, from a PixelGrid snake to a voiced first-person story, a Game Boy, a 386 PC and a language model that never leaves the browser.
The packed .softn archives are not committed. The Release workflow builds them from a tag and publishes them as a GitHub Release, and softn.com fetches that release rather than keeping copies of its own, so each example exists in exactly one place: its source directory here.
Three more bundles are built and released but not listed in the directory: AIDemo (an exercise of the softn.ai.* inference calls), FoundationFixture (a fixture proving bundled .glb resolution and Scene3D clip animation with @animation events) and PhotoStudio (a layered image editor with PNG, JPEG, GIF, BMP and PSD import and export; see its README).
- On softn.com: every listed example is in the directory and opens in the web runtime.
- From a release: download the
.softnfile from the latest release and open it in the SoftN web runtime with its file picker, or serve the file and open the runtime with?open=<url of the bundle>. - From a softn.com checkout:
npm run fetch:demosthere downloads the pinned release intoapps/softn-web/public/demos/, andnpm run dev:webserves them athttp://localhost:1420/?open=/demos/<Name>.softn.
npm ci
npm test # logic tests, validator regression tests, Promptly's content checks, then every bundle packed and validated
npm run build # dist/<Name>.softn for every bundle, plus SHA256SUMS.txt, catalogue.json and RELEASE_NOTES.md
npm run bundle -- Twenty48 # one bundle, into dist/
node scripts/test-bundle.cjs dist/Twenty48.softn --source bundles/Twenty48 # the check the SoftN loaders apply, against the sourcesNode 20.19 or newer. A build is byte-for-byte reproducible from the sources: entries are stored, not compressed, in a sorted order, so the same tree always packs to the same archive and the same digest.
- Bump
versioninpackage.jsonand commit. - Tag and push:
git tag v1.0.1 && git push origin v1.0.1.
The Release workflow runs the tests, refuses a tag that does not match package.json, and publishes every archive with SHA256SUMS.txt and catalogue.json as a GitHub Release. The Build workflow does the same checks on every push and keeps the archives as a workflow artifact.
A published release is immutable: softn.com pins one by URL and digest, and a platform build from any later date has to be able to fetch exactly the bytes it verified. A re-run of the workflow on an existing tag confirms the archives it already carries and refuses to replace them with different ones, and a ruleset on the repository keeps v* tags from being deleted or moved. New bytes are a new version.
softn.com then pins the new release from its own checkout:
node scripts/fetch-demos.mjs --pin v1.0.1 # rewrites the sizes, digests and download URLs in public/demos/index.json, then fetches| Path | What it is |
|---|---|
bundles/<Name>/ |
One example per directory: manifest.json, permission.json, ui/, logic/, assets/, and where the app needs them server/ (routes the SoftN server runs), xdb/ (database schemas), assets-src/ (sound recipes) and a README or contract. |
catalogue.json |
The directory's entries: id, file, name, description and colour. A bundle not listed here is still built and released, just not shown on softn.com. |
scripts/build-bundle.cjs |
The packer: a stored ZIP of the files the manifest names plus everything under assets/. |
scripts/build-release.cjs |
Packs every bundle into dist/ and writes the checksums, the catalogue record and the release notes. |
scripts/test-bundle.cjs |
The validator: the same structural checks the browser and desktop loaders apply, plus a comparison with the sources. |
scripts/test-all-bundles.cjs |
npm test's last step: build everything, validate everything, check the catalogue. |
scripts/bundle-source-composer.cjs |
Composes a bundle's UI and logic the way the runtime does, for the validator. |
scripts/sfx-lib.cjs |
Writes 16-bit WAVs from a few tone and noise primitives; each game's assets-src/make-sfx.cjs describes its own effects with it. |
scripts/test-*.cjs |
The Texas Hold'em rule and authority tests, the WarbleWire protocol test, and the validators' own regression tests. |
scripts/*.js, build-office-bg.cjs, generate-*.cjs |
Authoring helpers for TheOffice's map and sprites and the icons. Some need sharp (npm i --no-save sharp). |
screenshots/ |
The directory's thumbnails, one per listed example. |
- Create
bundles/<Name>/with amanifest.json(name, version,main,icon, and thefilesit ships) and apermission.json. - If it should appear on softn.com, add an entry to
catalogue.jsonwith a uniqueidandfileof<Name>.softn. npm testpacks and validates it with the rest.- Tag a release, then pin it from softn.com and add the entry to
apps/softn-web/public/demos/index.jsonthere, with a thumbnail underthumbs/.
Apache License 2.0; see LICENSE and NOTICE.md.






















