@@ -4,13 +4,15 @@ Bar trivia PWA with WebRTC multiplayer, Reveal.js slides, and buzzer gameplay.
44No backend — runs entirely in the browser.
55
66** Live:** https://morbeo.github.io/viktorani/
7+ ** API docs:** [ ![ API Docs] ( https://img.shields.io/badge/docs-API-blue )] ( https://morbeo.github.io/viktorani/api/ )
78
89---
910
1011## Contents
1112
1213- [ Tech stack] ( #tech-stack )
1314- [ Getting started] ( #getting-started )
15+ - [ Documentation] ( #documentation )
1416- [ Project structure] ( #project-structure )
1517- [ Multiplayer] ( #multiplayer )
1618- [ Data storage] ( #data-storage )
@@ -51,6 +53,7 @@ npm run dev
5153| ----------------------- | ---------------------------------------------- |
5254| ` npm run dev ` | Start dev server at ` localhost:5173 ` |
5355| ` npm run build ` | Type-check + production build → ` dist/ ` |
56+ | ` npm run docs ` | Generate API docs → ` docs/api/ ` (gitignored) |
5457| ` npm run lint ` | ESLint across all ` *.ts ` / ` *.tsx ` files |
5558| ` npm run typecheck ` | Type-check app and test files (both tsconfigs) |
5659| ` npm run test ` | Run unit tests once via Vitest |
@@ -65,6 +68,24 @@ npm run dev
6568
6669---
6770
71+ ## Documentation
72+
73+ | Document | Description |
74+ | -------- | ----------- |
75+ | [ Host guide] ( docs/user-guide/host.md ) | Setting up and running a trivia night |
76+ | [ Player guide] ( docs/user-guide/player.md ) | Joining a game and buzzing in |
77+ | [ API docs] ( https://morbeo.github.io/viktorani/api/ ) | Generated TypeDoc — transport, DB, hooks |
78+ | [ Architecture decisions] ( docs/adr/ ) | ADRs for all major technical decisions |
79+
80+ To generate API docs locally:
81+
82+ ``` bash
83+ npm run docs
84+ # Output: docs/api/ (gitignored — generated at build time)
85+ ```
86+
87+ ---
88+
6889## Project structure
6990
7091```
@@ -105,6 +126,10 @@ src/
105126│ └── timer/ # Timer hook and component tests
106127└── App.tsx # HashRouter + all routes
107128
129+ docs/
130+ ├── adr/ # Architecture Decision Records
131+ └── user-guide/ # Host and player guides
132+
108133public/
109134├── favicon.svg # SVG favicon (source of truth)
110135├── icon-192.png # PWA icon — generate from favicon.svg (see Favicon section)
@@ -153,12 +178,13 @@ restore or share your question bank.
153178
154179### Workflows
155180
156- | Workflow | Trigger | Purpose |
157- | --------------- | ------------------------- | ---------------------------------------------------------------------- |
158- | ` ci.yml ` | PRs to ` master ` | PR title lint + type-check, lint, test, build — both required to merge |
159- | ` deploy.yml ` | push to ` master ` + manual | Type-check → lint → test → build → deploy to GitHub Pages |
160- | ` release.yml ` | push of ` v* ` tags | Build tarball → generate release notes → publish GitHub Release |
161- | ` automerge.yml ` | ` CI ` workflow completes | Auto-merge Dependabot patch/minor PRs when CI passes |
181+ | Workflow | Trigger | Purpose |
182+ | --------------- | ------------------------------ | ---------------------------------------------------------------------- |
183+ | ` ci.yml ` | PRs to ` master ` | PR title lint + type-check, lint, test, build — both required to merge |
184+ | ` deploy.yml ` | push to ` master ` + manual | Type-check → lint → test → build → deploy to GitHub Pages |
185+ | ` docs.yml ` | push to ` master ` (src/ changes) | Generate TypeDoc → publish to ` gh-pages ` under ` /api/ ` |
186+ | ` release.yml ` | push of ` v* ` tags | Build tarball → generate release notes → publish GitHub Release |
187+ | ` automerge.yml ` | ` CI ` workflow completes | Auto-merge Dependabot patch/minor PRs when CI passes |
162188
163189All workflows set ` FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true ` to opt into the Node 24 runner ahead of the June 2026 forced migration.
164190
@@ -179,7 +205,7 @@ Force pushes and branch deletion are blocked. To apply or re-apply protection:
179205bash scripts/protect-master.sh
180206```
181207
182- > ** Note:** ` scripts/ ` is gitignored. Add scripts explicitly with ` git add --force scripts/ ` .
208+ > ** Note:** ` scripts/ ` is gitignored. Add scripts explicitly with ` git add --force scripts/ `
183209
184210### Dependabot
185211
0 commit comments