Siemens Industrial Experience (IX)

July 21, 2026 · View on GitHub

This document gives new contributors (humans and AI agents) a concise, high‑leverage overview of how the monorepo is structured, how code flows from source to published packages, and which tooling & conventions are critical for productive changes.

TL;DR: packages/core (Stencil Web Components) is the source of truth. All framework packages are generated façades around those components. Always change Core first, then build.


1. High-Level Architecture

LayerPurposeTechNotes
Core ComponentsSource of truth UI primitives & patternsStencil, TS, SCSSEmits compiled Web Components + type metadata
Framework WrappersConvenience bindings for app frameworksStencil output targets (Angular, React, Vue)Auto-generated – never hand-edit generated proxies
Theming PackagesExternal lib theme alignment@siemens/ix-aggrid, @siemens/ix-echartsProvide CSS vars + integration helpers
Test AppsManual preview & doc example source*-test-app packagesTheir preview-examples become docs snippets
Documentation GeneratorConverts examples & JSDoc to docs site assetspackages/documentationOutput consumed by separate ix-docs repo
Tooling / InfraBuild orchestration & automationTurborepo + pnpm + ChangesetsEnsures incremental builds & release versioning

Data / Build Flow

  1. Edit component in packages/core/src/components/<name>
  2. Run pnpm build – Stencil compiles components & emits:
    • Dist web components bundle
    • Type definitions & metadata (component-doc.json)
    • Generated framework wrapper source into each wrapper package
  3. Framework packages (React / Angular / Vue) bundle their wrapper APIs
  4. Test apps & Storybook consume built packages (symlinked via pnpm workspaces)
  5. Visual regression & component tests run against the built artifacts
  6. Changesets version bump triggers publication & regeneration of wrappers

2. Monorepo Structure (Essentials)

packages/
  core/                # Stencil components (author here)
  react/               # Auto-generated React wrappers (do not manually modify generated proxies)
  angular/             # Angular module-based wrappers
  vue/                 # Experimental Vue wrappers
  aggrid/              # AgGrid theme integration
  echarts/             # ECharts theme integration & helpers
  documentation/       # Doc site asset pipeline (example extraction, JSON metadata)
  *-test-app/          # Preview & example sources (examples -> docs)
  storybook-docs/      # Storybook configuration & stories

Supporting roots:

  • component-doc.json – Generated design tokens & component metadata from core (used for docs & wrappers)
  • .changeset/ – Release intent & pre-release state
  • playwright.config.ts – Shared test configuration

3. Toolchain & Key Commands

ConcernCommand(s)Notes
Installpnpm installpnpm workspaces managed via root lockfile
Dev Componentspnpm storybookHot reload for core components
Preview Framework Examplespnpm start --filter react-test-app (or other test app)Navigate to /preview/* routes
Build Allpnpm buildRequired before any tests │
Build Singlepnpm build --filter @siemens/ixCore only (still regenerates wrappers)
Lintpnpm lintUse before commits
Unit Testspnpm test or pnpm test --filter @siemens/ix-reactCore uses Jest; React uses Vitest
Visual Regressionpnpm build --filter !documentation && pnpm visual-regressionNeeds Docker + playwright image
Generate Changesetpnpm changesetAdd semver intent (patch/minor/major)
Docs Sync (examples)Build + run docs pipelineExamples auto-generated from test apps

Framework Tests and Preview Examples

packages/html-test-app/src/preview-examples/*.html is the source list for framework test IDs. When adding or renaming an HTML preview example, run pnpm --filter framework-tests build from the repository root before adding or validating matching Angular, React, or Vue preview variants.

The build regenerates files under testing/framework-tests/tests/generated/, including test-ids.autogenerated.ts, snapshot tests, axe tests, and generated indexes. Do not hand-edit generated files; update testing/framework-tests/src/main.ts instead if generation behavior needs to change.

Preview example changes can affect accessibility tree snapshots in testing/framework-tests/__snapshots__/*.yaml. Add or update the matching *-aria-snapshot.yaml files when a generated snapshot test changes.

Stencil Build Outputs

  • dist/ bundles
  • Custom elements manifest / metadata consumed for wrappers & docs
  • Auto-generated proxies: look for comments like /* auto-generated react proxies */

