Skip to content
STACK IT FAST

Refine

Curated OSSHybridEnterprise Internal Tool & CRUD Framework20+ People

Audited from github.com/refinedev/refine

Refine is an open-source React framework for building internal tools, admin panels, dashboards, and B2B applications with headless flexibility.

Language
TypeScript
License
MIT
Running for
3 years
Team
20+ People

Why this architecture

Decoupling CRUD state and data fetching from UI design systems enables developers to build customized enterprise dashboards rapidly without framework lock-in.

Tech stack by layer

7 technologies · audited Sep 17, 2026
Frontend & UI
  • ReactHeadless hook architecture delivering CRUD controllers, form bindings, and table state.
  • TypeScriptStrict type safety across data provider contracts, resource definitions, and UI adapters.
  • TanStack QueryPowers asynchronous data synchronization, caching, background refetching, and pagination.
  • Tailwind CSSUtility-first CSS styling powering documentation and headless UI starter templates.
Backend & APIs
  • Next.jsFirst-class framework integration providing server-side rendering and App Router compatibility.
  • GraphQLData provider adapters for Hasura, Strapi, and custom GraphQL APIs.
Infrastructure & Deploy
  • pnpmMonorepo workspace package manager linking core libraries, UI adapters, and example apps.
  • CypressEnd-to-end browser test automation suite in cypress/ verifying interactive user journeys.

Refine architecture diagram

Open SVG
Refine architecture diagramYour admin app → @refinedev/core (useTable · useForm); UI adapters → @refinedev/core (bindings); @refinedev/core → Router bindings (routes); @refinedev/core → TanStack Query (queries); TanStack Query → Data providers (fetch); Data providers → Your backend (HTTP)CLIENTSSERVICESWORKERS & JOBSEXTERNALYour admin appReact · TypeScriptUI adaptersAnt Design · MUI · Mantine@refinedev/corehooks · providersRouter bindingsNext.js · React Router · RemixTanStack Querycache · refetchData providersREST · GraphQL · SupabaseYour backendREST / GraphQL / BaaSroutesfetchuseTable · useFormbindingsqueriesHTTP
How the main components of Refine connect, drawn from the audited repository.
Diagram as text
  • Your admin app (React · TypeScript) → @refinedev/core (hooks · providers): useTable · useForm
  • UI adapters (Ant Design · MUI · Mantine) → @refinedev/core (hooks · providers): bindings
  • @refinedev/core (hooks · providers) → Router bindings (Next.js · React Router · Remix): routes
  • @refinedev/core (hooks · providers) → TanStack Query (cache · refetch): queries
  • TanStack Query (cache · refetch) → Data providers (REST · GraphQL · Supabase): fetch
  • Data providers (REST · GraphQL · Supabase) → Your backend (REST / GraphQL / BaaS): HTTP

Key architectural decisions

5 decisions
  1. 01

    Headless core architecture decoupled from UI presentation

    Refine splits business logic from the view layer: packages/core provides pure headless hooks (useTable, useForm, useList) while packages/antd, packages/mui, and packages/chakra-ui offer optional design system adapters.

  2. 02

    Pluggable data provider contract for universal backend integration

    All communication routes through an abstract DataProvider interface (getList, getOne, create, update, delete). Developers can swap between REST, GraphQL, Supabase, Strapi, or NestJS without altering application views.

  3. 03

    TanStack Query as the server-state backbone

    Refine adopts TanStack Query (@tanstack/react-query in packages/core) for caching, automatic cache invalidation on mutations, optimistic updates, and background re-validation.

  4. 04

    Granular AccessControlProvider for declarative RBAC

    Permissions and role-based access control are enforced via an access control provider interface, checking canAccess rules before rendering navigation items, buttons, or data columns.

  5. 05

    Framework agnostic: Vite, Next.js, and Remix support

    The core framework does not enforce a specific bundler or router, providing dedicated router packages for React Router v6, Next.js Pages/App Router, and Remix.

How Refine is built

How Refine is structured

