No description
Find a file
nholtware c0d03fadc5
All checks were successful
/ checks (push) Successful in 42s
/ deploy (push) Successful in 12s
ci: workflows and registry at https://git.holtlabs.xyz (Plan 14)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-11 13:50:32 -06:00
.forgejo ci: workflows and registry at https://git.holtlabs.xyz (Plan 14) 2026-11-11 13:50:32 -06:00
.github/workflows Initial commit 2026-11-05 12:39:53 -06:00
migrations feat: passport-local authentication, story ownership 2026-11-05 13:33:51 -06:00
src feat: change password (revokes other sessions) and logout/login regression test 2026-11-05 13:47:37 -06:00
stories feat: bundle Hansel and Gretel (public domain Grimm retelling) 2026-11-05 13:16:54 -06:00
.dockerignore Initial commit 2026-11-05 12:39:53 -06:00
.env.example Initial commit 2026-11-05 12:39:53 -06:00
.gitignore Initial commit 2026-11-05 12:39:53 -06:00
.nvmrc Initial commit 2026-11-05 12:39:53 -06:00
.prettierignore Initial commit 2026-11-05 12:39:53 -06:00
.prettierrc.json Initial commit 2026-11-05 12:39:53 -06:00
CLAUDE.md Initial commit 2026-11-05 12:39:53 -06:00
commitlint.config.js Initial commit 2026-11-05 12:39:53 -06:00
Dockerfile Initial commit 2026-11-05 12:39:53 -06:00
eslint.config.js Initial commit 2026-11-05 12:39:53 -06:00
package-lock.json feat: passport-local authentication, story ownership 2026-11-05 13:33:51 -06:00
package.json feat: passport-local authentication, story ownership 2026-11-05 13:33:51 -06:00
README.md feat: bundle Hansel and Gretel (public domain Grimm retelling) 2026-11-05 13:16:54 -06:00
tsconfig.json Initial commit 2026-11-05 12:39:53 -06:00
vitest.config.ts Initial commit 2026-11-05 12:39:53 -06:00

adventure

Backend for the choose-your-adventure builder/player (Express 5 + Postgres), scaffolded by platform/new-service adventure --kind backend --with postgres. Frontend: adventure-web.

A story is one JSONB doc: { start, nodes: { key: { title, text, ending?, choices: [{label, to}] } } }. Validation (src/lib/story.ts): errors block publishing (missing start/targets, dead ends, no reachable ending); warnings are advisory (unreachable scenes, choices on endings).

Method Path
GET /stories published stories (?mine=1 includes drafts)
GET /stories/:id story + issues
POST / PUT /stories, /stories/:id create / replace; 400 on bad shape
POST /stories/:id/publish 422 + issues if errors
POST /stories/:id/unpublish
DELETE /stories/:id 204

No auth (homelab). Without DATABASE_URL an in-memory store is used (tests).