How richardgill/llm-ui works
Project type and purpose
• This is an open-source, full-stack monorepo for “llm-ui,” a React/TypeScript library plus ecosystem.
• It contains:
– Core library packages (code, csv, json, markdown, react, shared)
– A documentation/demo website (apps/www built with Astro + React)
– Example apps (Next.js & Vite starters under examples/)
– Codegen tooling (tooling/examples, tooling/gen, tooling/tsconfig)
– CI/CD and release pipelines (.github/workflows, Husky, lint-staged)
File structure
• Root
– pnpm-workspace.yaml glues everything together
– package.json defines root-level scripts & dependencies
– .github/workflows holds CI, canary release, and final release pipelines
– eslint, prettier, vitest, Husky integrate lint, format, tests, pre-commit hooks
• packages/
– Each subfolder is a library package (implements a block or hook)
– They share TS config and build tooling (tsup, vitest)
– packages/react ties everything together as React hooks/components for LLM UIs
• apps/www/
– Astro-based static site serving docs, demos, and a chat UI (pages/api endpoints)
– Uses workspace packages at design time for code samples & live components
– Bundled with Astro build, deployed via Vercel (vercel.json)
• examples/
– Minimal starter apps (Next.js & Vite) to show how to integrate llm-ui blocks
• tooling/
– Code generators for examples and new packages (template scaffolding)
README for additional insights
• Core features (streamed LLM output, custom components, markdown cleanup, Shiki syntax highlighting)
• Library is “headless”—styling is provided by consumer
• Documentation link points at the apps/www site