An open source, headless web application framework developed with flexibility in mind.
![how-works-refine](https://user-images.githubusercontent.com/18739364/200257209-8fc0c8b1-2568-453e-873f-00513434deed.png)
refine is a React-based framework for the rapid β¨ development of web applications. It eliminates repetitive tasks demanded by CRUD operations and provides industry standard solutions for critical parts like authentication, access control, routing, networking, state management, and i18n.
refine is headless by design, thereby offering unlimited styling and customization options.
Instead of being a limited set of pre-styled components, refine is a collection of helper hooks
, components
, and providers
. They are all decoupled from UI components and business logic, so that they never keep you from customizing your UI or coding your own flow.
refine seamlessly works with any custom design or UI framework that you favor. For convenience, it ships with ready-made integrations for Ant Design System, Material UI, Mantine, and Chakra UI.
refine shines on data-intensiveβ‘ applications like admin panels, dashboards and internal tools. Thanks to the built-in SSR support, refine can also power customer-facing applications like storefronts.
You can take a look at some live examples that can be built using refine from scratch:
![](https://user-images.githubusercontent.com/18739364/204285956-cc20fa11-b769-4bd5-b8f6-9c05a283ac85.gif)
![](https://user-images.githubusercontent.com/18739364/204285047-8f24f1f4-65ea-4952-83ed-81e92cdd5b90.gif)
![](https://user-images.githubusercontent.com/18739364/204285039-1ce0cb06-fbf8-4704-89c9-2e004620c9a8.gif)
π Refer to most popular real use case examples
π More refine powered different usage scenarios can be found here
βοΈ Zero-config, one-minute setup with a single CLI command
π Connectors for 15+ backend services including REST API, GraphQL, NestJs CRUD, Airtable, Strapi, Strapi v4, Strapi GraphQL, Supabase, Hasura, Appwrite, Firebase, and Directus.
π SSR support with Next.js or Remix
π Auto-generated CRUD UIs from your API data structure
β Perfect state management & mutations with React Query
π Advanced routing with any router library of your choice
π Providers for seamless authentication and access control flows
β‘ Out-of-the-box support for live / real-time applications
π Easy audit logs & document versioning
π¬ Support for any i18n framework
πͺ Future-proof, robust architecture
βοΈ Built-in CLI with time-saving features
β Full test coverage
The fastest way to get started with refine is by using the create refine-app
project starter tool.
Run the following command to create a new refine project configured with Ant Design System as the default UI framework:
npm create refine-app@latest -- -o refine-antd
Once the setup is complete, navigate to the project folder and start your project with:
npm run dev
Your refine application will be accessible at http://localhost:3000:
Let's consume a public fake REST API
and add two resources (posts, categories) to our project. Replace the contents of src/App.tsx
with the following code:
import { Refine } from "@pankod/refine-core";
import {
Layout,
ReadyPage,
notificationProvider,
ErrorComponent,
} from "@pankod/refine-antd";
import routerProvider from "@pankod/refine-react-router-v6";
import dataProvider from "@pankod/refine-simple-rest";
import {
AntdListInferencer,
AntdShowInferencer,
AntdCreateInferencer,
AntdEditInferencer,
} from '@pankod/refine-inferencer/antd';
import "@pankod/refine-antd/dist/reset.css";
const App: React.FC = () => {
return (
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
Layout={Layout}
ReadyPage={ReadyPage}
notificationProvider={notificationProvider}
catchAll={<ErrorComponent />}
resources={[
{
name: 'posts',
list: AntdListInferencer,
show: AntdShowInferencer,
create: AntdCreateInferencer,
edit: AntdEditInferencer,
canDelete: true,
},
{
name: 'categories',
list: AntdListInferencer,
show: AntdShowInferencer,
}
]}
/>
);
};
export default App;
π Thanks to refine Inferencer package, it guesses the configuration to use for the list
, show
, create
, and edit
pages based on the data fetched from the API and generates the pages automatically.
Now, you should see the output as a table populated with post
& category
data:
You can get the auto-generated pages codes by clicking the Show Code
button on each page. Afterward, simply pass the pages to the resources
array by replacing with the Inferencer components.
π Jump to Tutorial to continue your work and turn the example into a full-blown CRUD application.
π Visit Learn the Basics Page to get informed about the fundamental concepts.
π Read more on Advanced Tutorials for different usage scenarios.
π See the real-life Finefoods Demo project.
π Play with interactive Examples
You can find refine's Public Roadmap here!
π Refer to contribution docs for more information
If you have any doubts related to the project or want to discuss something, then join our Discord Server.
Licensed under the MIT License, Copyright Β© 2021-present Refinedev