4. Component Authoring Guidelines

AspectGuideline
NamingKebab-case folder & tag: ix-button-group
File Set<tag>.tsx, <tag>.scss, tests (.ct.ts), README or inline JSDoc
PropsUse @Prop() with explicit types & default values
EventsUse @Event() with semantic names (no DOM-leaking implementation details)
StylingSCSS with design tokens / CSS vars; avoid hard-coded colors
AccessibilityProvide ARIA attributes & keyboard interactions consistent across frameworks
ThemingConsume CSS custom properties; never duplicate theme tokens
TestsAt least one unit spec per new prop/behavior; add visual test if UI change is significant

5. Testing Strategy Summary

Test TypeLocation / PatternRunnerPurpose
Component (Interactive)*.ct.tsPlaywright Component TestingBehavioral & interaction flows
Visual Regression*.e2e.ts (visual-testing workspace)Playwright in DockerCross-theme pixel diffs

Execution order recommendation: Build -> Component -> Visual.


6. Theming System

  • Theme SCSS under packages/core/scss/theme/
  • Exposes design tokens as CSS variables (light/dark)
  • Consumers switch themes by applying a theme class to the root element
  • External library theme packages (aggrid, echarts) remap or extend these tokens so third-party widgets visually align

7. Framework Wrapper Details

FrameworkMechanismSpecial Notes
ReactGenerated proxies + hooks for SSR safetyDo not edit generated files; add manual helpers in dedicated, non-generated paths
AngularOutput target produces NgModule + (optionally) standalone exportsKeep Angular versions aligned; build triggers regeneration
VueExperimental wrappers via ViteAPI surface may change; treat as unstable

Regeneration triggers on every pnpm build of core.


8. Release & Versioning

  • Managed by Changesets; each changeset selects semver bump per affected package
  • Snapshot releases: comment /release:pr on a PR (CI creates pre-release dist for testing)
  • Version bump pipeline re-runs Stencil to ensure wrappers updated
  • Keep changesets small & scoped (group only logically related changes)

9. Automation & CI (Conceptual)

Although CI config lives outside this summary, typical pipeline steps:

  1. Install (pnpm) & cache
  2. Lint & type check
  3. Build core + wrappers
  4. Run unit & component tests
  5. (Optional) Visual regression (only on demand / nightly)
  6. Changesets publish (on main merges) -> NPM registry

10. Decision Log Pointers

If introducing architectural changes, accompany PR with:

  • Rationale (problem / constraints / considered alternatives)
  • Impacted packages & public APIs
  • Migration notes (if breaking) Add a note in BREAKING_CHANGES.md for any breaking API change.

11. Typical Contribution Flow (Cheat Sheet)

git switch -c feat/new-component
pnpm install
pnpm storybook   # develop core component
# edit core component files
pnpm build       # regenerates wrappers
pnpm test --filter @siemens/ix
pnpm test --filter @siemens/ix-react  # if wrapper usage affected
pnpm lint
# (optional) visual regression if UI surfaces changed
pnpm changeset   # declare version bump intent
git commit -am "feat(core): add <component>"
PR -> review -> merge

12. Conventions & Gotchas

  • NEVER directly modify generated framework proxy files (look for auto-gen comment)
  • Always run a build before tests relying on generated artifacts
  • Keep props/events minimal & stable; prefer composition over config explosion
  • Document new props/events via JSDoc – docs generator consumes them
  • Avoid bundling large third-party libs inside core components; integrate via external packages if needed

13. For AI / Automation Agents

Provide structured outputs:

  • When adding components: ensure folder, TSX, SCSS, spec test scaffold
  • Run pnpm build after modifications to regenerate wrappers before editing wrapper-adjacent helpers
  • Validate no lint errors (pnpm lint) before committing
  • Summarize changes referencing impacted packages & whether public APIs changed

14. References


If something is unclear or you need deeper technical context, open an issue or start a discussion thread. Happy building! 🎉