diff --git a/.cursorignore b/.cursorignore index 4a08a3d2d866..56c572546fc2 100644 --- a/.cursorignore +++ b/.cursorignore @@ -3,7 +3,15 @@ .husky/ .vscode/ cypress/ -documentation/ +documentation/.docusaurus/ +documentation/build/ +documentation/node_modules/ +documentation/plugins/ +documentation/src/ +documentation/static/ +documentation/test/ +documentation/versioned_docs/ +documentation/versioned_sidebars/ examples/ hackathon/ patches/ @@ -14,10 +22,10 @@ CONTRIBUTING.md LICENSE README.md SECURITY.md -*.md packages/**/tsconfig.json packages/**/tsconfig.test.json packages/**/tsconfig.declarations.json packages/**/jest.config.js packages/**/refine.config.js packages/**/tsup.config.ts +dist/ diff --git a/documentation/docs/enterprise-edition/index.md b/documentation/docs/enterprise-edition/index.md new file mode 100644 index 000000000000..7d28d4e07d17 --- /dev/null +++ b/documentation/docs/enterprise-edition/index.md @@ -0,0 +1,58 @@ +--- +title: Getting Started +--- + +## Overview + +While Refine Community Edition follows monthly release cycles, [Enterprise Edition](/enterprise) features are released continuously as they are merged to `next` branch. + +Refine EE packages are distributed through our private NPM registry at `registry.refine.dev` under `@refinedev` scope. + +## Setting up private registry + +To use Refine Enterprise Edition packages, you need to configure your project to use our private registry for `@refinedev` scoped packages. + +Create or edit `.npmrc` file in your project root with the following content: + +``` +@refinedev:registry=https://registry.refine.dev +//registry.refine.dev/:_authToken=${REFINE_NPM_TOKEN} +``` + +There are two ways to set up your authentication token: + +1. **Environment Variable (Recommended)** + + Add the token to your environment variables: + + ```bash + export REFINE_NPM_TOKEN=your-token-here + ``` + +2. **Direct in .npmrc** + + You can also directly add the token to your `.npmrc` file (not recommended for security reasons): + + ```plaintext + @refinedev:registry=https://registry.refine.dev + //registry.refine.dev/:_authToken=your-token-here + ``` + +Once you've configured the registry and authentication, you can install enterprise packages using npm or yarn: + + + +## Release Cycle + +Enterprise Edition packages follow the same versioning scheme as Community Edition but with continuous releases as features are developed and merged. + +Let's look at an example to understand the release cycle: + +1. Current version of `@refinedev/core` is `4.57.1` +2. A new feature or fix is developed and merged +3. Enterprise Edition immediately gets a new release as `4.57.2` +4. Community Edition will include this change in the next monthly release as `4.57.3` + +This means Enterprise Edition users get access to new updates as soon as they are ready, while Community Edition users receive updates in regular monthly cycles. + +**Note: in cases of critical bugs or security vulnerabilities, we release updates immediately for both Enterprise and Community editions. This is an exception to the regular monthly release cycle for Community Edition.** diff --git a/documentation/docs/enterprise-edition/multitenancy/index.md b/documentation/docs/enterprise-edition/multitenancy/index.md index cda08cad5673..4c7843304016 100644 --- a/documentation/docs/enterprise-edition/multitenancy/index.md +++ b/documentation/docs/enterprise-edition/multitenancy/index.md @@ -12,12 +12,12 @@ pre-built components and hooks with minimal configuration. This package is included in Refine's Enterprise Edition. To learn more about Refine's Enterprise Edition, please [contact us](https://s.refine.dev/okta-enterprise). - + ```yml title=".npmrc" -# A registry with the auth token should be added for the @refinedev-ee scope -@refinedev-ee:registry=https://registry.npmjs.org/ -//registry.npmjs.org/:_authToken=$NPM_TOKEN +# A registry with the auth token should be added for the @refinedev scope +@refinedev:registry=https://registry.refine.dev/ +//registry.refine.dev/:_authToken=$NPM_TOKEN ``` @@ -27,8 +27,8 @@ This package is included in Refine's Enterprise Edition. To learn more about Ref To use the multitenancy feature, we need to wrap our application with the `` component and provide the `multitenancyProvider` prop. ```tsx -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { useRouterAdapter, WithTenant } from "@refinedev-ee/multitenancy"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { useRouterAdapter, WithTenant } from "@refinedev/multitenancy"; type Tenant = { id: string; @@ -88,7 +88,7 @@ Adapters define where tenant information is stored. Refine offers `useRouterAdap Extracts the tenantId from the URL and updates the route when the tenant changes. ```tsx -import { useRouterAdapter } from "@refinedev-ee/multitenancy"; +import { useRouterAdapter } from "@refinedev/multitenancy"; const multitenancyProvider = { adapter: useRouterAdapter({ @@ -110,7 +110,7 @@ const multitenancyProvider = { Retrieves tenantId from local storage and updates it when the tenant changes. ```tsx -import { useLocalStorageAdapter } from "@refinedev-ee/multitenancy"; +import { useLocalStorageAdapter } from "@refinedev/multitenancy"; const multitenancyProvider = { adapter: useLocalStorageAdapter({ @@ -130,8 +130,8 @@ const multitenancyProvider = { The `` component is required to wrap your app code. It fetches `tenants`, handling the loading state and error state. ```tsx -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { WithTenant } from "@refinedev-ee/multitenancy"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { WithTenant } from "@refinedev/multitenancy"; ```tsx -import { TenantSelect } from "@refinedev-ee/multitenancy/antd"; +import { TenantSelect } from "@refinedev/multitenancy/antd"; ```tsx -import { TenantSelect } from "@refinedev-ee/multitenancy/mui"; +import { TenantSelect } from "@refinedev/multitenancy/mui"; + ```yml title=".npmrc" -# A registry with the auth token should be added for the @refinedev-ee scope -@refinedev-ee:registry=https://registry.npmjs.org/ -//registry.npmjs.org/:_authToken=$NPM_TOKEN +# A registry with the auth token should be added for the @refinedev scope +@refinedev:registry=https://registry.refine.dev/ +//registry.refine.dev/:_authToken=$NPM_TOKEN ``` @@ -37,7 +37,7 @@ import routerProvider, { CatchAllNavigate, NavigateToResource, } from "@refinedev/react-router"; -import { createAuthProvider, OktaCallback } from "@refinedev-ee/okta"; +import { createAuthProvider, OktaCallback } from "@refinedev/okta"; const oktaAuth = new OktaAuth({ issuer: "https://{yourOktaDomain}/oauth2/default", diff --git a/documentation/docs/guides-concepts/multitenancy/examples/nextjs.tsx b/documentation/docs/guides-concepts/multitenancy/examples/nextjs.tsx index 6671e8d6cb87..6337c71904a5 100644 --- a/documentation/docs/guides-concepts/multitenancy/examples/nextjs.tsx +++ b/documentation/docs/guides-concepts/multitenancy/examples/nextjs.tsx @@ -46,10 +46,10 @@ export default function RouteDefinitions() { const AppTsxCode = /* jsx */ ` import React from "react"; -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { WithTenant } from "@refinedev-ee/multitenancy"; -import routerProvider from "@refinedev-ee/nextjs-router/pages"; -import dataProvider from "@refinedev-ee/simple-rest"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { WithTenant } from "@refinedev/multitenancy"; +import routerProvider from "@refinedev/nextjs-router/pages"; +import dataProvider from "@refinedev/simple-rest"; import type { AppProps } from "next/app"; import { multitenancyProvider } from "./providers/multitenancy"; @@ -87,7 +87,7 @@ export default App; const ListTsxCode = /* jsx */ ` import React from "react"; -import { useList } from "@refinedev-ee/core"; +import { useList } from "@refinedev/core"; export default function ProductsList() { const { data, isLoading } = useList(); @@ -112,7 +112,7 @@ export default function ProductsList() { const CreateTsxCode = /* jsx */ ` import React from "react"; -import { useCreate } from "@refinedev-ee/core"; +import { useCreate } from "@refinedev/core"; export default function ProductsCreate() { const { onFinish } = useForm(); @@ -133,7 +133,7 @@ export default function ProductsCreate() { const ShowTsxCode = /* jsx */ ` import React from "react"; -import { useShow } from "@refinedev-ee/core"; +import { useShow } from "@refinedev/core"; export default function ProductsShow() { const { query: { data, isLoading } } = useShow(); @@ -155,7 +155,7 @@ export default function ProductsShow() { const EditTsxCode = /* jsx */ ` import React from "react"; -import { useForm } from "@refinedev-ee/core"; +import { useForm } from "@refinedev/core"; export default function ProductsEdit() { const { onFinish, query, formLoading } = useForm(); @@ -179,9 +179,9 @@ export default function ProductsEdit() { `.trim(); const MultitenancyProviderTsxCode = /* jsx */ ` -import type { MultiTenancyProvider } from "@refinedev-ee/enterprise"; -import { useRouterAdapter } from "@refinedev-ee/multitenancy"; -import dataProvider from "@refinedev-ee/simple-rest"; +import type { MultiTenancyProvider } from "@refinedev/enterprise"; +import { useRouterAdapter } from "@refinedev/multitenancy"; +import dataProvider from "@refinedev/simple-rest"; export type Tenant = { id: string; diff --git a/documentation/docs/guides-concepts/multitenancy/examples/react-router.tsx b/documentation/docs/guides-concepts/multitenancy/examples/react-router.tsx index f33bcdbc8201..b260a260f753 100644 --- a/documentation/docs/guides-concepts/multitenancy/examples/react-router.tsx +++ b/documentation/docs/guides-concepts/multitenancy/examples/react-router.tsx @@ -27,10 +27,10 @@ export default function RouteDefinitions() { } const AppTsxCode = /* jsx */ ` -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { WithTenant } from "@refinedev-ee/multitenancy"; -import dataProvider from "@refinedev-ee/simple-rest"; -import routerProvider from "@refinedev-ee/react-router-v6"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { WithTenant } from "@refinedev/multitenancy"; +import dataProvider from "@refinedev/simple-rest"; +import routerProvider from "@refinedev/react-router-v6"; import { BrowserRouter, Outlet, Routes, Route } from "react-router"; @@ -79,8 +79,8 @@ export const App: React.FC = () => { `.trim(); const MultitenancyProviderTsxCode = /* jsx */ ` -import type { MultiTenancyProvider } from "@refinedev-ee/core"; -import { useRouterAdapter } from "@refinedev-ee/multitenancy"; +import type { MultiTenancyProvider } from "@refinedev/core"; +import { useRouterAdapter } from "@refinedev/multitenancy"; import dataProvider from "@refinedev/simple-rest"; export type Tenant = { diff --git a/documentation/docs/guides-concepts/multitenancy/examples/remix.tsx b/documentation/docs/guides-concepts/multitenancy/examples/remix.tsx index a54f6ac96949..e80a5f818619 100644 --- a/documentation/docs/guides-concepts/multitenancy/examples/remix.tsx +++ b/documentation/docs/guides-concepts/multitenancy/examples/remix.tsx @@ -55,10 +55,10 @@ import { ScrollRestoration, } from "@remix-run/react"; -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { WithTenant } from "@refinedev-ee/multitenancy"; -import routerProvider from "@refinedev-ee/remix-router"; -import dataProvider from "@refinedev-ee/simple-rest"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { WithTenant } from "@refinedev/multitenancy"; +import routerProvider from "@refinedev/remix-router"; +import dataProvider from "@refinedev/simple-rest"; import { multitenancyProvider } from "./providers/multitenancy"; @@ -105,7 +105,7 @@ export default function App() { const ListTsxCode = /* jsx */ ` import React from "react"; -import { useList } from "@refinedev-ee/core"; +import { useList } from "@refinedev/core"; export default function ProductsList() { const { data, isLoading } = useList(); @@ -130,7 +130,7 @@ export default function ProductsList() { const CreateTsxCode = /* jsx */ ` import React from "react"; -import { useCreate } from "@refinedev-ee/core"; +import { useCreate } from "@refinedev/core"; export default function ProductsCreate() { const { onFinish } = useForm(); @@ -151,7 +151,7 @@ export default function ProductsCreate() { const ShowTsxCode = /* jsx */ ` import React from "react"; -import { useShow } from "@refinedev-ee/core"; +import { useShow } from "@refinedev/core"; export default function ProductsShow() { const { @@ -175,7 +175,7 @@ export default function ProductsShow() { const EditTsxCode = /* jsx */ ` import React from "react"; -import { useForm } from "@refinedev-ee/core"; +import { useForm } from "@refinedev/core"; export default function ProductsEdit() { const { onFinish, query, formLoading } = useForm(); @@ -199,9 +199,9 @@ export default function ProductsEdit() { `.trim(); const MultitenancyProviderTsxCode = /* jsx */ ` -import type { MultiTenancyProvider } from "@refinedev-ee/enterprise"; -import { useRouterAdapter } from "@refinedev-ee/multitenancy"; -import dataProvider from "@refinedev-ee/simple-rest"; +import type { MultiTenancyProvider } from "@refinedev/enterprise"; +import { useRouterAdapter } from "@refinedev/multitenancy"; +import dataProvider from "@refinedev/simple-rest"; export type Tenant = { id: string; diff --git a/documentation/docs/guides-concepts/multitenancy/index.md b/documentation/docs/guides-concepts/multitenancy/index.md index 322a3e40867a..69fae0befe66 100644 --- a/documentation/docs/guides-concepts/multitenancy/index.md +++ b/documentation/docs/guides-concepts/multitenancy/index.md @@ -25,13 +25,13 @@ Multitenancy, especially in cloud-based systems or software solutions, refers to ## Implementing Multitenancy in Refine -In the next sections, we'll show you how to set up multitenancy in Refine using a route-based approach. We'll use the [`multitenancyProvider`](/docs/enterprise-edition/multitenancy/) from the `"@refinedev-ee/enterprise"` package. This Multi-Tenancy Provider is part of the [Refine Enterprise Edition](https://refine.dev/enterprise/). It makes managing multi-tenant applications easier by providing tools like context, hooks, and components that are designed to handle tenants. +In the next sections, we'll show you how to set up multitenancy in Refine using a route-based approach. We'll use the [`multitenancyProvider`](/docs/enterprise-edition/multitenancy/) from the `"@refinedev/enterprise"` package. This Multi-Tenancy Provider is part of the [Refine Enterprise Edition](https://refine.dev/enterprise/). It makes managing multi-tenant applications easier by providing tools like context, hooks, and components that are designed to handle tenants. ### 1. Setting up the Multitenancy Provider -First, we need to install the `@refinedev-ee/enterprise` and `@refinedev-ee/multitenancy` packages. +First, we need to install the `@refinedev/enterprise` and `@refinedev/multitenancy` packages. - + Then we need to change `` component to `` in your `App.tsx` file. You can use same props of `` component in `` component. @@ -39,7 +39,7 @@ Then we need to change `` component to `` in your ```diff - import { Refine } from "@refinedev/core"; -+ import { RefineEnterprise } from "@refinedev-ee/enterprise"; ++ import { RefineEnterprise } from "@refinedev/enterprise"; export const App = () => { return ( @@ -65,8 +65,8 @@ After that, we need to provide the [`multitenancyProvider`](/docs/enterprise-edi When you mount `` and `` components and provide the [`multitenancyProvider`](/docs/enterprise-edition/multitenancy/) prop, Refine will automatically extract the `tenantId` from the route and pass it to the data provider in the `meta` object. ```tsx -import { RefineEnterprise } from "@refinedev-ee/enterprise"; -import { useRouterAdapter, WithTenant } from "@refinedev-ee/multitenancy"; +import { RefineEnterprise } from "@refinedev/enterprise"; +import { useRouterAdapter, WithTenant } from "@refinedev/multitenancy"; // ... other imports @@ -147,7 +147,7 @@ To customize the data providers, you can override each method in the data provid An example implementation of a custom `getList` method is shown below. ```ts -import dataProvider from "@refinedev-ee/simple-rest"; +import dataProvider from "@refinedev/simple-rest"; const API_URL = ""; const baseDataProvider = dataProvider(API_URL); @@ -182,14 +182,14 @@ const customDataProvider = { Now we've defined our routes and data providers to use `tenantId` to determine which tenant is being accessed. We'll need to add a tenant selector to the UI to allow users to switch between tenants. -You can use the Tenant selector components from the `@refinedev-ee/multitenancy` package to easily add a tenant selector to your app. +You can use the Tenant selector components from the `@refinedev/multitenancy` package to easily add a tenant selector to your app. ```tsx -import { TenantSelect } from "@refinedev-ee/multitenancy/antd"; +import { TenantSelect } from "@refinedev/multitenancy/antd"; ; ``` @@ -199,7 +199,7 @@ import { TenantSelect } from "@refinedev-ee/multitenancy/antd"; ```tsx -import { TenantSelect } from "@refinedev-ee/multitenancy/mui"; +import { TenantSelect } from "@refinedev/multitenancy/mui"; ; ``` diff --git a/documentation/sidebars.js b/documentation/sidebars.js index c48655e59ac2..3e7d3c14334c 100644 --- a/documentation/sidebars.js +++ b/documentation/sidebars.js @@ -918,6 +918,7 @@ module.exports = { label: "Enterprise Edition", className: "category-as-header", items: [ + "enterprise-edition/index", "enterprise-edition/okta/index", "enterprise-edition/devtools/index", "enterprise-edition/multitenancy/index",