Never use — (em dash with spaces) in any Storybook story copy. This includes description text, callouts, step labels, tooltips, and any other user-facing content in .stories.tsx files.
- Use a period and a new sentence instead:
"...ownership model. Source is copied..." - Use a colon for lists or clarifications:
"Prerequisites: Node 18+, Tailwind v4" - Use a comma for light joining:
"...templates, all consistent with..."
This applies to all packages: apollo-wind, apollo-react, apollo-core, apollo-ui-icons, and the root apps/storybook introduction pages.
When working with frameworks or UI libraries (e.g., Tailwind, Shadcn, Storybook, etc.) — never rely on memory or training data.
- Always check official documentation for the latest APIs and examples.
- Use live sources (e.g., Context7 API) to fetch up-to-date references when possible.
- Trust verified sources, even for tools you already know well.
When asked "Does it make sense?", "What do you think?", or given a statement or plan — never assume it's correct.
- Always analyze and validate logic before agreeing.
- Push back on mistakes or weak reasoning.
- Give a short, reasoned explanation instead of simple approval.
- If uncertain, state assumptions and what extra info you need to confirm.
Before making meaningful changes, propose and confirm a plan first.
- Small safe edits (e.g., formatting, lint, typo) are fine directly.
- Discuss first for any major change — type fixes, refactors, new features, or behavior changes.
- Present what you'll change and why before acting.
- Once agreed, follow the plan and summarize results after.
When facing an unexpected error or ambiguous situation, never act on guesses.
- Analyze first: form hypotheses and note confidence levels.
- Diagnostics only: run safe, read-only checks (logs, dry-runs), no side effects.
- Report back: explain what happened, root cause, and possible solutions.
- Get approval, then act: execute the agreed fix and confirm results.
Use a fixup/rebase workflow to keep commits clean and meaningful.
- Don't stack fix commits: Avoid adding new commits just to "fix the previous thing."
- Use fixup or amend: When correcting a recent change, use
git commit --amendorgit commit --fixupfollowed bygit rebase --autosquash. - Squash before PR: Combine related changes into cohesive commits that make sense as standalone units.
- Force push feature branches: After rebasing, use
git push --force-with-leaseto update the remote branch. - Each commit should be meaningful: A commit should represent a complete, logical change — not a partial fix or correction.
No new styled-components (Emotion) or direct MUI component usage in apollo-react.
The package is actively migrating from Emotion (@emotion/styled, @emotion/react) and raw MUI components to Tailwind CSS classes via apollo-wind. All new code must follow the new patterns:
- Do not import from
@emotion/styled,@emotion/react, or usestyled.*/csshelpers - Do not create new
*.styles.tsfiles - Do not introduce new MUI component imports (
@mui/material/*) for building UI — existing MUI theme overrides intheme/are exempt - Do not use
Ap*components from@uipath/apollo-react(these are MUI wrappers) — useapollo-windcomponents instead - Do use Tailwind utility classes (static literal strings in JSX)
- Do use
cn()from@uipath/apollo-windonly when classes conflict/override - Do use CSS custom properties for dynamic dimensions (Pattern B from migration guide)
When significantly editing an existing component that uses styled/MUI patterns, migrate that component to Tailwind as part of the change. Use the /migrate-canvas-styled-to-tailwind skill for guidance.
For the full migration patterns and reference examples, see .claude/skills/migrate-canvas-styled-to-tailwind/SKILL.md.
Apollo v.4 is an open-source design system for UiPath, built to provide a unified component library for both internal and external consumers. This monorepo contains design tokens, utilities, and framework-specific implementations (React, Web Components).
- Open-source: Public repository for internal and external adoption
- Framework-optimized: First-class React support with shared design tokens
- Simplified architecture: Clear separation between core tokens and framework implementations
- Enhanced DX: Easier contributions, predictable releases, comprehensive documentation
- AI-assisted workflows: Integration with AI tools for contribution guidance and development
This is the UiPath/apollo-ui public repository - the open-source design system for UiPath's component library.
- Turborepo: Monorepo management with caching and parallel task execution
- TypeScript: Type-safe development across all packages
- Biome: Fast, unified linter and formatter for code quality and consistency
- Changesets or Semantic-release: Version management and release automation
- React: Primary component library with Material UI theming (Material is legacy — migrating to Tailwind/apollo-wind)
- Web Components: Cross-framework components using standard web APIs
- Tailwind CSS + shadcn/ui: Modern styling approach (apollo-wind package)
- Storybook 10: Component documentation and visual testing
- Playwright: Visual regression testing
- Unit tests: Component behavior verification
- GitHub Actions: CI/CD automation
apollo-ui/
├── .github/
│ └── workflows/ # CI/CD pipelines
│ ├── ci.yml # Lint, test, build
│ ├── visual-regression.yml
│ └── publish.yml # NPM publishing
│
├── apps/ # Development applications
│ ├── storybook/ # Storybook documentation
│
├── packages/ # Core + framework packages
│ ├── apollo-core/ # Design tokens (fonts, colors, spacing)
│ ├── apollo-ui-icons/ # SVG icon set
│ ├── apollo-react/ # React components + Material UI theme
│ └── apollo-wind/ # Tailwind/shadcn implementation
│
├── web-packages/ # Cross-framework web components
│ ├── ap-chat/ # Chat component (web component)
│
├── turbo.json # Turborepo configuration
├── package.json # Root package.json with workspaces
├── tsconfig.json # Base TypeScript configuration
├── biome.json # Biome configuration (linter & formatter)
└── CLAUDE.md # This file - architecture documentation
- Purpose: Design system foundation - tokens, icons, fonts, CSS variables
- Exports:
- Design tokens (colors, typography, spacing, shadows, etc.)
- Icon library
- Font assets
- CSS custom properties
- No dependencies on React
- Purpose: React component library with Material UI theming
- Dependencies: React, Material UI (legacy; new code uses Tailwind via apollo-wind), apollo-core
- Structure:
apollo-react/ ├── src/ │ ├── components/ # Ap* components (ApButton, ApTextField, etc.) │ ├── theme/ # Material UI theme overrides │ ├── core/ # Re-export apollo-core │ └── index.ts # Main exports ├── package.json └── tsconfig.json - Exports:
components: All Ap* React componentscore: Re-exported apollo-core tokenstheme: Material UI theme overrides (apolloMaterialUiThemeDark, apolloMaterialUiThemeLight)
- Purpose: Tailwind CSS + shadcn/ui implementation for modern React apps
- Dependencies: React, Tailwind CSS, apollo-core
- Structure:
apollo-wind/ ├── src/ │ ├── components/ # Tailwind-based components │ ├── lib/ # shadcn/ui utilities │ └── index.ts ├── tailwind.config.js # Tailwind configuration with Apollo tokens ├── package.json └── tsconfig.json
- Purpose: Chat interface as a web component
- Technology: Web Components (Custom Elements)
- Exports:
<ap-chat>custom element
apollo-core (tokens, icons, fonts)
↓
├─→ apollo-react (React + MUI)
│ └─→ ap-chat (Web Component)
└─→ apollo-wind (Tailwind + shadcn)
- React components:
Apprefix (e.g.,ApButton,ApTextField) - Web components:
ap-prefix (e.g.,<ap-chat>)
- Primitives/Atoms: Simple, composable building blocks (buttons, inputs, text)
- Complex components: Feature-rich components (chat interfaces)
- Theme overrides: Primary consumption pattern for existing Material UI apps
React packages (apollo-react) export:
- Components: All public components
- Core: Design tokens (re-exported from apollo-core)
- Theme: Theme customization objects (Material UI overrides)
Other packages export only what's relevant to their purpose (e.g., web components export custom elements only).
// Import CSS variables
import '@uipath/apollo-react/core/theme.css';
// Import components
import { ApButton, ApTextField } from '@uipath/apollo-react/components';
// Import tokens
import { ColorOrange500, SpacingMd } from '@uipath/apollo-react/core';
// Import theme
import { apolloMaterialUiThemeDark } from '@uipath/apollo-react/theme';- Colors: Semantic colors (primary, secondary, success, error, etc.)
- Typography: Font families, sizes, weights, line heights
- Spacing: Consistent spacing scale (xs, sm, md, lg, xl, etc.)
- Shadows: Elevation system for depth
- Borders: Border radii and widths
- Z-index: Layering system
- Icons: SVG icon library
- CSS Custom Properties:
--color-primary-500 - TypeScript/JavaScript:
ColorPrimary500 - SCSS Variables:
$color-primary-500
- Figma as source of truth
- Automated sync via Figma plugin (e.g., Tokens Studio) or Figma API + GitHub Actions
- Plugins can automatically create PRs when design tokens are updated in Figma
- Generated token files stored in
apollo-core - Consumed by all framework packages
- Identify which package (apollo-react, or web-packages)
- Create component following naming conventions
- Use design tokens from apollo-core
- Write Storybook stories
- Add unit tests
- Add visual regression tests
- Document usage and API
Each package must include:
package.jsonwith proper exports and dependenciestsconfig.jsonextending root configurationREADME.mdwith usage instructionssrc/directory with source codedist/directory for build output (gitignored)
- Component files: PascalCase (e.g.,
ApButton.tsx) - Utility files: camelCase (e.g.,
formatDate.ts) - Test files:
*.test.tsor*.spec.ts - Story files:
*.stories.tsx
build: Build all packageslint: Lint all packagestest: Run unit teststest:visual: Run visual regression testsstorybook:build: Build Storybook documentationdev: Development mode with hot reload
- Lint (Biome + TypeScript type checking)
- Unit tests
- Build verification
- Visual regression tests (Playwright)
- Package publishing to NPM (on version bump)
- Storybook deployment
- GitHub release creation
- Changesets (recommended): Manual changelog curation with automated versioning
- Or Semantic-release: Automatic versioning based on commit messages
- Versioned together or independently per package (TBD)
- Test component behavior and logic
- Test utility functions
- Aim for >80% code coverage
- Playwright-based screenshot comparison
- Test all component variants and states
- Run on PRs to catch visual regressions
- Document all component variants
- Serve as visual test cases
- Interactive documentation for consumers
- Setup monorepo structure
- Migrate core tokens to apollo-core
- Establish React components (apollo-react)
- Complete React component library
- Migrate web components to web-packages
- Internal adoption
- Documentation and examples
- Open-source release
- Defines workspaces for all packages
- Shared devDependencies (TypeScript, Biome, Turborepo)
- Root scripts for common tasks
- Pipeline definitions for tasks
- Cache configuration
- Task dependencies
- Base TypeScript configuration
- Extended by all packages
- Strict mode enabled
- Unified linting and formatting configuration
- Enforces code quality and style consistency
- Fast, zero-config tooling for the entire monorepo
- Figma as single source of truth for design tokens
- Automated synchronization options:
- Tokens Studio (Figma Tokens plugin) with GitHub sync
- Figma API + GitHub Actions to create PRs on token changes
- Style Dictionary for token transformation and multi-platform export
- MCP integration (optional future enhancement)
- Workflow: Design token updates in Figma → Automated PR creation → Review and merge → Tokens available in
apollo-core
- Automated CI/CD
- PR checks and validations
- Release automation
- Follows naming conventions (Ap* prefix)
- Uses tokens from apollo-core
- Includes TypeScript types
- Has Storybook story
- Has unit tests
- Has visual regression tests
- Documented in package README
- Descriptive title and description
- Tests pass
- No linting errors
- Visual regression tests pass
- Changeset added (if applicable)
- Architecture Document: Apollo v.4 Architecture
- Turborepo Docs: https://turbo.build/repo/docs
- Storybook Docs: https://storybook.js.org/
- Material UI: https://mui.com/
See DESIGN-CONTEXT.md for UX principles, personas, and Apollo Vertex design system constraints used by the Vertical Solutions design team.