refine-frappe-provider
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i refine-frappe-provider

Weekly Downloads

3

Version

0.0.5

License

MIT

Unpacked Size

369 kB

Total Files

102

Last publish

Collaborators

  • pipech