OVERVIEW

Metadata-driven platform元数据驱动的平台

Swap one definition JSON and a full L1…Ln document stack appears — loading, saving, building tables — with zero bespoke code. The front-end monorepo works in lockstep with the cmx-container Rust back-end. 换一份定义 JSON,即得完整的 L1…Ln 单据装载/回存/建表能力,零专属代码。前端 monorepo 与 cmx-container Rust 后端紧密配合。

🧠

Metadata-first元数据优先

One definition JSON drives document loading, saving, table creation, form rendering, validation, and column layout. Change the definition; every layer follows. 一份定义 JSON 驱动单据装载、回存、建表、表单渲染、校验和列布局。修改定义,每一层自动跟随。

🔌

Framework-free components框架无关组件

All 35 data components are pure custom elements — no React, Vue, or Angular required. They embed in any host: the portal, the designer, or your own page. 35 个数据组件均为纯自定义元素,不依赖 React / Vue / Angular,可嵌入任意宿主:门户、设计器或你自己的页面。

🏗️

Co-hosted build同源托管构建

Portal, designer, and shared runtime all build to a single dist/ tree that the Rust web-server serves as one origin — no CORS, no cross-site tokens. 门户、设计器与共享运行时均构建到同一 dist/ 目录,由 Rust web-server 以单一来源托管——无 CORS,无跨站 token 问题。

ARCHITECTURE架构

Front-end ↔ Back-end前端 ↔ 后端

The npm workspace monorepo pairs with a fleet of Rust microservices. Both sides speak the same metadata contract. npm workspace monorepo 与一支 Rust 微服务矩阵配对。双方遵循同一份元数据契约。

presentationpresentation

npm workspace monoreponpm workspace monorepo

CMXPortalManager /portal/
CMXHTMLDesigner /html/
cmx-data-comp 35 WCs src/
cmx-ui5-runtime /shared/

Rust microservice fleetRust 微服务矩阵

independent workspaces · one shared lib独立 workspace · 共享公用库

cmx-portalservice portal :8080
cmx-flowengine workflow :8091
cmx-report reports :8092
cmx-model · cmx-mdm meta · MDM :8093/95
cmx-rulesengine decisions :8094
cmx-container shared lib公用库 lib库
FRONT-END MONOREPO前端 MONOREPO

Four pieces, one origin四件一体

🏛️ CMXPortalManager
UI5 WC v2 Vite 8 Lit
The runtime portal served at /portal/. Handles page routing, navigation, session management, and hosts the metadata-driven workspaces for documents (DOC), data dictionaries (DCT), reports (RPT), and workflows (FLOW). Built with SAP UI5 Web Components v2 and Vite 8 / Rolldown; vendor chunks are split per library (tabulator, revogrid, ignite, lit, shiki…) so the portal shell loads fast while heavy features lazy-load. 运行于 /portal/ 的门户运行时。处理页面路由、导航、会话管理,承载元数据驱动的单据(DOC)、字典(DCT)、报表(RPT)和流程(FLOW)工作台。基于 SAP UI5 Web Components v2 与 Vite 8 / Rolldown 构建,按库拆分 vendor chunk(tabulator / revogrid / ignite / lit / shiki……),门户壳快速加载,重功能懒加载。
🎨 CMXHTMLDesigner
CodeMirror 6 Vite 8 Zod
Visual HTML page designer served at /html/. Drag-drop page composition, live preview, full integration with cmx-data-comp components, and a CodeMirror 6 editor for direct code editing. Schemas validated with Zod; test coverage via Vitest (~108 cases). 运行于 /html/ 的可视化 HTML 页面设计器。拖拽页面组合、实时预览,完整集成 cmx-data-comp 组件,以及用于直接代码编辑的 CodeMirror 6。Schema 由 Zod 校验,测试覆盖使用 Vitest(约 108 用例)。
🧩 cmx-data-comp
35 elements
The shared data component library — 35 framework-free custom elements consumed by both Portal Manager and HTML Designer. Includes master-slave coordinator (CmxMasterSlave), column model (CmxColumnModel), data set (CmxDataSet), grids, forms, dict-select, formula editor, KPI cards, and more. Exposed as ESM source; ~616 Vitest unit tests. 共享数据组件库——35 个框架无关自定义元素,被门户管理器与设计器共同消费。包含主从协调器(CmxMasterSlave)、列模型(CmxColumnModel)、数据集(CmxDataSet)、表格、表单、字典选择、公式编辑器、KPI 卡片等。以 ESM 源码形式暴露;约 616 个 Vitest 单元测试。
⚙️ cmx-ui5-runtime
UI5 WC v2 Tabler Icons
Shared SAP UI5 + Tabler runtime bundle served at /shared/. Built once and consumed by both Portal Manager and HTML Designer — no duplicate loads, no version drift. Provides all UI5 web component registrations, icon packages, localization, and theming. 共享 SAP UI5 + Tabler 运行时 bundle,运行于 /shared/。一次构建,被门户管理器与设计器共同消费——无重复加载,无版本漂移。提供全部 UI5 Web Component 注册、图标包、本地化与主题支持。
BUILD构建

One command to ship一条命令出产物

Full build全量构建

npm run build:apps
# runtime → portal → designer
# portal ~5s, designer ~27s (Rolldown)

Test suite测试套件

npm test
# cmx-data-comp  ~616 cases
# cmx-html-designer ~108 cases

Meet the service fleet认识后端服务矩阵

Six independent Rust microservices power the back-end — portal, flow, rules, report, model, and master data. See each one in depth, or browse the components. 六个独立的 Rust 微服务支撑后端——门户、流程、规则、报表、模型与主数据。逐个深入了解,或浏览组件库。