refine README

README проекта с github.com/refinedev/refine. Одним файлом markdown: README.md.

refine logo

Home Page | Documentation | Examples | Discord | Blog | Refine


The sweet spot between the low/no code and “starting from scratch” for CRUD-heavy applications.

Refine Core is an open source, React meta-framework for enterprise. It provides a headless solution for everything from admin panels to dashboards and internal tools.

Refine CORE also powers Refine's purpose built AI agent.

Awesome OpenSSF Best Practices npm version Contributor Covenant

Discord Twitter Follow


how-refine-works

What is Refine CORE?

Refine CORE is a React meta-framework for CRUD-heavy web applications. It addresses a wide range of enterprise use cases including internal tools, admin panels, dashboards and B2B apps.

Refine CORE's hooks and components streamline the development process by offering industry-standard solutions for crucial aspects of a project, including authentication, access control, routing, networking, state management, and i18n.

Refine CORE's headless architecture enables the building of highly customizable applications by decoupling business logic from UI and routing. This allows integration with:

⚡ Try Refine CORE

Start a new project with Refine CORE in seconds using the following command:

npm create refine-app@latest my-refine-app

Or you can create a new project on your browser:


You can also try Refine's AI agent for free to create projects:

Quick Start

Here's Refine CORE in action, the below code is an example of a simple CRUD application using Refine CORE + React Router + Material UI:

import React from "react";
import { Refine, useMany } from "@refinedev/core";
import { ThemedLayout } from "@refinedev/mui";
import dataProvider from "@refinedev/simple-rest";
import routerProvider from "@refinedev/react-router";
import { BrowserRouter, Outlet, Route, Routes } from "react-router";

import CssBaseline from "@mui/material/CssBaseline";

export default function App() {
  return (
    <BrowserRouter>
      <CssBaseline />
      <Refine
        dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
        routerProvider={routerProvider}
        resources={[
          {
            name: "products",
            list: "/products",
          },
        ]}
      >
        <Routes>
          <Route
            element={
              <ThemedLayout>
                <Outlet />
              </ThemedLayout>
            }
          >
            <Route path="/products">
              <Route index element={<ProductList />} />
            </Route>
          </Route>
        </Routes>
      </Refine>
    </BrowserRouter>
  );
}

// src/pages/products/list.tsx

import { List, useDataGrid, DateField } from "@refinedev/mui";
import { DataGrid, GridColDef } from "@mui/x-data-grid";

export const ProductList = () => {
  const { dataGridProps } = useDataGrid();

  const { data: categories, isLoading } = useMany({
    resource: "categories",
    ids:
      dataGridProps?.rows?.map((item) => item?.category?.id).filter(Boolean) ??
      [],
    queryOptions: {
      enabled: !!dataGridProps?.rows,
    },
  });

  const columns = React.useMemo<GridColDef[]>(
    () => [
      { field: "id", headerName: "ID", type: "number" },
      { field: "name", flex: 1, headerName: "Name" },
      {
        field: "category",
        flex: 1,
        headerName: "Category",
        display: "flex",
        renderCell: ({ value }) =>
          isLoading
            ? "Loading..."
            : categories?.data?.find((item) => item.id === value?.id)?.title,
      },
      {
        field: "createdAt",
        flex: 1,
        headerName: "Created at",
        display: "flex",
        renderCell: ({ value }) => <DateField value={value} />,
      },
    ],
    [categories?.data, isLoading],
  );

  return (
    <List>
      <DataGrid {...dataGridProps} columns={columns} />
    </List>
  );
};

The result will look like this:

Refine CORE + Material UI Example

Use cases

Refine CORE shines on data-intensive⚡ enterprise B2B applications like admin panels, dashboards and internal tools. Thanks to the built-in SSR support, it can also power customer-facing applications like storefronts.

You can take a look at some live examples that can be built using Refine CORE from scratch:

Key Features

Learning Refine CORE

Contribution

Refer to the contribution docs for more information.

If you have any doubts related to the project or want to discuss something, then join our Discord server.

Contributors ♥️ Thanks

We extend our gratitude to all our numerous contributors who create plugins, assist with issues and pull requests, and respond to questions on Discord and GitHub Discussions.

Refine CORE is a community-driven project, and your contributions continually improve it.


License

Licensed under the MIT License, Copyright © 2021-present Refinedev

refine (refinedev/refine)

Ищем в базе…

36.1K ·GitHub
Что это?Refine — это фреймворк с открытым исходным кодом на React для создания внутренних инструментов, админ-панелей, дашбордов и B2B-приложений с высокой гибкостью.
Это UI-библиотека или фреймворк без готового интерфейса (headless)?Refine работает без готового интерфейса (headless): он предоставляет хуки и логику для загрузки данных, маршрутизации, авторизации и CRUD-операций, но готового UI не поставляет, поэтому его сочетают с Ant Design, Material UI, Mantine или собственными компонентами.
Как мне начать новый проект на refine?Монорепозиторий включает CLI-пакет create-refine-app, с помощью которого создаётся новый проект; после этого страницы строятся с выбранной UI-библиотекой и провайдером данных.
Мне нужен определённый бэкенд для работы с refine?Конкретный бэкенд не обязателен: refine поддерживает несколько провайдеров данных, включая REST, GraphQL и NestJS, поэтому он может подключаться практически к любому API.
В чём подвох у подхода без готового интерфейса?Поскольку refine не включает собственный UI, сначала нужно самостоятельно подключить UI-кит, и только после этого появится рабочий интерфейс; для участия в разработке самого репозитория также требуются Node.js 18+ и pnpm 9+ в монорепозитории, которым управляет lerna.
Какие UI-фреймворки можно подключить к refine?Благодаря тому, что refine не содержит готового интерфейса, его можно сочетать с Ant Design, Material UI, Mantine, Chakra UI или полностью самописными компонентами для визуальной части.
Генерирует ли refine экраны CRUD за меня?Основные хуки и маршрутизация refine построены вокруг CRUD-операций, поэтому можно быстро подключить списки, создание, редактирование и просмотр для каждого ресурса, не записывая эту логику с нуля.
Можно ли использовать refine с бэкендами на Next.js или NestJS?Да, refine имеет полноценную поддержку и примеры для Next.js на фронтенде и для NestJS (включая NestJs Query/CRUD) в качестве источника данных на бэкенде.
Можно ли пользоваться refine бесплатно?Да, refine полностью открытый и распространяется по лицензии MIT.
Какие есть похожие проекты?react-admin, appsmith, amis, twenty, gentelella, amplication, umi, filament
Автор
refinedev
Размер
7.9 GB
Звёзды
36.1K
Возраст
5 г
Коммиты · 90 дней