Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How Do I Try It?

Install Prerequisites

Install Rust, then add the WebAssembly target:

rustup target add wasm32-unknown-unknown

Install the frontend and documentation tools:

cargo install trunk mdbook

Run The Local Preview

Start the API and frontend together:

cargo run -p xtask -- dev

Open:

http://127.0.0.1:1420/

The API listens at:

http://127.0.0.1:8080/

The frontend proxies /api/v1/ to the API server.

Storage Options

Postgres is optional for local development. If DATABASE_URL is not set in a debug build, the API uses seeded in-memory storage.

Force in-memory storage:

FORGE_STORE=memory cargo run -p forge-server

Use Postgres:

DATABASE_URL=postgres://user:password@localhost:5432/ttrpg_forge cargo run -p forge-server

In development mode, the Postgres store runs migrations and seeds development data on startup.

Development Authentication

Development authentication currently uses request headers:

x-user-id: 00000000-0000-0000-0000-000000000001
x-user-name: Development User

The web client sets these headers centrally while real authentication is deferred.

Common Commands

cargo run -p xtask -- fmt
cargo run -p xtask -- check
cargo run -p xtask -- test
cargo run -p xtask -- build
cargo run -p xtask -- docs