Tool UI is a Next.js 16 documentation/demo site and copy-paste component library for AI assistant interfaces. The app lives in apps/www/ within a pnpm monorepo. There is no database, no Docker, and no required background services beyond the Node.js dev server.
- Dev server:
pnpm dev(Turbopack, port 3000). The static docs, gallery, and component previews work without any API keys. - Chat/Playground features require
OPENAI_API_KEYin.env(see.env.example). Without it the chat API routes return errors, but the rest of the site functions normally.
All standard commands are documented in CLAUDE.md. Key ones:
| Task | Command |
|---|---|
| Dev server | pnpm dev |
| Lint + typecheck + format | pnpm check |
| Tests (Vitest) | pnpm test |
| Fix lint issues | pnpm lint:fix |
| Typecheck only | pnpm typecheck |
- Typecheck uses
tsgo(@typescript/native-preview), not standardtsc. Thepnpm typecheckcommand runstsgo --noEmit. - Formatter is
oxfmt, not Prettier. Runpnpm formatto format orpnpm format:checkto verify. It handles Tailwind class sorting and import sorting. - Linting is split:
oxlinthandles standard rules;eslintis retained only forno-restricted-syntax,no-restricted-imports, customtool-ui/*rules, and React Compiler hooks.pnpm checkruns both in parallel. pnpm installtriggerspreparewhich sets up git hooks viatsx apps/www/scripts/install-git-hooks.ts. The hooks directory is.githooks/.- Pre-existing lint warnings (60 warnings, 0 errors): these are known oxlint a11y warnings in the codebase and are not regressions.
- Build uses
--experimental-build-mode=compile:pnpm buildrunsnext build --experimental-build-mode=compile.