story_adventure

Story Adventure Tools

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!

Buy Me A Coffee

Project Structure

This project is a pnpm monorepo with three packages:

Technology Stack

Getting Started

Prerequisites

Installation

# Install dependencies
pnpm install

Development

# 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

Testing

# Run unit tests
pnpm test

# Run E2E tests
pnpm test:e2e

# Type check
pnpm typecheck

# Full verification (typecheck + test + test:e2e)
pnpm verify

Building for Production

# 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.

Story Format

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:

Choices may have a description (displayed as a clickable option) or be empty (acting as a simple “next” button for pagination).

Playable Bundles

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:

The 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.

Acknowledgment

This project uses the following open source components:

See the respective project pages for licenses and meta-dependencies.

License

Copyright 2024-2025 Sebastian Schmittner

AGPLV3

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.