Refine is architected as an extensive pnpm monorepo (pnpm-workspace.yaml, package.json). The repository decouples business logic, API communication, and routing from the visual presentation layer across specialized packages:

  • packages/core/: The foundational headless framework (packages/core/package.json). It exposes React hooks for CRUD operations (useTable, useForm, useShow, useList), notification contexts, internationalization, and authentication providers.
  • packages/ (UI Adapters): Ready-to-use component libraries that adapt popular design systems: @refinedev/antd (Ant Design), @refinedev/mui (Material UI), @refinedev/mantine (Mantine), and @refinedev/chakra-ui (Chakra UI).
  • packages/ (Data Providers): Specialized API client adapters connecting to diverse backends (@refinedev/simple-rest, @refinedev/hasura, @refinedev/supabase, @refinedev/strapi, @refinedev/graphql).
  • packages/ (Router Bindings): Integration adapters for routing frameworks (@refinedev/react-router, @refinedev/nextjs-router, @refinedev/remix-router).
  • documentation/: Docusaurus-based technical documentation, tutorials, and interactive live code playgrounds (documentation/package.json).
  • examples/: Dozens of production-ready reference applications demonstrating CRM tools, e-commerce admin panels, and access-controlled portals.

Frontend

The frontend experience is entirely based on React 18+ (react, react-dom in packages/core/package.json) and TypeScript.

Refine's core innovation is its headless design. Unlike traditional admin frameworks that force rigid opinionated UI components upon developers, Refine provides headless hooks that manage state, pagination, sorting, search filtering, validation, and optimistic updates. Developers retain complete control over JSX rendering:

  • Teams needing rapid prototyping can install @refinedev/antd or @refinedev/mui for pre-built CRUD tables, modals, and edit forms.
  • Teams with custom corporate design guidelines can consume @refinedev/core with Tailwind CSS, creating tailored user interfaces without overriding existing framework CSS.

Form management integrates seamlessly with React Hook Form, and table state connects with TanStack Table (@tanstack/react-table), giving developers high-performance virtualized lists and complex column filtering.

Backend & APIs

Refine operates as a client-side architecture that interfaces with arbitrary backend systems through abstract provider interfaces:

  1. DataProvider: Implements standard methods (getList, getOne, create, update, deleteOne, custom). The provider translates Refine's internal query parameters into backend-specific HTTP query strings or GraphQL queries.
  2. AuthProvider: Handles authentication flows including login, logout, token refresh, checking permissions (check), and resolving user identity (getIdentity).
  3. AccessControlProvider: Evaluates declarative authorization rules before rendering sensitive actions (e.g., hiding a delete button if canAccess({ action: "delete", resource: "orders" }) returns false).
  4. LiveProvider: Connects to WebSocket or Server-Sent Event channels (such as Supabase Realtime or Ably) to trigger automatic table re-validation when records mutate on the server.

Asynchronous data fetching, request deduplication, and client caching are managed exclusively by TanStack Query (@tanstack/react-query). When a mutation occurs (e.g., updating a customer record), Refine automatically invalidates the corresponding query keys, causing active table views to refresh seamlessly.

Data & persistence

Because Refine is a frontend framework, persistence resides entirely within the connected backend service. The framework includes battle-tested data provider implementations for:

  • Standard REST APIs adhering to JSON:API, NestJS CRUD, or generic query specifications.
  • GraphQL APIs, offering automatic query generation for Hasura, Strapi, and custom Apollo Server endpoints.
  • Backend-as-a-Service platforms, including Supabase and Appwrite.

Build, test & deploy

The development lifecycle in the monorepo is maintained with modern tooling:

  • Package Management: Managed via pnpm (pnpm-lock.yaml, pnpm-workspace.yaml).
  • Code Quality: Biome (biome.json) ensures rapid code formatting and linting across the monorepo packages.
  • Testing: Unit tests run using Jest and React Testing Library across all package folders. Full end-to-end integration and visual regression tests execute with Cypress (cypress/cypress.config.ts).
  • Versioning: Changesets (.changeset/config.json) manage version increments and changelogs across published npm packages.

Self-hosting notes

Refine applications deploy as standard React, Next.js, or Vite applications:

  • Single-page application builds (Vite + React Router) deploy as static assets to Cloudflare Pages, Vercel, Netlify, or AWS S3/CloudFront.
  • Server-rendered builds (Next.js App Router or Remix) deploy as Node.js containers or serverless edge functions.
  • All sensitive authentication tokens are stored securely in browser storage or HTTP-only cookies as governed by the application's AuthProvider implementation.

What to copy (and what not to)

Architectural patterns to emulate from Refine:

  • Headless core separation: Isolating stateful hooks and data-fetching logic from UI presentation allows an admin framework to survive design system shifts without rewriting underlying CRUD workflows.
  • Provider-based abstraction layer: Interfacing with backends via an abstract DataProvider contract allows frontends to transition between REST, GraphQL, or third-party BaaS platforms with zero changes to presentation components.
  • Unified permission evaluation: Baking access control checks into navigation and action hooks prevents unauthorized actions from rendering in the UI while keeping authorization logic centralized.

