How ssagroup/ui-kit works
Main components
• Monorepo Structure:
• Packages: Grouped by functionality and design focus – such as core components (UI building blocks), widgets (more composite or specialized UI elements), hooks (custom React hooks), templates (layout or application-specific templates), and utils (common helper functions).
• Examples: Sub-projects like the “fitness-dashboard” that demonstrate usage of the UI kit.
• Dev and DevOps tools: Configuration files (Babel, ESLint, Prettier, Storybook, GitHub workflows), testing configurations (Jest, Playwright), and CI/CD setups.
• External integrations: Firebase integrations (in the fitness example and in package examples), Storybook for UI documentation, and Figma designs as part of the UI kit’s resources.
Relationships and interactions
• The packages/hooks supply custom hooks that allow components to manage state, perform API calls, respond to events, or provide layout logic.
• The packages/templates offer higher-level layouts and page scaffolds that utilize the core components, hooks, and widgets.
• The utilities package delivers helper functions (e.g., date manipulation, throttling, object utilities) shared across all packages.
• The example implementations (e.g., the fitness dashboard) integrate these components into complete application flows, consuming APIs (like Firebase) and wiring layout/page navigation.
• Storybook acts as both a development and documentation layer helping developers visually test and integrate the components.
Architectural patterns and design principles
• Atomic design methodology is clearly central (separating components into atoms, molecules, and organisms).
• A modular monorepo architecture using pnpm workspaces promotes reusability and separation of concerns.
• Emphasis on integration testing, static code analysis and code formatting to ensure quality.
• Separation between design (Figma), component implementation (React with TypeScript) and integration (Firebase hosting, example projects).
Technologies
• Frontend: React, TypeScript, Babel, Emotion (for styling), Storybook.
• Bundling and Build: Webpack and pnpm.
• Testing: Jest, React Testing Library, Playwright.
• Data/Backend Integration: Firebase (for hosting, storage, Firestore).
• External components/libraries: Nivo for charts, Floating UI for tooltips.