kevin-wiki / ui

Purpose

The web viewer. A Next.js (App Router) app that renders the wiki/ markdown knowledge base as a browsable site, plus Kevin's /me portfolio. Read-only over the wiki content; Tailwind for styling; deployed on Vercel.

Mental model & key files

  • src/app/(wiki)/ — the wiki reader (page rendering, [...slug], assets).
  • src/app/me/ — the portfolio (about, work, projects, research, lab, photography).
  • src/app/api/og (per-article OpenGraph images), search, assets, unlock.
  • src/app/graph/, src/app/audit/ — graph view + audit surfaces.
  • src/components/, src/lib/, src/contexts/ — shared UI, helpers, providers.
  • src/lib/privacy-policy.json + src/lib/gating.ts — shared fail-closed public/private policy for runtime and bundling.
  • scripts/ — build-time content bundling + citation checks (see ui/scripts/SKILL.md).

Patterns to follow / invariants

  • Tailwind + cn() first; raw CSS only in globals.css. No co-located CSS modules for ordinary UI (see wiki/style/css-ui-enforcement.md).
  • Follow wiki/style/react.md + wiki/style/typescript.md; check vercel-react-best-practices for data fetching / perf.
  • Package manager is pnpm here (the repo root is npm/tsx). Run from ui/.

Common tasks → first action

  • Dev server → pnpm dev (from repo root: npm run dev).
  • Build → npm run build (installs ui deps frozen, then builds).
  • Add a page → App Router segment under src/app/, reuse src/components/.

Gotchas

  • The app reads bundled wiki content — re-run the bundler (ui/scripts) after wiki changes that the viewer must reflect.
  • Never add a parallel privacy list. Runtime and bundle-wiki.mjs must read the shared privacy manifest, and protected slugs cannot be force-public through frontmatter.
  • This is a separate pnpm workspace from the tsx scripts at the repo root.