Avoid adding multiple redundant UI adapters into a single application codebase; choose either a headless Tailwind approach or a single UI adapter (like Ant Design or Material UI) to avoid bundle bloat and conflicting design patterns.

Sources & repo audit

Audited
Sep 17, 2026
Commit
2352eb5
License
MIT

Independent analysis of repository at github.com/refinedev/refine. Spotted an inaccuracy? Use the claim form to request a correction.

Show this stack on your README or website
Tech stack of Refine
[![Tech stack of Refine on STACK IT FAST](https://stackitfast.com/badge/refine.svg)](https://stackitfast.com/project/refine)

Paste it into your README. It shows your current stack and links to this page.

Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with Refine's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 58 lines · 6.1 KB
# MISSION: Scaffold "Refine" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **Refine**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: Refine
- **What It Does**: Refine is an open-source React framework for building internal tools, admin panels, dashboards, and B2B applications with headless flexibility.
- **Domain & Category**: Enterprise Internal Tool & CRUD Framework
- **Production Scale**: 20+ People
- **Development Mode**: HYBRID
- **Architectural Rationale**: Decoupling CRUD state and data fetching from UI design systems enables developers to build customized enterprise dashboards rapidly without framework lock-in.
- **Live Website Reference**: https://refine.dev
- **Source Repository**: https://github.com/refinedev/refine
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: React, TypeScript, TanStack Query, Tailwind CSS, pnpm, GraphQL, Next.js
- **Primary Language(s)**: TypeScript, JavaScript, CSS
- **License of the reference repo**: MIT
- **Frontend**: React — Headless hook architecture delivering CRUD controllers, form bindings, and table state.; TypeScript — Strict type safety across data provider contracts, resource definitions, and UI adapters.; TanStack Query — Powers asynchronous data synchronization, caching, background refetching, and pagination.; Tailwind CSS — Utility-first CSS styling powering documentation and headless UI starter templates.
- **Backend & APIs**: Next.js — First-class framework integration providing server-side rendering and App Router compatibility.; GraphQL — Data provider adapters for Hasura, Strapi, and custom GraphQL APIs.
- **Infrastructure & deploy**: pnpm — Monorepo workspace package manager linking core libraries, UI adapters, and example apps.; Cypress — End-to-end browser test automation suite in cypress/ verifying interactive user journeys.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/refinedev/refine @ 2352eb5)
1. **Headless core architecture decoupled from UI presentation**: Refine splits business logic from the view layer: packages/core provides pure headless hooks (useTable, useForm, useList) while packages/antd, packages/mui, and packages/chakra-ui offer optional design system adapters.
2. **Pluggable data provider contract for universal backend integration**: All communication routes through an abstract DataProvider interface (getList, getOne, create, update, delete). Developers can swap between REST, GraphQL, Supabase, Strapi, or NestJS without altering application views.
3. **TanStack Query as the server-state backbone**: Refine adopts TanStack Query (@tanstack/react-query in packages/core) for caching, automatic cache invalidation on mutations, optimistic updates, and background re-validation.
4. **Granular AccessControlProvider for declarative RBAC**: Permissions and role-based access control are enforced via an access control provider interface, checking canAccess rules before rendering navigation items, buttons, or data columns.
5. **Framework agnostic: Vite, Next.js, and Remix support**: The core framework does not enforce a specific bundler or router, providing dedicated router packages for React Router v6, Next.js Pages/App Router, and Remix.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Utilize Next.js 15 App Router: default to React Server Components (RSC) for data fetching. Handle mutations through Server Actions with Zod validation. Keep 'use client' directives restricted strictly to interactive leaf components.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer: client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a enterprise internal tool & crud framework project?

Frequently asked about Refine

What is Refine built with?

Refine is built in TypeScript on top of React and TanStack Query, offering a headless core with optional adapters for Ant Design, Material UI, Mantine, and Chakra UI.

Is Refine tightly coupled to a specific UI library?

No. Refine is 100% headless by design. You can build custom interfaces with Tailwind CSS or use one of the official UI adapters for popular design systems.

Which backend APIs can Refine connect to?

Refine connects to any REST or GraphQL backend via its DataProvider interface, with built-in adapters for Supabase, Strapi, Hasura, NestJS CRUD, and AirTable.

Does Refine support Next.js App Router?

Yes. Refine provides official router packages for Next.js App Router, Pages Router, Vite with React Router, and Remix.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md