Giter Site home page Giter Site logo

stbui / prophet Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 5.0 4.64 MB

用于构建 react 中后台前端应用框架

Home Page: https://stbui.github.io/prophet

License: MIT License

TypeScript 92.47% JavaScript 4.41% Less 3.11%
react admin hook prophet antd crud template

prophet's Introduction

先知(Prophet)

React redux antd Downloads npm Powered_by

Prophet 可以快速帮你构建后台管理的中后台前端应用框架,能帮助你使用很少的代码就实现功能完善的后台管理功能。

特性

  • 提炼 CRUD 容器组件,UI 与逻辑分离,快速开始前端开发
  • 提炼后台应用的典型页面和场景,具备完备的组件和布局
  • 提供一致的 API,提供更强大的组件拓展与封装能力
  • 默认集成 antd 组件布局,快速搭建一套系统
  • 引入 dataProvider 来处理各 种数据规范
  • 模块化管理,提供更加灵活的扩展机制。

架构

架构

  • 数据源: 后端接口提供方式,如 REST,Graphql, RPC 等
  • 数据处理: 通过数据源提供来的数据进行规范化处理
  • 组件/Hook: 将数据封装 CRUD 组件和 Hook
  • UI: 包装成业务组件

起步

npm install @stbui/prophet@latest @stbui/prophet-data-json-server@latest
import React from 'react';
import { Prophet, Resource } from '@stbui/prophet';
import dataJsonServer from '@stbui/prophet-data-json-server';

const App = () => {
    return (
        <Prophet dataProvider={dataJsonServer('http://127.0.0.1:3001')}>
            <Resource
                name="users"
                list={() => <div>list</div>}
                edit={() => <div>edit</div>}
                create={() => <div>create</div>}
                show={() => <div>show</div>}
            />
        </Prophet>
    );
};

export default App;

基本的页面和数据处理搭建完成

Packages

Package Docs Description
@stbui/prophet-core 底层组件的封装
@stbui/prophet-antd antd UI 实现
@stbui/prophet-data-json-server REST 接口规范实现

prophet's People

Contributors

stbui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.