{"id":16429613,"url":"https://github.com/stbui/prophet","last_synced_at":"2025-03-16T17:35:20.798Z","repository":{"id":57119367,"uuid":"155728984","full_name":"stbui/prophet","owner":"stbui","description":"用于构建 react 中后台前端应用框架","archived":false,"fork":false,"pushed_at":"2024-09-09T03:37:46.000Z","size":4903,"stargazers_count":12,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-26T20:37:44.822Z","etag":null,"topics":["admin","antd","crud","hook","prophet","react","template"],"latest_commit_sha":null,"homepage":"https://stbui.github.io/prophet","language":"TypeScript","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/stbui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-01T14:37:43.000Z","updated_at":"2024-09-09T03:37:50.000Z","dependencies_parsed_at":"2023-02-09T15:46:04.861Z","dependency_job_id":null,"html_url":"https://github.com/stbui/prophet","commit_stats":null,"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fprophet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fprophet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fprophet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stbui%2Fprophet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stbui","download_url":"https://codeload.github.com/stbui/prophet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221666413,"owners_count":16860415,"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":["admin","antd","crud","hook","prophet","react","template"],"created_at":"2024-10-11T08:23:41.690Z","updated_at":"2024-10-27T10:59:53.181Z","avatar_url":"https://github.com/stbui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 先知（Prophet）\n\n[![React](https://img.shields.io/badge/react-16.14.0-brightgreen.svg?style=square)](https://github.com/facebook/react)\n[![redux](https://img.shields.io/badge/redux-4.0.5-brightgreen.svg?style=square)](https://github.com/facebook/react)\n[![antd](https://img.shields.io/badge/antd-4.8.2-brightgreen.svg?style=square)](https://github.com/facebook/react)\n[![Downloads](https://img.shields.io/npm/dm/@stbui/prophet.svg)](https://npmcharts.com/compare/@stbui/prophet?minimal=true)\n[![npm](https://img.shields.io/badge/prophet-3.0.1-green.svg?style=flat)](https://github.com/stbui/prophet)\n[![Powered_by](https://img.shields.io/badge/Powered_by-stbui-green.svg?style=flat)](https://github.com/stbui/prophet)\n\nProphet 可以快速帮你构建后台管理的中后台前端应用框架，能帮助你使用很少的代码就实现功能完善的后台管理功能。\n\n## 特性\n\n-   提炼 CRUD 容器组件，UI 与逻辑分离，快速开始前端开发\n-   提炼后台应用的典型页面和场景，具备完备的组件和布局\n-   提供一致的 API，提供更强大的组件拓展与封装能力\n-   默认集成 antd 组件布局，快速搭建一套系统\n-   引入 dataProvider 来处理各 种数据规范\n-   模块化管理，提供更加灵活的扩展机制。\n\n# 架构\n\n![架构](docs/prophet.png)\n\n-   **数据源:** 后端接口提供方式，如 REST，Graphql， RPC 等\n-   **数据处理:** 通过数据源提供来的数据进行规范化处理\n-   **组件/Hook:** 将数据封装 CRUD 组件和 Hook\n-   **UI:** 包装成业务组件\n\n## 起步\n\n```bash\nnpm install @stbui/prophet@latest @stbui/prophet-data-json-server@latest\n```\n\n```js\nimport React from 'react';\nimport { Prophet, Resource } from '@stbui/prophet';\nimport dataJsonServer from '@stbui/prophet-data-json-server';\n\nconst App = () =\u003e {\n    return (\n        \u003cProphet dataProvider={dataJsonServer('http://127.0.0.1:3001')}\u003e\n            \u003cResource\n                name=\"users\"\n                list={() =\u003e \u003cdiv\u003elist\u003c/div\u003e}\n                edit={() =\u003e \u003cdiv\u003eedit\u003c/div\u003e}\n                create={() =\u003e \u003cdiv\u003ecreate\u003c/div\u003e}\n                show={() =\u003e \u003cdiv\u003eshow\u003c/div\u003e}\n            /\u003e\n        \u003c/Prophet\u003e\n    );\n};\n\nexport default App;\n```\n\n基本的页面和数据处理搭建完成\n\n## Packages\n\n| Package                                                         | Docs | Description       |\n| --------------------------------------------------------------- | ---- | ----------------- |\n| [`@stbui/prophet-core`](/packages/core)                         |      | 底层组件的封装    |\n| [`@stbui/prophet-antd`](/packages/antd)                         |      | antd UI 实现      |\n| [`@stbui/prophet-data-json-server`](/packages/data-json-server) |      | REST 接口规范实现 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstbui%2Fprophet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstbui%2Fprophet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstbui%2Fprophet/lists"}