Skip to main content
Tuturuuu Wiki is the workspace knowledge base in apps/web under /{locale}/{wsId}/wiki. A workspace holds spaces; each space holds a nested page tree. Pages are written in Markdown and rendered with the shared renderer in packages/ui (@tuturuuu/ui/wiki/wiki-markdown), so Wiki and Tuturuuu Docs render the same way.

Product decisions

Data and authorization

The tables live in the private schema (apps/database/supabase/migrations/20261129033000_add_wiki_spaces_and_pages.sql): wiki_spaces, wiki_space_members, wiki_pages, wiki_page_revisions, wiki_page_links, wiki_page_redirects, wiki_page_stars and wiki_page_comments. RLS is enabled with no policies, and every privilege is revoked from anon, authenticated and authenticator. Only service_role reaches them, through apps/web/src/lib/wiki/* after the request passes the membership, permission and visibility checks in @tuturuuu/wiki-core/source (resolveWikiSpaceAccess). Saves go through private.wiki_put_page, which is idempotent by path. It returns created, updated, unchanged, conflict (stale base_revision) or parent_missing. Concurrent puts serialize per path, and moves (private.wiki_move_page) take an exclusive per-space lock. Each save writes a revision row; history shows a line diff and restores by saving the old content as a new revision.

Rendering safety

The renderer keeps Streamdown’s hardening on and never executes raw HTML. Every rendered href and image source passes safeWikiRenderHref, which reuses W1’s reviewed parseWikiLink and only admits app-internal paths under explicit prefixes. GitHub alert blockquotes (> [!WARNING]) become callouts. A bare YouTube or video link on its own line becomes a privacy-friendly embed.

CLI

ttr wiki authors content through the signed-in CLI session:
Import files are Markdown with optional front matter (title, slug, parent, position, icon). dir/index.md describes the page dir. A repeated import is idempotent: unchanged pages report unchanged and write nothing.

EduFest workshop preparation

https://tuturuuu.com/workshops/edufest-2026/prep requires sign-in. It renders the root workspace space edufest-2026-workshop (visibility workspace, with presenters from outside the root workspace invited as space viewers). Signed-out visitors see a sign-in prompt. Signed-in viewers without access see an “ask for access” page with no titles or content. Regression coverage: apps/web/src/lib/workshops/edufest-prep.test.ts. The public agenda stays on the roadmap at /roadmap/workshops/edufest-2026.