ScriptsApr 13, 2026·3 min read

Refine — React Framework for Building Internal Tools

Refine is an open-source React framework for building admin panels, dashboards, and internal tools. It provides data hooks, auth, access control, routing, and notifications — with full code ownership and no vendor lock-in, unlike visual builders.

TL;DR
Open-source React framework that provides data hooks, auth, and routing for admin panels and dashboards.
§01

What it is

Refine is an open-source React framework purpose-built for admin panels, dashboards, and internal tools. It ships data-fetching hooks, authentication, access control, routing, and notification primitives so teams can focus on business logic rather than boilerplate.

Unlike visual builders such as Retool or Appsmith, Refine gives you full code ownership. You write standard React components, use any UI library (Ant Design, Material UI, Chakra, Mantine, or headless), and deploy wherever you want.

§02

How it saves time or tokens

Refine eliminates the repetitive CRUD scaffolding that plagues every internal tool project. Its useTable, useForm, useShow, and useList hooks handle pagination, sorting, filtering, and mutations in a few lines. A data provider abstraction means switching from REST to GraphQL or Supabase requires changing one file, not rewriting every component.

Because Refine generates standard React code, AI coding assistants can read and modify it without learning a proprietary DSL. That reduces token spend when using LLMs for code generation.

§03

How to use

  1. Scaffold a new project with the CLI:
npm create refine-app@latest my-admin
cd my-admin
npm run dev
  1. Define a data provider that connects to your API. Refine ships providers for REST, GraphQL, Supabase, Strapi, Appwrite, NestJS, Hasura, and Airtable out of the box.
  1. Create a resource page using built-in hooks. A typical list page looks like this:
import { useTable } from '@refinedev/antd';
import { Table } from 'antd';

export const ProductList = () => {
  const { tableProps } = useTable({ resource: 'products' });
  return (
    <Table {...tableProps} rowKey='id'>
      <Table.Column dataIndex='name' title='Name' />
      <Table.Column dataIndex='price' title='Price' />
    </Table>
  );
};
  1. Register the resource in your app config and Refine auto-generates sidebar navigation, breadcrumbs, and CRUD routes.
§04

Example

import { Refine } from '@refinedev/core';
import dataProvider from '@refinedev/simple-rest';
import { ProductList } from './pages/products';

function App() {
  return (
    <Refine
      dataProvider={dataProvider('https://api.example.com')}
      resources={[
        { name: 'products', list: ProductList }
      ]}
    />
  );
}

This minimal setup gives you a working admin panel with list, create, edit, and delete pages for the products resource.

§05

Related on TokRepo

§06

Common pitfalls

  • Choosing a UI library before understanding Refine's headless mode. Start headless if your design system is custom; pick Ant Design or Material UI only if you want pre-built components.
  • Skipping the inferencer. Refine's @refinedev/inferencer package auto-generates CRUD pages from your API response, saving hours of initial scaffolding.
  • Hardcoding API URLs instead of using the data provider abstraction. This defeats the main benefit of Refine and makes backend migrations painful.

Frequently Asked Questions

How does Refine differ from Retool or Appsmith?+

Retool and Appsmith are visual builders with proprietary runtimes. Refine is a code-first React framework. You get full source code ownership, can use any React library, and deploy to any hosting provider. The trade-off is that Refine requires React knowledge, while visual builders let non-developers build UIs.

Which UI libraries does Refine support?+

Refine supports Ant Design, Material UI, Chakra UI, and Mantine through dedicated packages. It also has a headless mode where you bring your own components. Each UI package wraps Refine hooks with pre-styled form, table, and layout components.

Can Refine connect to GraphQL APIs?+

Yes. Refine ships a GraphQL data provider that works with any spec-compliant GraphQL server. It also supports Hasura and Strapi GraphQL endpoints through dedicated providers. Switching from REST to GraphQL requires changing the data provider import, not rewriting components.

Is Refine suitable for production applications?+

Yes. Refine is used in production by teams building internal dashboards, CRM systems, and admin panels. It supports authentication via Auth0, Keycloak, or custom providers, role-based access control, audit logging, and real-time updates via WebSocket or Supabase subscriptions.

How does Refine handle authentication and authorization?+

Refine provides an auth provider interface with login, logout, check, and getPermissions methods. You implement these methods for your auth backend. Built-in integrations exist for Auth0, Google, Keycloak, and Supabase auth. Access control uses a can method that receives resource and action, returning allow or deny.

Citations (3)
  • Refine GitHub— Refine provides data hooks, auth, access control, routing, and notifications for…
  • Refine Documentation— Data providers for REST, GraphQL, Supabase, Strapi, Appwrite, NestJS, Hasura, Ai…
  • React Official Docs— React framework design patterns for admin panels

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets