# Frontend `apps/web/` — React web UI for managing initiatives, agents, and content. ## Tech Stack | Technology | Purpose | |-----------|---------| | React 19 | UI framework | | TanStack Router | File-based routing | | tRPC React Query | Type-safe API client with caching | | Tailwind CSS | Utility-first styling | | shadcn/ui | Component library (button, card, dialog, dropdown, input, label, textarea, badge, sonner, tooltip) | | Tiptap | Rich text editor (ProseMirror-based) | | Lucide | Icon library | | Geist Sans/Mono | Typography (variable fonts in `public/fonts/`) | | react-window 2.x | Virtualized list rendering for large file trees in ReviewSidebar | ## Design System (v2) Theme spec: `docs/wireframes/v2/theme.md` - **Brand**: Indigo (#6366F1) — `--primary` is indigo, not black - **Dark mode**: 3-state toggle (light/system/dark), persisted in `localStorage('cw-theme')` - **Status tokens**: 6 semantic statuses (active/success/warning/error/neutral/urgent) with bg/fg/border/dot variants. Use `bg-status-{status}-bg`, `text-status-{status}-fg`, etc. - **Terminal tokens**: Always-dark surface for agent output. Use `bg-terminal`, `text-terminal-fg`, etc. - **Diff tokens**: `bg-diff-add-bg`, `text-diff-remove-fg`, etc. - **Shadows**: 5-level system (xs-xl). Dark mode uses inset highlights + ambient glow. - **Transitions**: `duration-fast`, `duration-normal`, `ease-default`, `ease-spring` - **Z-index**: Named scale from `z-base` to `z-tooltip` - **Radius**: 6px base (down from 8px) - **Flash prevention**: Inline `