https://github.com/stbui/prophet
用于构建 react 中后台前端应用框架
https://github.com/stbui/prophet
admin antd crud hook prophet react template
Last synced: over 1 year ago
JSON representation
用于构建 react 中后台前端应用框架
- Host: GitHub
- URL: https://github.com/stbui/prophet
- Owner: stbui
- License: mit
- Created: 2018-11-01T14:37:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T03:37:46.000Z (almost 2 years ago)
- Last Synced: 2024-10-26T20:37:44.822Z (over 1 year ago)
- Topics: admin, antd, crud, hook, prophet, react, template
- Language: TypeScript
- Homepage: https://stbui.github.io/prophet
- Size: 4.68 MB
- Stars: 12
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 先知(Prophet)
[](https://github.com/facebook/react)
[](https://github.com/facebook/react)
[](https://github.com/facebook/react)
[](https://npmcharts.com/compare/@stbui/prophet?minimal=true)
[](https://github.com/stbui/prophet)
[](https://github.com/stbui/prophet)
Prophet 可以快速帮你构建后台管理的中后台前端应用框架,能帮助你使用很少的代码就实现功能完善的后台管理功能。
## 特性
- 提炼 CRUD 容器组件,UI 与逻辑分离,快速开始前端开发
- 提炼后台应用的典型页面和场景,具备完备的组件和布局
- 提供一致的 API,提供更强大的组件拓展与封装能力
- 默认集成 antd 组件布局,快速搭建一套系统
- 引入 dataProvider 来处理各 种数据规范
- 模块化管理,提供更加灵活的扩展机制。
# 架构

- **数据源:** 后端接口提供方式,如 REST,Graphql, RPC 等
- **数据处理:** 通过数据源提供来的数据进行规范化处理
- **组件/Hook:** 将数据封装 CRUD 组件和 Hook
- **UI:** 包装成业务组件
## 起步
```bash
npm install @stbui/prophet@latest @stbui/prophet-data-json-server@latest
```
```js
import React from 'react';
import { Prophet, Resource } from '@stbui/prophet';
import dataJsonServer from '@stbui/prophet-data-json-server';
const App = () => {
return (
list}
edit={() => edit}
create={() => create}
show={() => show}
/>
);
};
export default App;
```
基本的页面和数据处理搭建完成
## Packages
| Package | Docs | Description |
| --------------------------------------------------------------- | ---- | ----------------- |
| [`@stbui/prophet-core`](/packages/core) | | 底层组件的封装 |
| [`@stbui/prophet-antd`](/packages/antd) | | antd UI 实现 |
| [`@stbui/prophet-data-json-server`](/packages/data-json-server) | | REST 接口规范实现 |