Skip to content
/ refine Public
forked from refinedev/refine

Build your React-based CRUD applications, without constraints.

License

Notifications You must be signed in to change notification settings

euoia/refine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation



Build your React-based CRUD applications, without constraints.
An open source, headless web application framework developed with flexibility in mind.

Discord Twitter Follow

refine - 100% open source React framework to build web apps 3x faster | Product Hunt

Awesome Maintainability Test Coverage npm version npm Contributor Covenant


how-works-refine

What is refine?

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.

What do you mean by "headless" ?

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.

Use cases

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:



πŸ‘‰ Refer to most popular real use case examples

πŸ‘‰ More refine powered different usage scenarios can be found here

Key Features

βš™οΈ 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, Nhost, Appwrite, Firebase, Directus and Altogic

🌐 SSR support with Next.js or Remix

βš› 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

βœ… Full test coverage

Quick Start

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 -- --preset refine-antd my-project

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: Welcome on board 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, useMany } from "@pankod/refine-core";
import {
    useTable,
    List,
    Table,
    DateField,
    Layout,
    ReadyPage,
    notificationProvider,
    ErrorComponent,
} from "@pankod/refine-antd";
import routerProvider from "@pankod/refine-react-router-v6";
import dataProvider from "@pankod/refine-simple-rest";

import "@pankod/refine-antd/dist/styles.min.css";

const App: React.FC = () => {
    return (
        <Refine
            routerProvider={routerProvider}
            dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
            resources={[{ name: "posts", list: PostList }]}
            Layout={Layout}
            ReadyPage={ReadyPage}
            notificationProvider={notificationProvider}
            catchAll={<ErrorComponent />}
        />
    );
};

export const PostList: React.FC = () => {
    const { tableProps } = useTable<IPost>();

    const categoryIds =
        tableProps?.dataSource?.map((item) => item.category.id) ?? [];

    const { data, isLoading } = useMany<ICategory>({
        resource: "categories",
        ids: categoryIds,
        queryOptions: {
            enabled: categoryIds.length > 0,
        },
    });

    return (
        <List>
            <Table<IPost> {...tableProps} rowKey="id">
                <Table.Column dataIndex="title" title="title" />
                <Table.Column
                    dataIndex={["category", "id"]}
                    title="category"
                    render={(value: number) => {
                        if (isLoading) {
                            return "loading...";
                        }

                        return data?.data.find(
                            (item: ICategory) => item.id === value,
                        )?.title;
                    }}
                />
                <Table.Column
                    dataIndex="createdAt"
                    title="createdAt"
                    render={(value) => <DateField format="LLL" value={value} />}
                />
            </Table>
        </List>
    );
};

export default App;

interface IPost {
  title: string;
  createdAt: string;
  category: { id: number };
}

interface ICategory {
  id: number;
  title: string;
}

Now, you should see the output as a table populated with post & category data: First example result

Next Steps

πŸ‘‰ Jump to Refine<>Ant Design Tutorial to continue your work and turn the example into a full-blown CRUD application.

πŸ‘‰ Check out the Refine<>Tailwind Tutorial to learn how to use refine in a pure headless way.

πŸ‘‰ 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

Roadmap

You can find refine's Public Roadmap here!

Stargazers

Stargazers repo roster for refinedev/refine

Contribution

πŸ‘‰ 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.

Our β™₯️ Contributors

License

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

About

Build your React-based CRUD applications, without constraints.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.5%
  • JavaScript 3.3%
  • CSS 0.1%
  • Handlebars 0.1%
  • Less 0.0%
  • Smarty 0.0%