The refine-frappe-provider
serves as a comprehensive data, access control, and authentication provider for Refine, facilitating effortless integration with the Frappe Framework.
Frappe is a full stack, batteries-included, web framework written in Python and Javascript.
Refine is a React-based framework for building internal tools, rapidly.
npm i refine-frappe-provider
// App.tsx
import { Refine } from "@refinedev/core";
import {
accessControlProvider,
authProvider,
dataProvider,
type ClientParams,
} from "refine-frappe-provider";
const providerConfig = {
url: 'https://frappe-server-url.com',
} satisfies ClientParams;
const App = () => (
<Refine
/* ... */
accessControlProvider={
accessControlProvider(providerConfig)
}
authProvider={
authProvider(providerConfig)
}
dataProvider={
dataProvider(providerConfig)
}
/>
);
- Ensure that the response from the Frappe server is configured to set cookies correctly on the Refine site. This requires proper configuration of Cross-Origin Resource Sharing (CORS) settings.
This project is licensed under the MIT License.