- TypeScript 36.2%
- Svelte 30.5%
- HTML 29.4%
- CSS 1.9%
- JavaScript 1.8%
|
|
||
|---|---|---|
| .claude | ||
| apps | ||
| docs | ||
| legacy/godot | ||
| packages/core | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| DESIGN.md | ||
| docker-compose.yml.example | ||
| Dockerfile | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| tsconfig.base.json | ||
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/web |
Svelte 5 web app (GM and players; phone and desktop), served by the server |
apps/server |
Hono + SQLite API, shipped as one Docker image |
legacy/godot |
The original Godot main-menu draft |
Requirements
Node 24+, pnpm. Docker for running the server image.
Develop
pnpm install
pnpm dev # UI in the browser at http://localhost:1420
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
cp .env.example .env # fill in PUBLIC_URL, Discord, ADMIN_SECRET
cp docker-compose.yml.example docker-compose.yml # adjust port / data folder if you like
docker compose up -d --build # server + web app on :8080
RedBook is web only: campaigns live on the server (the browser keeps a cache). Each campaign can be exported as Markdown files that open in Obsidian, and a Markdown folder can be imported.
Discord login (optional)
RedBook needs an account: everyone logs in with Discord, and their campaigns, characters and availability are tied to it, so they're there on any device.
-
Open the Discord Developer Portal and create a New Application (name it e.g. "RedBook").
-
Under OAuth2 → Redirects, add
<PUBLIC_URL>/api/auth/discord/callback, for examplehttps://redbook.example.com/api/auth/discord/callback. -
Copy the Client ID and reset/copy the Client Secret from the same page.
-
Put them in
.envnext todocker-compose.yml:PUBLIC_URL=https://redbook.example.com DISCORD_CLIENT_ID=123456789012345678 DISCORD_CLIENT_SECRET=your-secret -
Restart the server (
docker compose up -d). The log saysDiscord 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).