You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concrete library choices with versions and rationale. Add a dependency only if it's listed here or has explicit justification.
Build & Dev
Tool
Version
Why
Vite
^7.0
Fast dev server, native ESM, mature plugin ecosystem
TypeScript
^5.6
Strict mode required
pnpm
^10
Faster, less disk than npm; required for monorepo-friendliness later
Vitest
^3
Test runner; must be v3+ for Vite 7 compatibility (v2 ships vite 5 types and breaks tsc -b)
Playwright
^1.48
E2E tests against the dev server
Framework
Library
Version
Why
React
^19
Latest stable; use() hook, async transitions
React Router
^7
URL-driven state, matches our routing model
Styling
Library
Version
Why
Tailwind CSS
^4
Utility-first; aligns with brand color tokens
CSS Variables
native
Theme switching via CSS vars, not Tailwind class swaps
clsx
^2
Class composition
tailwind-merge
^2
Merge Tailwind classes safely
We do NOT use:
styled-components / emotion (runtime CSS-in-JS — bundle and runtime cost)
CSS modules (preferring Tailwind everywhere for consistency)
Sass / Less (Tailwind covers our needs)
State Management
Library
Version
Why
Zustand
^5
Minimal, no provider wrapping, easy to test
Immer
bundled with Zustand
Immutable updates without ceremony
We do NOT use:
Redux (too heavy for this app's scope)
Jotai (atoms are overkill here)
React context for app state (only for theme/i18n)
Persistence
Library
Version
Why
Dexie
^4
Cleaner IndexedDB API; built-in migrations
idb-keyval
^6
(Optional) For one-off simple key/value cases
Markdown Pipeline (unified ecosystem)
Library
Version
Why
unified
^11
Pipeline core
remark-parse
^11
CommonMark parser
remark-gfm
^4
GitHub Flavored Markdown
remark-frontmatter
^5
YAML/TOML frontmatter
remark-math
^6
Math syntax → mdast
remark-rehype
^11
mdast → hast
rehype-katex
^7
Math rendering
rehype-sanitize
^6
XSS protection (with allowlist for our custom node types)
rehype-react
^8
hast → React tree
hast-util-to-jsx-runtime
^2
(alternative to rehype-react if needed)
Custom plugins (we write these in src/core/render/plugins/):
remark-wikilink
remark-callout
remark-embed
remark-highlight
Syntax Highlighting
Library
Version
Why
shiki
^1.24
VS Code-quality grammars; supports multiple themes; tree-shakable
Bundle strategy: ship a curated set of common languages (TypeScript, JavaScript, Python, Rust, Go, Java, C++, Bash, JSON, YAML, SQL, CSS, HTML, Markdown). Lazy-load others on first use.
Diagrams & Math
Library
Version
Why
KaTeX
^0.16
Fast math rendering, smaller than MathJax
mermaid
^11
Diagram support
Both lazy-loaded (only fetched when first encountered in content).