This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Install dependencies
npm install
# Build all packages
npm run build --workspaces
# Test all packages (requires build first)
npm run test --workspaces
# Test single package
npm run test --workspace @atomicjolt/atomic-elements
# Watch tests for a specific package
npm run test:watch --workspace @atomicjolt/atomic-elements
# Update test snapshots
npm run test:update --workspace @atomicjolt/atomic-elements# Run the interactive playground
npm run playground
# Start Storybook development server
npm run storybook:dev
# Start documentation development server
npm run docs:start# Create a new changeset for package changes
npx changeset
# Check changeset status
npx changeset status
# Version packages based on changesets
npx changeset version
# Publish new package versions
npx changeset publish# Create new component in atomic-elements
npm run scaffold:component
# Create new package
npm run scaffold:packageThis is a monorepo containing multiple NPM packages maintained by Atomic Jolt, built with:
- Workspaces: npm workspaces for monorepo management
- Build tools: Rollup (packages), Vite (dev/playground), TypeScript
- Testing: Vitest with jsdom environment
- Documentation: Storybook + Docusaurus
- Components: React with styled-components, React Aria, React Stately
Main packages (all in packages/ directory):
atomic-elements- Core React component library with design systematomic-fuel- Redux utilities and React components for LTI applicationshooks- Reusable React hooksforms- Form components and utilitieslti-client- LTI client-side utilities and componentslti-server- LTI server-side utilities and validationlti-components- LTI-specific React componentslti-types- TypeScript types for LTIcanvas-client- Canvas API client utilities
packages/atomic-elements/src/components/- All UI components organized by category (Buttons, Fields, Layout, etc.)packages/atomic-elements/src/styles/- Design system tokens, themes, and styling utilitiespackages/atomic-elements/src/hooks/- Component-specific hooks.storybook/- Storybook configuration and utilitiesplayground/- Interactive development environmenttemplates/- Scaffolding templates for new components and packagesdocs/- Documentation source files (Docusaurus)
Components follow a consistent structure:
ComponentName.component.tsx- Main component implementationComponentName.styles.ts- Styled-components stylingComponentName.context.ts- React context (if needed)ComponentName.stories.tsx- Storybook storiesComponentName.spec.tsx- Vitest testsComponentName.types.ts- TypeScript types (if complex)index.tsx- Public exports
- Each package has its own
tsconfig.build.jsonand build configuration atomic-elementsuses Rollup to generate both ESM and CJS outputs- Path aliases configured in
vite.config.tsfor easier imports (@components, @hooks, @styles, @utils) - TypeScript with strict mode enabled
- Components built with React 18/19 compatibility
- Vitest for all testing with jsdom environment
- React Testing Library for component testing
- Each package has individual test configuration
- Shared test setup in
vitest.setup.tsfiles - Build packages before running tests to ensure proper imports