How mendix/web-widgets works
Project type and purpose
• This is an open-source, platform-supported monorepo of reusable web widgets, modules, and shared libraries for the Mendix low-code platform.
• It includes build and release automation, CI/CD pipelines, and dozens of individual widget and module packages.
Break down the file structure into high-level components
a. Monorepo Root & Configuration
– pnpm-workspace.yaml, turbo.json, GitHub workflows (.github/workflows/*), patches/
– Houses global scripts, lockfiles, CI/CD, release configuration
b. Automation Tools
– automation/run-e2e: orchestrates Playwright/Cypress E2E tests and Docker setups
– automation/snapshot-generator: generates sample JSON snapshots
– automation/utils & automation/scripts: helper CLI tools for bumping versions, changelogs, publishing
c. Shared Libraries & Configs
– packages/shared: ESLint/Prettier configs, tsconfig presets, shared chart components, plugin kits
d. Pluggable Widgets
– packages/pluggableWidgets/*: dozens of individual widget packages (datagrid, chart, dropdown, etc.)
– Each has its own src/, tests, e2e, build config, and package.json
e. Mendix Modules
– packages/modules/*: JavaScript actions, CSS themes, modules bundling for Mendix Classic widgets
f. Custom Widgets
– packages/customWidgets/*: specialized widget packages maintained by Mendix
g. Root Package.json & Tooling
– Defines engine versions (Node/pnpm), workspace scripts (pnpm start, lint, test)
Relationships and data flows
• Shared libraries → imported by pluggableWidgets, modules, customWidgets
• Automation tools → invoke build/test scripts in each package
• CI/CD (GitHub Actions) → triggers lint/test/build/publish across all packages
• Developer workstation → uses pnpm to install, runs pnpm start/test in individual widget folders, interacts with Mendix Studio via MX_PROJECT_PATH
• npm registry or Mendix Marketplace → target for published packages
Architectural patterns
• Monorepo with pnpm workspaces + Turborepo for task orchestration
• Plugin architecture: each widget is an isolated plugin package
• Layered modularity: shared libraries at bottom, widgets/modules at mid-layer, automation and CI at top
• Standardized build/test pipelines using TypeScript, ESLint, Prettier, Jest, Playwright/Cypress, Docker