How priceline/design-system works
Primary Components
• Monorepo Structure & Package Management:
– Centralized configuration with Rush (rush.json, common/config/rush)
– Common tools and scripts (common/scripts, tools, and rigs directories)
• UI Component Packages:
– Supporting codemods (packages/codemods) and interoperability helpers
• Applications for Demos & Documentation:
– “apps/docs” folder, which provides the integrated documentation website (with Next.js, ESLint, etc.)
– “apps/storybook” folder used to run and display Storybook stories for live component demos
• CI/CD and Quality Assurance:
– GitHub workflows (in the .github/workflows folder) for CI/CD, publishing, and code quality (CodeQL, etc.)
– Testing and linting configurations spread throughout (e.g., .eslintrc.js, jest.config.js files)
Relationships and Interactions
• The monorepo (managed with Rush) acts as the central hub coordinating multiple component packages and shared configuration.
• The UI component packages are designed to be independent but may share common design tokens (theme files) and helper utilities. They are consumed by both the documentation site and Storybook.
• The apps (docs and Storybook) serve as demonstration and reference points for all the reusable components. They import the packages to render live examples and keep usage guidelines up to date.
• The CI/CD pipelines (via GitHub workflows) monitor code quality and execute build, test, and publish routines, ensuring the design system always meets the standards set by the project.
Architectural Patterns & Design Principles
• Modularization: Each UI element is developed in isolation (each residing in its own package) and then integrated.
• Separation of Concerns: There is a clear distinction between design artifacts (UI component packages) and presentation (documentation site and Storybook).
• Consistency & Reusability: Shared configurations, theming, and custom tools (like codemods and heft plugins) support consistent coding practices and visual language.
• Automated Quality Assurance: CI/CD tools ensure that linting, testing (unit tests and snapshots), and build processes are automated across all packages.
Relevant Technologies, Frameworks, & Tools
• React (with Storybook as the visual documentation platform)
• TypeScript/Javascript along with ESLint, Jest, and Prettier
• Build & Package Management via Rush, with supporting Babel and ESLint configurations
• GitHub Actions for CI/CD, and tools like CodeQL for security analysis
• Components:
– Monorepo & Tooling (Rush, common, tools, rigs, and GitHub workflows)
– Presentation Apps (docs site and Storybook)
• Labels and Descriptions:
• Interaction Flows:
– Illustrate the CI/CD pipeline interacting with the monorepo and triggering builds/tests.
• Visual Aids: