A comprehensive design system built with React, TypeScript, and SCSS, utilizing a monorepo architecture with Yarn workspaces and Lerna.
The repository consists of the following packages:
@ds.ee/scss: Core SCSS variables, mixins, and foundation styles@ds.ee/react: React components built using@ds.ee/scss@ds.ee/foundation: Shared constants and foundation elements@ds.ee/playgrounds/react: Development playground for testing components
Components are organized following the Atomic Design methodology:
- Atoms: Basic building blocks (Text, Color, Margin)
- Molecules: Combinations of atoms (Select, Accordion)
- Organisms: Complex UI components (coming soon)
- Templates: Page-level layouts (coming soon)
- Pages: Specific implementations (coming soon)
The project uses:
- Yarn Workspaces: Manages dependencies and enables package symlinks
- Lerna: Handles versioning and publishing
- Rollup: Bundles the React components
- Storybook: Component development and documentation
- Install dependencies:
yarn install- Build all packages:
yarn build- Start development:
yarn dev- Run tests:
yarn testyarn build: Build all packagesyarn dev: Start development modeyarn test: Run testsyarn publish: Test, build, and publish packagesyarn commit: Use commitizen for conventional commitsyarn test:chromatic: Run visual regression testsyarn build:storybook: Build Storybook documentation
Components are built with:
- TypeScript for type safety
- React for UI
- SCSS for styling
- Jest and React Testing Library for testing
- Storybook for development and documentation
The system uses a three-layer approach:
-
System Variables (
_variables.scss)- Basic design tokens (colors, typography, spacing)
- Example:
$green: #5ece7b
-
Root Variables (
_root.scss)- CSS custom properties
- Can be overridden for theming
-
Component Styles
- BEM methodology
- Scoped to component
Components are tested using:
- Jest for unit testing
- React Testing Library for component testing
- Chromatic for visual regression testing
- Storybook for interactive testing