Refine dev

From itechmeat/llm-code · View interactive version

Refine dev is an AI agent skill from the GitHub repository itechmeat/llm-code. Refine.dev headless React framework for CRUD apps: data providers, resources, routing, authentication, hooks, and forms. Use when building admin panels, dashboards, or internal tools with React and various backends (REST, GraphQL, Supabase, Strapi), or configuring Refine data providers and authentic

How to use this skill

Skill file

Refine.dev Framework

Refine is a headless React framework for building enterprise CRUD applications. It provides data fetching, routing, authentication, and access control out of the box while remaining UI-agnostic.

Core Concepts

Refine is built around these key abstractions:

  1. Data Provider — adapter for your backend (REST, GraphQL, etc.)
  2. Resources — entities in your app (e.g., posts, users, products)
  3. Hooks — useList, useOne, useCreate, useUpdate, useDelete, useForm, useTable
  4. Auth Provider — handles login, logout, permissions
  5. Router Provider — integrates with React Router, etc.

Quick Start (Vite)

Scaffold: npm create refine-app@latest (select Vite, Mantine, REST API). For manual setup, install @refinedev/core @refinedev/mantine @refinedev/react-router and Mantine packages.

Minimal App Structure

// src/App.tsx
import { Refine } from "@refinedev/core";
import { MantineProvider } from "@mantine/core";
import routerProvider from "@refinedev/react-router";
import dataProvider from "@refinedev/simple-rest";
import { BrowserRouter, Routes, Route } from "react-router-dom";

function App() {
  return (
    <BrowserRouter>
      <MantineProvider>
        <Refine
          dataProvider={dataProvider("https://api.example.com")}
          routerProvider={routerProvider}
          resources={[
            {
              name: "posts",
              list: "/posts",
              create: "/posts/create",
              edit: "/posts/edit/:id",
              show: "/posts/show/:id",
            },
          ]}
        >
          <Routes>{/* Your routes here */}</Routes>
        </Refine>
      </MantineProvider>
    </BrowserRouter>
  );
}

Critical Prohibitions

Steps for New Feature

  1. Define the resource in <Refine resources={[...]}>
  2. Create page components (List, Create, Edit, Show)
  3. Set up routes matching resource paths
  4. Use appropriate hooks (useTable for lists, useForm for create/edit)
  5. Configure auth provider if authentication is needed

Definition of Done

Release Note (5.0.12)

References (Detailed Guides)

Core

Hooks

Security & Auth

UI & Components

Utilities & Features

Links

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.