This is a framework for creating and playing through non-linear interactive stories. Everything runs client-side in your browser – files never leave your computer.
If you like this, consider supporting further development!
This project is a pnpm monorepo with three packages:
packages/shared/ – Shared TypeScript types, utilities, and action systempackages/editor/ – Web-based story creation tool (React Flow graph editor)packages/viewer/ – Web-based story player (Markdown rendering, save/load progress)stories/ – Example stories and story collectionscripts/ – Build scripts for bundle generation@xyflow/react) – Graph editor (replaces Cytoscape.js)# Install dependencies
pnpm install
# Run viewer in dev mode (http://localhost:5174)
pnpm --filter viewer dev
# Run editor in dev mode (http://localhost:5173)
pnpm --filter editor dev
# Run all packages in dev mode
pnpm dev
# Run unit tests
pnpm test
# Run E2E tests
pnpm test:e2e
# Type check
pnpm typecheck
# Full verification (typecheck + test + test:e2e)
pnpm verify
# Build all packages
pnpm build
# Download launcher binaries (tVeb web server for bundle launcher)
pnpm download:launcher-binaries
# Build viewer bundle for ZIP export (includes viewer + launcher)
pnpm build:viewer-for-bundle
Note: The editor’s bundle generation feature requires the viewer bundle to be built first. Run pnpm download:launcher-binaries and pnpm build:viewer-for-bundle before generating playable adventure bundles. The generated bundles include a minimal self-contained web server, making them directly launchable on Windows and Linux without any additional software.
Stories are JSON files. See the example story for the format and the stories README for a list of available stories.
A story consists of:
.next array. Sections without choices are terminal.Choices may have a description (displayed as a clickable option) or be empty (acting as a simple “next” button for pagination).
The editor can export stories as standalone ZIP bundles that include:
All launcher files are placed at the top level of the bundle for easy access.
Users can run bundles by:
run_story_adventure.sh or run from terminalrun_story_adventure.bat or use PowerShell scriptThe launcher automatically starts the web server and opens the story in the default browser. No installation or configuration required.
Web Server: Bundles use tVeb (Tiniest Veb Server), a minimal (~1.5 MB) open-source static file server.
This project uses the following open source components:
See the respective project pages for licenses and meta-dependencies.
Copyright 2024-2025 Sebastian Schmittner
All code published in this repository is free software: it can be redistributed and/or modified under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE for details.
For included open source dependencies, different licenses may apply. See the respective project pages listed above.