Agents.md
React-admin is a comprehensive frontend framework for building B2B and admin applications on top of REST/GraphQL APIs, using TypeScript, React, and Material UI. It's an open-source project maintained by Marmelab that provides a complete solution for B2B applications with data-driven interfaces.
dataProvider, authProvider, i18nProvider)ra-core contains all logic without UI; ra-ui-materialui provides the Material UI layer. This separation is intentional — don't couple logic to UIra-core/src/controller/ expose business logic via hooks; views in ra-ui-materialui/src/ handle renderinguseEvent() internal hook — use this for memoized event handlers instead of useCallbackReact.cloneElement() — it breaks compositionreact-admin/
├── packages/ # Lerna-managed packages
│ ├── ra-core/ # Core logic, hooks, controllers
│ ├── ra-ui-materialui/ # Material UI components
│ ├── react-admin/ # Main distribution package
│ ├── ra-data-*/ # Data provider adapters
│ ├── ra-i18n-*/ # i18n providers
│ └── ra-language-*/ # Translation packages
├── examples/ # Example applications
│ ├── simple/ # E2E test app
│ ├── demo/ # Full e-commerce demo
│ ├── crm/ # CRM application
│ └── tutorial/ # Tutorial app
├── cypress/ # E2E test configuration
├── docs/ # Jekyll documentation
├── docs_headless/ # Astro + Starlight documentation for headless components
└── scripts/ # Build scripts
All changes must include tests.
*.stories.tsx covering all props. Use FakeRest for mock data. Make data realistic — stories are used for screenshots and visual testing*.spec.tsx files should reuse the component's stories as test cases. Assert on user-visible output (text, interactions), not implementation details or HTML attributesexamples/simple/. Only for critical user pathsEvery new feature or API change must be documented.
/docs/ (Jekyll) — one Markdown file per component or hook. Each file must include: description, usage examples, props/parameters list (required first, then alphabetical), detailed usage per prop, and recipes if applicable/docs_headless/ (Astro + Starlight) — documents headless hooks and components from ra-corenext for features, master for bug fixes or documentation[Doc] or [TypeScript] if the change only concerns docs or typesfix: Prevent duplicate API calls in useGetList hook
feat: Add support for custom row actions in Datagrid
docs: Clarify dataProvider response format
make lint # ESLint checks
make typecheck # TypeScript type checking
make prettier # Prettier formatting