Skip to content

pipech/refine-frappe-provider

Repository files navigation

Integration for Frappe Framework with Refine

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.

Install

npm i refine-frappe-provider

Usage

// 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)
    }
  />
);

Important Notes

  • 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.

License

This project is licensed under the MIT License.

About

🙏 Integration for Frappe Framework with Refine

Resources

License

Stars

Watchers

Forks

Packages

No packages published