No description
  • HTML 70.7%
  • Svelte 14.6%
  • TypeScript 14.1%
  • CSS 0.5%
Find a file
Gensokian 9a0d228eea Add translations, image links and a simpler session page
- Translations: English, German and an empty Swiss German file
  (apps/app/src/locales), falling back gsw -> de -> en. A campaign can set
  its language (stored on the server, so players get it); each user can
  override it in Settings.
- Uploaded images get a direct link ("Copy link") for use in other tools;
  the server stores them under /files with unguessable names.
- Sessions: one shared notes field replaces Prep/Recap (an old "## Prep"
  section stays GM-only). "Draft recap" writes or refreshes the
  "Previously on…" summary at the top.
- Cheat sheet on the session page: who's coming, planned events with
  warnings and GM secrets, linked people and places, and loose threads from
  earlier sessions with a "Take into this session" button.
- Live table: [[wikilink]] suggestions in quick notes, jotted entries grouped
  by type, jotted events go onto the table, and a session can only be ended
  once (the live button moves on to the next session).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 23:55:03 +01:00
.claude Initial commit 2026-11-15 14:22:20 +01:00
apps Add translations, image links and a simpler session page 2026-11-15 23:55:03 +01:00
legacy/godot Initial commit 2026-11-15 14:22:20 +01:00
packages/core Add translations, image links and a simpler session page 2026-11-15 23:55:03 +01:00
.dockerignore Initial commit 2026-11-15 14:22:20 +01:00
.editorconfig Initial commit 2026-11-15 14:22:20 +01:00
.env.example Add server sync, player portal, Discord login and admin page (phase 4) 2026-11-15 22:29:15 +01:00
.gitattributes Initial commit 2026-11-15 14:22:20 +01:00
.gitignore Initial commit 2026-11-15 14:22:20 +01:00
DESIGN.md Add server sync, player portal, Discord login and admin page (phase 4) 2026-11-15 22:29:15 +01:00
docker-compose.yml Add server sync, player portal, Discord login and admin page (phase 4) 2026-11-15 22:29:15 +01:00
package.json Initial commit 2026-11-15 14:22:20 +01:00
pnpm-lock.yaml Initial commit 2026-11-15 14:22:20 +01:00
pnpm-workspace.yaml Initial commit 2026-11-15 14:22:20 +01:00
README.md Add server sync, player portal, Discord login and admin page (phase 4) 2026-11-15 22:29:15 +01:00
tsconfig.base.json Initial commit 2026-11-15 14:22:20 +01:00

RedBook

Campaign notebook and time tracker for D&D, Daggerheart and friends. See DESIGN.md for the full design and roadmap.

Layout

Path What
packages/core Shared TypeScript logic: types, wikilinks, mention matching, redaction
apps/app Svelte 5 UI. Desktop/Android via Tauri (src-tauri), browser via the web build
apps/server Hono + SQLite API, shipped as one Docker image
legacy/godot The original Godot main-menu draft

Requirements

Node 24+, pnpm, Rust (for the desktop app). Docker for running the server image.

Develop

pnpm install
pnpm dev            # UI in the browser at http://localhost:1420
pnpm dev:desktop    # UI in the Tauri desktop window
pnpm dev:server     # API at http://localhost:8080 (the UI dev server proxies /api to it)
pnpm test           # core + server tests
pnpm check          # type checks

Build

pnpm --filter @redbook/app tauri build        # Windows installer in apps/app/src-tauri/target/release/bundle
cp .env.example .env && docker compose up -d --build   # server + web portal on :8080

Campaigns created by the desktop app live in Documents/RedBook/<Campaign>/ as Markdown files that also open in Obsidian.

Discord login (optional)

Players can use RedBook without an account (their device remembers them, and the access link in the player view brings them back). With Discord login their campaigns are tied to them instead: log in on any device and everything is there.

  1. Open the Discord Developer Portal and create a New Application (name it e.g. "RedBook").

  2. Under OAuth2 → Redirects, add <PUBLIC_URL>/api/auth/discord/callback, for example https://redbook.example.com/api/auth/discord/callback.

  3. Copy the Client ID and reset/copy the Client Secret from the same page.

  4. Put them in .env next to docker-compose.yml:

    PUBLIC_URL=https://redbook.example.com
    DISCORD_CLIENT_ID=123456789012345678
    DISCORD_CLIENT_SECRET=your-secret
    
  5. Restart the server (docker compose up -d). The log says Discord login: on, and Log in in the main menu offers Continue with Discord.

RedBook only asks Discord for the identify scope (your name and avatar), never for your email, servers or messages. The server must be reachable at PUBLIC_URL from the player's browser.

Server admin (optional)

Set ADMIN_SECRET in .env (a long random value) and open <PUBLIC_URL>/admin. After entering the secret you see everything stored on the server (accounts, campaigns, who plays where, database size) and can help players who lost access to their Discord account:

  • Recovery link: logs one device into their account without Discord (works once, valid 24 h).
  • Move to…: they log in once with their new Discord account, then you move the old account's campaigns to it.
  • Log out everywhere (lost or shared device) and, as a last resort, Delete (campaigns and characters stay, they are just no longer tied to that account).