# refinedev/refine architecture

> Architecture diagram of the GitHub repository refinedev/refine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/refinedev/refine
- Repository: https://github.com/refinedev/refine

## Overview

Refine is a React meta-framework for CRUD-heavy applications. An application user works through resource pages and UI components; framework hooks coordinate queries and mutations through configured providers, while routing and authentication/access-control shape the experience. The monorepo also supplies UI-framework bindings, backend connectors, Devtools, and project-generation tools. The README documents the product capabilities and sample app wiring; source-index evidence supports selected internal relationships, but unsampled implementations and many package-to-package links are not asserted.

Main entry points: [`packages/core/src/contexts/refine/index.tsx`](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/refine/index.tsx) (Refine application), [`packages/core/src/hooks/data/useUpdateMany.ts`](https://github.com/refinedev/refine/blob/main/packages/core/src/hooks/data/useUpdateMany.ts) (Data hooks), [`packages/devtools-internal/src/use-query-subscription.tsx`](https://github.com/refinedev/refine/blob/main/packages/devtools-internal/src/use-query-subscription.tsx) (Devtools), [`packages/mui/src/hooks/useDataGrid/index.ts`](https://github.com/refinedev/refine/blob/main/packages/mui/src/hooks/useDataGrid/index.ts) (Material UI bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_framework["Core framework"]
  node_refine["Refine application<br/>[index.tsx]"]
  node_data_hooks["Data hooks<br/>[useUpdateMany.ts]"]
  node_data_contract["Data provider contract<br/>[types.ts]"]
  node_auth_access["Auth and access<br/>[index.tsx]"]
  node_routing["Routing<br/>[index.tsx]"]
  node_i18n["Internationalization<br/>[index.tsx]"]
  node_undo_queue["Undo queue<br/>[index.tsx]"]
  node_devtools["Devtools"]
end

subgraph group_ui["UI bindings"]
  node_antd_ui["Ant Design bindings<br/>[useForm.ts]"]
  node_chakra_ui["Chakra UI bindings<br/>[index.ts]"]
  node_mui_ui["Material UI bindings<br/>[index.ts]"]
end

subgraph group_integrations["Providers and routing"]
  node_simple_rest["Simple REST provider<br/>[provider.ts]"]
  node_graphql_provider["GraphQL provider<br/>[index.ts]"]
  node_supabase_provider["Supabase provider<br/>[index.ts]"]
  node_appwrite_provider["Appwrite provider<br/>[dataProvider.ts]"]
  node_react_router["React Router binding"]
end

subgraph group_tooling["Developer tooling"]
  node_cli["Project CLI<br/>[cli.ts]"]
  node_inferencer["Resource inferencer<br/>[index.tsx]"]
  node_devtools_ui["Devtools UI"]
end

node_end_user(("Application user"))
node_resource_pages["Resource pages"]

node_end_user -->|"uses"| node_resource_pages
node_resource_pages -.->|"renders"| node_antd_ui
node_resource_pages -->|"renders"| node_mui_ui
node_mui_ui -->|"requests data"| node_data_hooks
node_refine -.->|"configures hooks"| node_data_hooks
node_data_hooks -->|"uses contract"| node_data_contract
node_refine -->|"configures provider"| node_simple_rest
node_refine -->|"configures routing"| node_react_router
node_refine -->|"supports auth"| node_auth_access
node_refine -->|"supports routing"| node_routing
node_refine -->|"supports i18n"| node_i18n
node_data_hooks -->|"supports undoable"| node_undo_queue
node_data_hooks -->|"reports traces"| node_devtools
node_devtools -.->|"feeds UI"| node_devtools_ui
node_refine -.->|"accepts provider"| node_graphql_provider
node_refine -.->|"accepts provider"| node_supabase_provider
node_refine -.->|"accepts provider"| node_appwrite_provider
node_refine -->|"supports bindings"| node_chakra_ui
node_cli -.->|"scaffolds projects"| node_end_user
node_inferencer -.->|"generates resources"| node_resource_pages

click node_refine "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/refine/index.tsx"
click node_data_hooks "https://github.com/refinedev/refine/blob/main/packages/core/src/hooks/data/useUpdateMany.ts"
click node_data_contract "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/data/types.ts"
click node_auth_access "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/auth/index.tsx"
click node_routing "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/router/index.tsx"
click node_i18n "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/i18n/index.tsx"
click node_undo_queue "https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/undoableQueue/index.tsx"
click node_devtools "https://github.com/refinedev/refine/blob/main/packages/devtools-internal/src/use-query-subscription.tsx"
click node_antd_ui "https://github.com/refinedev/refine/blob/main/packages/antd/src/hooks/form/useForm.ts"
click node_chakra_ui "https://github.com/refinedev/refine/blob/main/packages/chakra-ui/src/components/index.ts"
click node_mui_ui "https://github.com/refinedev/refine/blob/main/packages/mui/src/hooks/useDataGrid/index.ts"
click node_simple_rest "https://github.com/refinedev/refine/blob/main/packages/simple-rest/src/provider.ts"
click node_graphql_provider "https://github.com/refinedev/refine/blob/main/packages/graphql/src/dataProvider/index.ts"
click node_supabase_provider "https://github.com/refinedev/refine/blob/main/packages/supabase/src/dataProvider/index.ts"
click node_appwrite_provider "https://github.com/refinedev/refine/blob/main/packages/appwrite/src/dataProvider.ts"
click node_react_router "https://github.com/refinedev/refine/blob/main/packages/react-router/src/document-title-handler.tsx"
click node_cli "https://github.com/refinedev/refine/blob/main/packages/cli/src/cli.ts"
click node_inferencer "https://github.com/refinedev/refine/blob/main/packages/inferencer/src/create-inferencer/index.tsx"
click node_devtools_ui "https://github.com/refinedev/refine/blob/main/packages/devtools-ui/src/components/monitor-highlight-handler.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_refine,node_data_hooks,node_data_contract,node_auth_access,node_routing,node_i18n,node_undo_queue,node_devtools,node_end_user toneBlue
class node_antd_ui,node_chakra_ui,node_mui_ui toneAmber
class node_simple_rest,node_graphql_provider,node_supabase_provider,node_appwrite_provider,node_react_router toneMint
class node_cli,node_inferencer,node_devtools_ui toneRose
class node_resource_pages toneIndigo
```

## Components

### Core framework

- [Refine application](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/refine/index.tsx): `packages/core/src/contexts/refine/index.tsx`
- [Data hooks](https://github.com/refinedev/refine/blob/main/packages/core/src/hooks/data/useUpdateMany.ts): `packages/core/src/hooks/data/useUpdateMany.ts`
- [Data provider contract](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/data/types.ts): `packages/core/src/contexts/data/types.ts`
- [Auth and access](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/auth/index.tsx): `packages/core/src/contexts/auth/index.tsx`
- [Routing](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/router/index.tsx): `packages/core/src/contexts/router/index.tsx`
- [Internationalization](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/i18n/index.tsx): `packages/core/src/contexts/i18n/index.tsx`
- [Undo queue](https://github.com/refinedev/refine/blob/main/packages/core/src/contexts/undoableQueue/index.tsx): `packages/core/src/contexts/undoableQueue/index.tsx`
- [Devtools](https://github.com/refinedev/refine/blob/main/packages/devtools-internal/src/use-query-subscription.tsx): `packages/devtools-internal/src/use-query-subscription.tsx`

### UI bindings

- [Ant Design bindings](https://github.com/refinedev/refine/blob/main/packages/antd/src/hooks/form/useForm.ts): `packages/antd/src/hooks/form/useForm.ts`
- [Chakra UI bindings](https://github.com/refinedev/refine/blob/main/packages/chakra-ui/src/components/index.ts): `packages/chakra-ui/src/components/index.ts`
- [Material UI bindings](https://github.com/refinedev/refine/blob/main/packages/mui/src/hooks/useDataGrid/index.ts): `packages/mui/src/hooks/useDataGrid/index.ts`

### Providers and routing

- [Simple REST provider](https://github.com/refinedev/refine/blob/main/packages/simple-rest/src/provider.ts): `packages/simple-rest/src/provider.ts`
- [GraphQL provider](https://github.com/refinedev/refine/blob/main/packages/graphql/src/dataProvider/index.ts): `packages/graphql/src/dataProvider/index.ts`
- [Supabase provider](https://github.com/refinedev/refine/blob/main/packages/supabase/src/dataProvider/index.ts): `packages/supabase/src/dataProvider/index.ts`
- [Appwrite provider](https://github.com/refinedev/refine/blob/main/packages/appwrite/src/dataProvider.ts): `packages/appwrite/src/dataProvider.ts`
- [React Router binding](https://github.com/refinedev/refine/blob/main/packages/react-router/src/document-title-handler.tsx): `packages/react-router/src/document-title-handler.tsx`

### Developer tooling

- [Project CLI](https://github.com/refinedev/refine/blob/main/packages/cli/src/cli.ts): `packages/cli/src/cli.ts`
- [Resource inferencer](https://github.com/refinedev/refine/blob/main/packages/inferencer/src/create-inferencer/index.tsx): `packages/inferencer/src/create-inferencer/index.tsx`
- [Devtools UI](https://github.com/refinedev/refine/blob/main/packages/devtools-ui/src/components/monitor-highlight-handler.tsx): `packages/devtools-ui/src/components/monitor-highlight-handler.tsx`

### Other components

- **Application user**
- **Resource pages**

## Connections

- Application user → Resource pages: uses (evidence: `README.md`)
- Resource pages → Ant Design bindings: renders
- Resource pages → Material UI bindings: renders (evidence: `README.md`)
- Material UI bindings → Data hooks: requests data (evidence: `README.md`)
- Refine application → Data hooks: configures hooks
- Data hooks → Data provider contract: uses contract (evidence: `packages/core/src/hooks/data/useUpdateMany.ts`)
- Refine application → Simple REST provider: configures provider (evidence: `README.md`)
- Refine application → React Router binding: configures routing (evidence: `README.md`)
- Refine application → Auth and access: supports auth (evidence: `README.md`)
- Refine application → Routing: supports routing (evidence: `README.md`)
- Refine application → Internationalization: supports i18n (evidence: `README.md`)
- Data hooks → Undo queue: supports undoable (evidence: `packages/core/src/hooks/data/useUpdateMany.ts`)
- Data hooks → Devtools: reports traces (evidence: `packages/core/src/hooks/data/useUpdateMany.ts`)
- Devtools → Devtools UI: feeds UI
- Refine application → GraphQL provider: accepts provider
- Refine application → Supabase provider: accepts provider
- Refine application → Appwrite provider: accepts provider
- Refine application → Chakra UI bindings: supports bindings (evidence: `README.md`)
- Project CLI → Application user: scaffolds projects
- Resource inferencer → Resource pages: generates resources
