{"id":13515631,"url":"https://github.com/alibaba/scalable-form-platform","last_synced_at":"2025-07-24T21:36:51.435Z","repository":{"id":65493202,"uuid":"232250553","full_name":"alibaba/scalable-form-platform","owner":"alibaba","description":"A solution for building dynamic web forms with visual editor","archived":false,"fork":false,"pushed_at":"2020-08-03T12:58:32.000Z","size":1316,"stargazers_count":116,"open_issues_count":4,"forks_count":25,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-27T07:44:40.990Z","etag":null,"topics":["ant-design","ant-design-mobile","form","javascript","json","json-schema","node","react","solution","ui","ui-components","web"],"latest_commit_sha":null,"homepage":"https://scalable-form-platform.github.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alibaba.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-07T05:37:55.000Z","updated_at":"2025-03-24T07:56:57.000Z","dependencies_parsed_at":"2023-01-26T02:31:55.990Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/scalable-form-platform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alibaba/scalable-form-platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fscalable-form-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fscalable-form-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fscalable-form-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fscalable-form-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/scalable-form-platform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Fscalable-form-platform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264229233,"owners_count":23576237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ant-design","ant-design-mobile","form","javascript","json","json-schema","node","react","solution","ui","ui-components","web"],"created_at":"2024-08-01T05:01:13.796Z","updated_at":"2025-07-24T21:36:51.393Z","avatar_url":"https://github.com/alibaba.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# scalable-form-platform\n基于动态表单协议（[JSON Schema](http://json-schema.org/)）的表单解决方案，提供了基于 [ant-design](https://github.com/ant-design/ant-design) 和 [ant-design-mobile](https://github.com/ant-design/ant-design-mobile) 的前端表单渲染引擎sdk、可视化表单编辑器和可独立部署镜像。\n\nA solution for editing and publish dynamic web forms with visual editor, providing react components for rendering web forms from [JSON schema](http://json-schema.org/) using [ant-design](https://github.com/rjsf-team/react-jsonschema-form) or [ant-design-mobile](https://github.com/ant-design/ant-design-mobile), an visual editor component to edit dynamic form json schema and an server library helping you build an dynamic form system.\n\n![GitHub](https://img.shields.io/github/license/alibaba/scalable-form-platform?style=flat)\n![npm](https://img.shields.io/npm/v/scalable-form-antd?color=blue\u0026style=flat)\n[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/lvshuncn/scalable-form-platform)](https://hub.docker.com/r/lvshuncn/scalable-form-platform)\n![Travis (.org)](https://api.travis-ci.com/alibaba/scalable-form-platform.svg?branch=daily%2F0.0.2)\n![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)\n![GitHub last commit](https://img.shields.io/github/last-commit/alibaba/scalable-form-platform?style=flat)\n![GitHub issues](https://img.shields.io/github/issues/alibaba/scalable-form-platform)\n\n查看文档 [https://scalable-form-platform.github.io/#/](https://scalable-form-platform.github.io/#/)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://scalable-form-platform.github.io/\" target=\"_blank\"\u003e\n    \u003cimg max-width=\"1440\" src=\"https://img.alicdn.com/tfs/TB1MnB9z7Y2gK0jSZFgXXc5OFXa-1440-900.png\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## ✨ 特性/features\n- 🛳 企业级解决方案和高稳定性\n- 📦 开箱即用的动态表单渲染sdk\n- ⚙️ 完整的开发工具支持\n- 🗄 服务端支持和用于管理表单的可独立部署站点\n\n\u003cbr /\u003e\n\n- 🛳 Enterprise-class Solutions for web form\n- 📦 A set of high-quality react components for rendering web forms from JSON schema out of the box\n- ⚙️ Whole package of development tools\n- 🗄 Server support and independently deployable sites\n\n\u003cbr /\u003e\n\n- 更多特性请查看文档 [https://scalable-form-platform.github.io/#/](https://scalable-form-platform.github.io/#/)\n\n## 📦 包管理/Packages\n我们使用[Lerna](https://github.com/lerna/lerna)来进行包管理，所以本仓库会发布多个包到npm，包括：\n\nThis repository is a monorepo that we manage using [Lerna](https://github.com/lerna/lerna). That means that we actually publish several packages to npm from the same codebase, including:\n\n|  Package | NPMVersions  | Documents  | Description  |\n|  ----  | ----  | ----  | ----  |\n| scalable-form-antd  | [![npm](https://img.shields.io/npm/v/scalable-form-antd.svg?color=blue\u0026style=flat)](https://www.npmjs.com/package/scalable-form-antd) | [![](https://img.shields.io/badge/API%20Docs-site-green.svg?style=flat)](https://scalable-form-platform.github.io/#/zh/scalable_form_antd) | 基于react-jsonschema-form，结合ant-design的动态表单渲染sdk |\n| scalable-form-antd-mobile  | [![npm](https://img.shields.io/npm/v/scalable-form-antd-mobile.svg?color=blue\u0026style=flat)](https://www.npmjs.com/package/scalable-form-antd-mobile)|[![](https://img.shields.io/badge/API%20Docs-site-green.svg?style=flat)](https://scalable-form-platform.github.io/#/zh/scalable_form_antd_mobile)| 基于react-jsonschema-form，结合ant-design-mobile的动态表单渲染sdk，适用于移动端的渲染sdk |\n| scalable-form-editor  | [![npm](https://img.shields.io/npm/v/scalable-form-editor.svg?color=blue\u0026style=flat)](https://www.npmjs.com/package/scalable-form-editor) | [![](https://img.shields.io/badge/API%20Docs-site-green.svg?style=flat)](https://scalable-form-platform.github.io/#/zh/scalable-form-editor)| 表单可视化编辑器，可视化编排表单，产出scalable-form-antd和scalable-form-antd-mobile可用的schema |\n| scalable-form-server  | [![npm](https://img.shields.io/npm/v/scalable-form-server.svg?color=blue\u0026style=flat)](https://www.npmjs.com/package/scalable-form-server) | [![](https://img.shields.io/badge/API%20Docs-site-green.svg?style=flat)](https://scalable-form-platform.github.io/#/zh/%E4%BD%BF%E7%94%A8Node)| 服务端sdk，用户可以基于scalable-form-server保存表单配置。服务端sdk提供一个可用的表单站点，提供表单编排，表单管理，表单投放，数据回流分析的能力。 |\n\n## ⛳️ 快速上手\n我们从一个例子快速开始，在这个例子中，我们会渲染一个表单，表单支持用户填写自己的名字（name字段）。\n\n### 使用scalable-form-antd渲染表单\n\u003e [scalable-form-antd](https://www.npmjs.com/package/scalable-form-antd)会根据表单描述协议（JSONSchema），使用ant-design组件渲染表单。\n```bash\nnpm i scalable-form-antd -S\n```\n\n使用scalable-form-antd，我们需要针对表单需求写一下表单描述（schema），并且将schema作为scalable-form-antd的props传入。\n\u003e 您可能觉得写这个schema很繁琐，不过放心，Scalable Form的一大创新就是支持使用可视化的编排组件 [scalable-form-editor](https://www.npmjs.com/package/scalable-form-editor) 来搭建生成这个schema，完全不需要您手动书写，下文中，您会了解如何使用这个editor。\n\n```jsx harmony\nimport React from \"react\";\nimport \"./styles.css\";\nimport ScalableForm from \"scalable-form-antd\";\n\n// 这个例子，使用scalable-form-antd渲染了一个表单\nexport default class FormExample extends React.PureComponent {\n  constructor(props) {\n    super(props);\n    this.state = {\n      formData: {\n        name: \"\"\n      }\n    };\n\n    // 规则jsonSchema，用于描述表单字段信息，包括字段类型，长度等\n    this.jsonSchema = {\n      title: \"Scalable Form render sdk with Ant Design components\",\n      description: \"\",\n      type: \"object\",\n      required: [\"name\"],\n      properties: {\n        name: {\n          type: \"string\",\n          title: \"名称\",\n          default: \"\",\n          maxLength: 15\n        }\n      }\n    };\n\n    // 规则uiSchema，用于描述表单UI组件信息，包括输入框的placeholder等字段\n    this.uiSchema = {\n      name: {\n        \"ui:help\": '关于\"名称\"字段的帮助说明',\n        \"ui:options\": {\n          placeholder: \"请输入名称\"\n        }\n      }\n    };\n  }\n\n  // 用户输入表单数据变化时的回调，会返回用户当前填写的表单数据formData\n  handleChanged = (formData) =\u003e {\n    console.log(\"ScalableForm Changed!\", formData);\n    this.setState({\n      formData: { ...formData }\n    });\n  };\n\n  // 用户点击提交时的回调，会返回用户填写的表单数据formData\n  handleSubmit = (formData) =\u003e {\n    console.log(\"ScalableForm Submitted!\", formData);\n  };\n\n  render() {\n    return (\n      \u003cdiv className=\"scalable-form-demo-element\"\u003e\n        \u003cScalableForm\n          jsonSchema={this.jsonSchema}\n          uiSchema={this.uiSchema}\n          formData={this.state.formData}\n          onChange={this.handleChanged}\n          onSubmit={this.handleSubmit}\n        /\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n```\n\n您可以在 [codesandbox](https://codesandbox.io/s/late-bird-xform-antd-x6qoo?from-embed) 查看这个例子的演示。\u003cbr /\u003e\n您可以访问访问[scalable-form-antd文档](https://scalable-form-platform.github.io/#/zh/scalable_form_antd)了解更多信息\n   \n\u003cimg src=\"https://img.alicdn.com/tfs/TB1kDsPAeH2gK0jSZJnXXaT1FXa-2554-696.png\" /\u003e\n\n\u003e 您也可以使用[scalable-form-antd-mobile](https://www.npmjs.com/package/scalable-form-antd-mobile)在移动端渲染表单，[点击这里](https://codesandbox.io/s/late-bird-xform-antd-mobile-qspcg)在codesandbox中查看移动端渲染表单的例子，您也可以[在这里](https://scalable-form-platform.github.io/#/zh/%E7%A7%BB%E5%8A%A8%E7%AB%AF%E6%B8%B2%E6%9F%93)查看更多scalable-form-antd-mobile的文档。\n\n\n\n### 使用scalable-form-editor可视化编排表单\n```bash\nnpm i scalable-form-editor -S\n```\n[scalable-form-editor](https://www.npmjs.com/package/scalable-form-editor)是可视化编排表单的前端组件，您可以通过scalable-form-editor快速搭建您的表单。\n```javascript\nimport React from \"react\";\nimport \"./styles.css\";\nimport ScalableFormEditor from \"scalable-form-editor\";\n\nclass FormEditorExample extends Component {\n  constructor(...args) {\n    super(...args);\n    this.state = {\n        uiSchema: {},\n        jsonSchema: {},\n        bizData: {},\n        sequence: []\n        formData: {}\n    };\n  }\n\n  handleSubmit = (formCode, {jsonSchema,uiSchema, formData, bizData, sequence}) =\u003e {\n    console.log('submit by editor', jsonSchema, uiSchema, formData, bizData, sequence);\n  };\n\n  render() {\n    return (\n      \u003cScalableFormEditor\n        jsonSchema={this.state.jsonSchema}\n        uiSchema={this.state.uiSchema}\n        formData={this.state.formData}\n        bizData={this.state.bizData}\n        sequence={this.state.sequence}\n        onSubmit={this.handleSubmit}\n      /\u003e\n    );\n  }\n}\n```\n\n您可以在 [codesandbox](https://codesandbox.io/s/late-bird-xform-antd-x6qoo?from-embed) 查看scalable-form-editor的演示，[访问这里](https://scalable-form-platform.github.io/#/zh/scalable-form-editor)查看scalable-form-editor的更多文档\n\n![](https://img.alicdn.com/tfs/TB1m6eUz4v1gK0jSZFFXXb0sXXa-2874-1486.png)\n\n\n\n### 使用Scalable Form站点\n实际业务使用中，Scalable Form整体上由三个主要部分组成，表单渲染端，表单配置端，表单存储的服务端。\n\n- 表单配置端可以通过可视化的方式来编排产出渲染端可用的表单配置，并支持用户填写表单。\n- 渲染端使用配置端编排出来的表单配置，渲染为可用的表单。\n- 服务端用于存储表单配置。不仅如此，服务端还可以串联起整个Scalable Form的使用场景，提供配置站点（权限控制，场景配置，自定义组件配置），表单维护管理，表单填写页面，表单数据存储展示与简单的数据分析能力。\n\n通过docker镜像的方式，你可以很方便地在本地或者服务器部署一个Scalable Form服务器。\n你可以从[docker hub](https://hub.docker.com/repository/docker/lvshuncn/scalable-form-platform/general)搜索到Scalable Form服务器的docker镜像\n如果你在本地测试，你可以执行以下命令通过`scalable-form-platform`镜像开启一个Scalable Form服务器，端口绑定3000\n```\ndocker run -d -p 3000:3000 lvshuncn/scalable-form-platform\n```\n开启后，访问`http://localhost:3000/xform/admin`即可使用Scalable Form独立站点\n\u003e 默认情况下docker中的Scalable Form会开启demo模式，demo模式仅用于快速演示，服务器以内存数据库的方式存储数据，重启后数据会清空，不要在生产环境下使用。生产环境使用方法请[查看文档](https://scalable-form-platform.github.io/#/zh/%E4%BD%BF%E7%94%A8dockerr)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://scalable-form-platform.github.io/\" target=\"_blank\"\u003e\n    \u003cimg max-width=\"1440\" src=\"https://img.alicdn.com/tfs/TB1MnB9z7Y2gK0jSZFgXXc5OFXa-1440-900.png\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🖥 浏览器支持/Environment Support\n\n* Modern browsers and Internet Explorer 9+ (with [polyfills](https://ant.design/docs/react/getting-started#Compatibility))\n\n| [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eIE / Edge | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eFirefox | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eChrome | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eSafari | [\u003cimg src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png\" alt=\"Opera\" width=\"24px\" height=\"24px\" /\u003e](http://godban.github.io/browsers-support-badges/)\u003c/br\u003eOpera |\n| --------- | --------- | --------- | --------- | --------- |\n| IE9, IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions|\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Fscalable-form-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Fscalable-form-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Fscalable-form-platform/lists"}