diff --git a/.github/workflows/test-local.yaml b/.github/workflows/test-local.yaml
index c993ba2ce..18ea351e3 100644
--- a/.github/workflows/test-local.yaml
+++ b/.github/workflows/test-local.yaml
@@ -119,61 +119,3 @@ jobs:
CYPRESS_DATA_PROVIDER: ${{ matrix.data_provider }}
CYPRESS_UI_FRAMEWORK: ${{ matrix.ui_framework }}
CYPRESS_AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}
- remix:
- runs-on: ubuntu-latest
- name: remix
- concurrency:
- group: ${{ github.ref }}-e2e-local-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
- cancel-in-progress: true
- strategy:
- fail-fast: false
- matrix:
- data_provider:
- [
- custom-json-rest,
- strapi-v4,
- nestjsx-crud,
- airtable,
- supabase,
- appwrite,
- hasura,
- ]
- ui_framework: [tailwindcss, antd, mui, no]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: 18
- - name: Install
- run: npm install
- - name: Build Examples
- id: build_step
- run: node ./.github/workflows/build-template.js
- env:
- FRAMEWORK: remix
- DATA_PROVIDER: ${{ matrix.data_provider }}
- UI_FRAMEWORK: ${{ matrix.ui_framework }}
- - name: Install Deps
- run: |
- cd ${{ steps.build_step.outputs.project_path }}
- npm install
- npm run build
- HOST=0.0.0.0 npm run start &
- - name: Run Cypress on local
- uses: cypress-io/github-action@v6
- with:
- install: false
- record: true
- start: "npm ls"
- wait-on: "http://0.0.0.0:3000"
- group: e2e-local-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}-${{ steps.build_step.outputs.auth_provider }}
- env:
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- CYPRESS_USER_AGENT: ${{ secrets.CI_USER_AGENT }}
- CYPRESS_FRAMEWORK: remix
- CYPRESS_DATA_PROVIDER: ${{ matrix.data_provider }}
- CYPRESS_UI_FRAMEWORK: ${{ matrix.ui_framework }}
- CYPRESS_AUTH_PROVIDER: ${{ steps.build_step.outputs.auth_provider }}
diff --git a/.github/workflows/test-remote.yaml b/.github/workflows/test-remote.yaml
index 1b8c0db04..c33920ece 100644
--- a/.github/workflows/test-remote.yaml
+++ b/.github/workflows/test-remote.yaml
@@ -121,61 +121,3 @@ jobs:
CYPRESS_DATA_PROVIDER: ${{ matrix.data_provider }}
CYPRESS_UI_FRAMEWORK: ${{ matrix.ui_framework }}
CYPRESS_AUTH_PROVIDER: ${{ steps.download_step.outputs.auth_provider }}
- refine-remix:
- runs-on: ubuntu-latest
- name: Remix
- concurrency:
- group: ${{ github.ref }}-e2e-remote-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}
- cancel-in-progress: true
- strategy:
- fail-fast: false
- matrix:
- data_provider:
- [
- custom-json-rest,
- strapi-v4,
- nestjsx-crud,
- airtable,
- supabase,
- appwrite,
- hasura,
- ]
- ui_framework: [tailwindcss, antd, mui, no]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - uses: actions/setup-node@v3
- with:
- node-version: 18
- - name: Install
- run: npm install
- - name: Download Example
- id: download_step
- run: node ./.github/workflows/build-remote.js
- env:
- FRAMEWORK: remix
- CI_USER_AGENT: ${{ secrets.CI_USER_AGENT }}
- DATA_PROVIDER: ${{ matrix.data_provider }}
- UI_FRAMEWORK: ${{ matrix.ui_framework }}
- - name: Install & Build Deps
- run: |
- cd ${{ steps.download_step.outputs.project_path }}
- npm install
- npm run build
- HOST=0.0.0.0 npm run start &
- - name: Run Cypress on local
- uses: cypress-io/github-action@v6
- with:
- install: false
- record: true
- start: "npm ls"
- wait-on: "http://localhost:3000"
- group: e2e-remote-remix-${{ matrix.data_provider }}-${{ matrix.ui_framework }}-${{ steps.download_step.outputs.auth_provider }}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- CYPRESS_USER_AGENT: ${{ secrets.CI_USER_AGENT }}
- CYPRESS_FRAMEWORK: remix
- CYPRESS_DATA_PROVIDER: ${{ matrix.data_provider }}
- CYPRESS_UI_FRAMEWORK: ${{ matrix.ui_framework }}
- CYPRESS_AUTH_PROVIDER: ${{ steps.download_step.outputs.auth_provider }}
diff --git a/cypress/e2e/build-test.cy.js b/cypress/e2e/build-test.cy.js
index c87966225..e3def8655 100644
--- a/cypress/e2e/build-test.cy.js
+++ b/cypress/e2e/build-test.cy.js
@@ -11,15 +11,6 @@ const shouldSkip = () => {
return true;
}
- if (
- Cypress.env("FRAMEWORK") === "remix" &&
- Cypress.env("UI_FRAMEWORK") === "antd"
- ) {
- cy.log("Remix with Antd has known issues, skipping.");
-
- return true;
- }
-
return false;
};
@@ -120,11 +111,8 @@ describe("build test", () => {
cy.contains("Blog Posts", { matchCase: false }).should("exist");
// document title check
- // ignore remix and nextjs
- if (
- Cypress.env("FRAMEWORK") !== "remix" &&
- Cypress.env("FRAMEWORK") !== "nextjs"
- ) {
+ // ignore nextjs
+ if (Cypress.env("FRAMEWORK") !== "nextjs") {
cy.title().should("eq", "Blog posts | Refine");
}
diff --git a/presets.js b/presets.js
index e2a34c3fe..d05bf4178 100644
--- a/presets.js
+++ b/presets.js
@@ -39,18 +39,6 @@ module.exports = {
"headless-example": "no",
},
},
- {
- name: "refine-headless-remix",
- type: "refine-remix",
- answers: {
- "ui-framework": "no",
- "data-provider": "data-provider-custom-json-rest",
- "auth-provider": "none",
- "antd-example": "no",
- "mui-example": "no",
- "headless-example": "no",
- },
- },
{
name: "refine-antd-nextjs",
type: "refine-nextjs",
@@ -124,17 +112,5 @@ module.exports = {
"headless-example": "no",
},
},
- {
- name: "remix-tailwindcss",
- type: "refine-remix",
- answers: {
- "ui-framework": "tailwindcss",
- "data-provider": "data-provider-custom-json-rest",
- "auth-provider": "none",
- "antd-example": "no",
- "mui-example": "no",
- "headless-example": "no",
- },
- },
],
};
diff --git a/refine-remix/plugins/_base/app/components/app-icon/index.tsx b/refine-remix/plugins/_base/app/components/app-icon/index.tsx
deleted file mode 100644
index 7c6d8b375..000000000
--- a/refine-remix/plugins/_base/app/components/app-icon/index.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import React from "react";
-
-export const AppIcon: React.FC = () => {
- return (
- <%_ if (selectedSvg) { _%>
- <%- selectedSvg %>
- <%_ } _%>
- )
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/_base/app/components/breadcrumb/index.tsx b/refine-remix/plugins/_base/app/components/breadcrumb/index.tsx
deleted file mode 100644
index 18420f1eb..000000000
--- a/refine-remix/plugins/_base/app/components/breadcrumb/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useBreadcrumb } from "@refinedev/core";
-import { Link } from "@remix-run/react";
-
-export const Breadcrumb = () => {
- const { breadcrumbs } = useBreadcrumb();
-
- return (
-
- {breadcrumbs.map((breadcrumb) => {
- return (
- -
- {breadcrumb.href ? (
- {breadcrumb.label}
- ) : (
- {breadcrumb.label}
- )}
-
- );
- })}
-
- );
-};
diff --git a/refine-remix/plugins/_base/app/components/layout/index.tsx b/refine-remix/plugins/_base/app/components/layout/index.tsx
deleted file mode 100644
index bae0f7f2c..000000000
--- a/refine-remix/plugins/_base/app/components/layout/index.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import type { PropsWithChildren } from "react";
-import { Breadcrumb } from "../breadcrumb";
-import { Menu } from "../menu";
-
-export const Layout: React.FC = ({ children }) => {
- return (
-
- );
-};
diff --git a/refine-remix/plugins/_base/app/components/menu/index.tsx b/refine-remix/plugins/_base/app/components/menu/index.tsx
deleted file mode 100644
index 482a5c12c..000000000
--- a/refine-remix/plugins/_base/app/components/menu/index.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import {
- <%_ if (_app.isAuthProviderCheck || _app.isNextAuthCheck) { _%>
- useLogout,
- <%_ } _%>
- useMenu
-} from "@refinedev/core";
-import { NavLink } from "@remix-run/react";
-
-export const Menu = () => {
- <%_ if (_app.isAuthProviderCheck || _app.isNextAuthCheck) { _%>
- const { mutate: logout } = useLogout();
- <%_ } _%>
- const { menuItems } = useMenu();
-
- return (
-
- );
-};
diff --git a/refine-remix/plugins/_base/app/global.css b/refine-remix/plugins/_base/app/global.css
deleted file mode 100644
index 7d0bec252..000000000
--- a/refine-remix/plugins/_base/app/global.css
+++ /dev/null
@@ -1,88 +0,0 @@
-body {
- margin: 0px;
-}
-
-table {
- border-spacing: 0;
- border: 1px solid black;
-}
-
-table th,
-td {
- margin: 0;
- padding: 0.5rem;
- border-bottom: 1px solid black;
- border-right: 1px solid black;
-}
-
-table tr:last-child td {
- border-bottom: 0;
-}
-
-table th,
-td {
- margin: 0;
- padding: 0.5rem;
- border-bottom: 1px solid black;
- border-right: 1px solid black;
-}
-
-table th:last-child,
-td:last-child {
- border-right: 0;
-}
-
-.layout {
- display: flex;
- gap: 16px;
-}
-
-@media screen and (max-width: 751px) {
- .layout {
- display: block;
- }
-}
-
-.layout .content {
- display: flex;
- flex-direction: column;
- flex-grow: 1;
-}
-
-.breadcrumb {
- display: flex;
- gap: 24px;
- list-style-type: "/ ";
- padding: 8px 16px;
- border-bottom: 1px solid lightgray;
-}
-
-.breadcrumb a {
- color: blue;
- text-decoration: none;
-}
-
-.menu {
- flex-shrink: 0;
- padding: 8px 16px;
- border-right: 1px solid lightgray;
-}
-
-.menu a {
- color: black;
-}
-
-.menu .active {
- font-weight: bold;
-}
-
-@media screen and (max-width: 751px) {
- .menu {
- border-right: none;
- border-bottom: 1px solid lightgray;
- }
-}
-
-.menu ul {
- padding-left: 16px;
-}
diff --git a/refine-remix/plugins/_base/extend.js b/refine-remix/plugins/_base/extend.js
deleted file mode 100644
index b309951f9..000000000
--- a/refine-remix/plugins/_base/extend.js
+++ /dev/null
@@ -1,225 +0,0 @@
-const base = {
- _app: {
- isNextAuthCheck: false,
- isAuthProviderCheck: false,
- hasRoutes: true,
- loader: [],
- authPageProps: [],
- localImport: [],
- refineAntdImports: [],
- refineMuiImports: [],
- styleImport: [],
- },
- selectedTheme: "Blue",
- selectedTitle: undefined,
- selectedSvg: undefined,
- isGraphQL: false,
- blogPostCategoryFieldName: "category",
- blogPostCategoryTableField: `"category"`,
- blogPostCategoryIdFormField: `["category", "id"]`,
- blogPostStatusOptions: [],
- blogPostStatusDefaultValue: `"draft"`,
-};
-
-module.exports = {
- extend(answers) {
- const dataProvider = answers["data-provider"];
- const authProvider = answers["auth-provider"];
- const uiFramework = answers["ui-framework"];
- const isHeadless =
- uiFramework === "no" || uiFramework === "tailwindcss";
-
- // ## isNextAuthCheck
- if (
- authProvider === "auth-provider-auth0" ||
- authProvider === "auth-provider-google" ||
- authProvider === "auth-provider-keycloak"
- ) {
- base._app.isNextAuthCheck = true;
- }
- // ## isNextAuthCheck
-
- // ## isAuthProviderCheck
- if (
- authProvider === "auth-provider-custom" ||
- dataProvider === "data-provider-supabase" ||
- dataProvider === "data-provider-strapi-v4" ||
- dataProvider === "data-provider-appwrite"
- ) {
- base._app.isAuthProviderCheck = true;
- }
- // ## isAuthProviderCheck
-
- // ## authPageProps
- let defaultValuePropsName = "initialValues";
- let defaultValues = `email: "demo@refine.dev", password: "demodemo"`;
- // change supabase login credentials
- if (dataProvider === "data-provider-supabase") {
- defaultValues = `email: "info@refine.dev", password: "refine-supabase"`;
- }
-
- // mui
- if (uiFramework === "mui") {
- defaultValuePropsName = "defaultValues";
- }
-
- base._app.authPageProps = [
- `formProps={{ ${defaultValuePropsName}:{ ${defaultValues} } }}`,
- ];
-
- // update for headless
- if (isHeadless) {
- base._app.authPageProps = [
- `
- renderContent={(content) => (
-
-
- ${defaultValues
- .replace(/"/g, "")
- .replace(/,/g, "
")}
-
- {content}
-
- )}
- `,
- ];
- }
-
- // ## hasRoutes
- if (
- ["headless-example", "antd-example", "mui-example"].every(
- (item) => answers[item] === "no",
- )
- ) {
- base._app.hasRoutes = false;
- }
-
- // ## selected theme
- const themeFromAnswers = answers["theme"];
- if (themeFromAnswers) {
- base.selectedTheme = themeFromAnswers;
- }
- // ## selected title
- const titleFromAnswers = answers["title"];
- if (titleFromAnswers) {
- base.selectedTitle = titleFromAnswers;
- }
- // ## selected svg
- const svgFromAnswers = answers["svg"];
- if (svgFromAnswers) {
- base.selectedSvg = svgFromAnswers;
- }
-
- if (!isHeadless && (answers["title"] || answers["svg"])) {
- base._app.localImport.push(
- 'import { AppIcon } from "@components/app-icon";',
- );
- }
-
- if (isHeadless) {
- base._app.localImport.push(`import styles from "~/global.css";`);
- base._app.styleImport.push('{ rel: "stylesheet", href: styles }');
- }
-
- // ## isGraphQL
- if (
- ["data-provider-hasura", "data-provider-nestjs-query"].includes(
- dataProvider,
- )
- ) {
- base.isGraphQL = true;
- }
-
- // ## blogPostCategoryFieldName
- if (dataProvider === "data-provider-supabase") {
- base.blogPostCategoryFieldName = "categories";
- } else {
- base.blogPostCategoryFieldName = "category";
- }
-
- // ## blogPostCategoryIdFormField
- if (dataProvider === "data-provider-hasura") {
- base.blogPostCategoryIdFormField = `"category_id"`;
- } else if (dataProvider === "data-provider-nestjs-query") {
- base.blogPostCategoryIdFormField = `"categoryId"`;
- } else if (dataProvider === "data-provider-supabase") {
- base.blogPostCategoryIdFormField = `"categoryId"`;
- } else if (dataProvider === "data-provider-appwrite") {
- base.blogPostCategoryIdFormField = `"category"`;
- } else {
- if (uiFramework === "mui" || isHeadless) {
- base.blogPostCategoryIdFormField = `"category.id"`;
- } else {
- base.blogPostCategoryIdFormField = `["category", "id"]`;
- }
- }
-
- // ## blogPostCategoryTableField
- if (base.isGraphQL || dataProvider === "data-provider-appwrite") {
- if (isHeadless) {
- base.blogPostCategoryTableField = `"category.title"`;
- }
- if (uiFramework === "antd") {
- base.blogPostCategoryTableField = `['category', 'title']`;
- }
- if (uiFramework === "mui") {
- base.blogPostCategoryTableField = `"category"`;
- }
- } else {
- if (dataProvider === "data-provider-supabase") {
- base.blogPostCategoryTableField = `"categories"`;
- } else {
- base.blogPostCategoryTableField = `"category"`;
- }
- }
-
- // ## blogPostStatusOptions
- if (dataProvider === "data-provider-nestjs-query") {
- base.blogPostStatusOptions = JSON.stringify([
- { value: "DRAFT", label: "Draft" },
- { value: "PUBLISHED", label: "Published" },
- { value: "REJECTED", label: "Rejected" },
- ]);
- } else {
- base.blogPostStatusOptions = JSON.stringify([
- { value: "draft", label: "Draft" },
- { value: "published", label: "Published" },
- { value: "rejected", label: "Rejected" },
- ]);
- }
- if (isHeadless || uiFramework === "mui") {
- base.blogPostStatusOptions = JSON.parse(base.blogPostStatusOptions);
- }
-
- // ## blogPostStatusDefaultValue
- if (dataProvider === "data-provider-nestjs-query") {
- base.blogPostStatusDefaultValue = `"DRAFT"`;
- } else {
- base.blogPostStatusDefaultValue = `"draft"`;
- }
-
- // ## Refine options.title
- if (!isHeadless && (answers["title"] || answers["svg"])) {
- if (!base._app.refineOptions) {
- base._app.refineOptions = [];
- }
- const textLine = answers["title"]
- ? `text: "${answers["title"]}",`
- : "";
- const iconLine = answers["svg"] ? `icon: ,` : "";
- const template = `title: { ${textLine} ${iconLine} },`;
-
- base._app.refineOptions.push(template);
- }
-
- return base;
- },
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_index.tsx b/refine-remix/plugins/antd-example/app/routes/_index.tsx
deleted file mode 100644
index b8f4a59ed..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NavigateToResource } from "@refinedev/remix-router";
-
-/**
- * Since we don't have any routes for the index page, we're redirecting the user to the first resource.
- *
- * This can also be done using the `loader` function and `redirect`.
- */
-export default function Index() {
- <%_ if (answers["data-provider"] === 'data-provider-strapi-v4') { _%>
- return ;
- <%_ } else { _%>
- return ;
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.$.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.$.tsx
deleted file mode 100644
index 1549b00cc..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.$.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ErrorComponent } from "@refinedev/antd";
-
-/**
- * We're using a splat route to catch all routes that don't match any other route and render the `ErrorComponent` as 404 page.
- */
-export default function Index() {
- return ;
-}
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts._index.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts._index.tsx
deleted file mode 100644
index 1446a4fc4..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts._index.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-import {
- DateField,
- DeleteButton,
- EditButton,
- List,
- MarkdownField,
- ShowButton,
- useTable,
-} from "@refinedev/antd";
-import { type BaseRecord, useMany } from "@refinedev/core";
-import { Space, Table } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
-import { BLOG_POSTS_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POSTS_LIST_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostList() {
- const { tableProps } = useTable({
- syncWithLocation: true,
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: POSTS_LIST_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
- });
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData, isLoading: categoryIsLoading } = useMany({
- resource: "categories",
- ids: tableProps?.dataSource?.map((item) => item?.<%- blogPostCategoryFieldName %>?.id).filter(Boolean) ?? [],
- queryOptions: {
- enabled: !!tableProps?.dataSource,
- },
- });
-<%_ } _%>
-
- return (
-
-
-
-
- {
- if (!value) return '-'
- return
- }}
- />
- }
- title={"Category"}
- <%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- render={(value) =>
- categoryIsLoading ? (
- <>Loading...>
- ) : (
- categoryData?.data?.find(
- (item) => item.id === value?.id,
- )?.title
- )
- }
- <%_ } _%>
- />
-
-
- dataIndex={["created_at"]}
-<%_ } else if (answers["data-provider"] === "data-provider-appwrite") { _%>
- dataIndex={["$createdAt"]}
-<%_ } else { _%>
- dataIndex={["createdAt"]}
-<%_ } _%>
- title={"Created at"}
- render={(value: any) => }
- />
- (
-
-
-
-
-
- )}
- />
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.create.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.create.tsx
deleted file mode 100644
index 99c806f6a..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.create.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { Create, useForm, useSelect } from "@refinedev/antd";
-import { Form, Input, Select } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_CREATE_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostCreate() {
- const { formProps, saveButtonProps } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlMutation: POST_CREATE_MUTATION,
- },
-<%_ } _%>
- });
-
- const { selectProps: categorySelectProps } = useSelect({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
-
-
- }
- rules={[
- {
- required: true,
- },
- ]}
- >
-
-
- }
- rules={[
- {
- required: true,
- },
- ]}
- >
-
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.edit.$id.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.edit.$id.tsx
deleted file mode 100644
index a2db323d1..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.edit.$id.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-import { Edit, useForm, useSelect } from "@refinedev/antd";
-import { Form, Input, Select } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_EDIT_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostEdit() {
- const { formProps, saveButtonProps, queryResult } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlMutation: POST_EDIT_MUTATION,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- queryOptions: {
- select: ({ data }) => {
- return {
- data: {
- ...data,
- category: data.category.$id,
- },
- };
- },
- },
-<%_ } _%>
- });
-
- const blogPostsData = queryResult?.data?.data;
-
- const { selectProps: categorySelectProps } = useSelect({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>,
-<%_ } else { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>?.id,
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
-
-
- }
- rules={[
- {
- required: true,
- },
- ]}
- >
-
-
- }
- rules={[
- {
- required: true,
- },
- ]}
- >
-
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.show.$id.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.show.$id.tsx
deleted file mode 100644
index 06bffa7d0..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.blog-posts.show.$id.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import {
- DateField,
- MarkdownField,
- NumberField,
- Show,
- TextField,
-} from "@refinedev/antd";
-import { useOne, useShow } from "@refinedev/core";
-import { Typography } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_SHOW_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-const { Title } = Typography;
-
-export default function BlogPostShow() {
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: POST_SHOW_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
- });
- const { data, isLoading } = queryResult;
-
- const record = data?.data;
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData, isLoading: categoryIsLoading } = useOne({
- resource: "categories",
- id: record?.<%- blogPostCategoryFieldName %>?.id || "",
- queryOptions: {
- enabled: !!record,
- },
- });
-<%_ } _%>
-
- return (
-
- {"ID"}
-
- {"Title"}
-
- {"Content"}
-
- {"Category"}
-<%_ if (isGraphQL || answers["data-provider"] === "data-provider-appwrite") { _%>
- ?.title} />
-<%_ } else { _%>
- Loading...>
- ) : (
- <>{categoryData?.data?.title}>
- )} />
-<%_ } _%>
- {"Status"}
-
- {"CreatedAt"}
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
-
-<%_ } else if (answers["data-provider"] === "data-provider-hasura") { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.categories._index.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.categories._index.tsx
deleted file mode 100644
index 5308f64db..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.categories._index.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import {
- DeleteButton,
- EditButton,
- List,
- ShowButton,
- useTable,
-} from "@refinedev/antd";
-import type { BaseRecord } from "@refinedev/core";
-import { Space, Table } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORIES_LIST_QUERY } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryList() {
- const { tableProps } = useTable({
- syncWithLocation: true,
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_LIST_QUERY,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
- (
-
-
-
-
-
- )}
- />
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.categories.create.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.categories.create.tsx
deleted file mode 100644
index 570986c01..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.categories.create.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Create, useForm } from "@refinedev/antd";
-import { Form, Input } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_CREATE_MUTATION } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryCreate() {
- const { formProps, saveButtonProps } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlMutation: CATEGORY_CREATE_MUTATION,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.categories.edit.$id.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.categories.edit.$id.tsx
deleted file mode 100644
index 05ce7b592..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.categories.edit.$id.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Edit, useForm } from "@refinedev/antd";
-import { Form, Input } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_EDIT_MUTATION } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryEdit() {
- const { formProps, saveButtonProps } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlMutation: CATEGORY_EDIT_MUTATION,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.categories.show.$id.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.categories.show.$id.tsx
deleted file mode 100644
index 7abddffda..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.categories.show.$id.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { NumberField, Show, TextField } from "@refinedev/antd";
-import { useShow } from "@refinedev/core";
-import { Typography } from "antd";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_SHOW_QUERY } from "../queries/categories";
-<%_ } _%>
-
-const { Title } = Typography;
-
-export default function CategoryShow() {
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORY_SHOW_QUERY,
- },
-<%_ } _%>
- });
- const { data, isLoading } = queryResult;
-
- const record = data?.data;
-
- return (
-
- {"ID"}
-
- {"Title"}
-
-
- );
-};
diff --git a/refine-remix/plugins/antd-example/app/routes/_layout.tsx b/refine-remix/plugins/antd-example/app/routes/_layout.tsx
deleted file mode 100644
index 241350a9c..000000000
--- a/refine-remix/plugins/antd-example/app/routes/_layout.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import { ThemedLayoutV2, ThemedSiderV2 } from "@refinedev/antd";
-import { Outlet } from "@remix-run/react";
-import { Header } from "~/components/header";
-<%_ if (_app.isAuthProviderCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authProvider } from "~/authProvider";
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authenticator } from "~/utils/auth.server";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- }
- Sider={(props) => }
- >
-
-
- );
-}
-
-
-<%_ if (_app.isAuthProviderCheck) { _%>
- /**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
- export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
- }
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
-<%_ } _%>
\ No newline at end of file
diff --git a/refine-remix/plugins/antd/app/components/header/index.tsx b/refine-remix/plugins/antd/app/components/header/index.tsx
deleted file mode 100644
index ff9d7b75d..000000000
--- a/refine-remix/plugins/antd/app/components/header/index.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import { ColorModeContext } from "@contexts";
-import type { RefineThemedLayoutV2HeaderProps } from "@refinedev/antd";
-import { useGetIdentity } from "@refinedev/core";
-import {
- Avatar,
- Layout as AntdLayout,
- Space,
- Switch,
- theme,
- Typography,
-} from "antd";
-import React, { useContext } from "react";
-
-const { Text } = Typography;
-const { useToken } = theme;
-
-type IUser = {
- id: number;
- name: string;
- avatar: string;
-};
-
-export const Header: React.FC = ({
- sticky,
-}) => {
- const { token } = useToken();
- const { data: user } = useGetIdentity();
- const { mode, setMode } = useContext(ColorModeContext);
-
- const headerStyles: React.CSSProperties = {
- backgroundColor: token.colorBgElevated,
- display: "flex",
- justifyContent: "flex-end",
- alignItems: "center",
- padding: "0px 24px",
- height: "64px",
- };
-
- if (sticky) {
- headerStyles.position = "sticky";
- headerStyles.top = 0;
- headerStyles.zIndex = 1;
- }
-
- return (
-
-
-
- setMode(mode === "light" ? "dark" : "light")
- }
- defaultChecked={mode === "dark"}
- />
- {(user?.name || user?.avatar) && (
-
- {user?.name && {user.name}}
- {user?.avatar && (
-
- )}
-
- )}
-
-
- );
-};
diff --git a/refine-remix/plugins/antd/app/contexts/index.tsx b/refine-remix/plugins/antd/app/contexts/index.tsx
deleted file mode 100644
index 42a3979d9..000000000
--- a/refine-remix/plugins/antd/app/contexts/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import React from "react";
-import { RefineThemes } from "@refinedev/antd";
-import { ConfigProvider, theme } from "antd";
-
-type ColorModeContextType = {
- mode: string;
- setMode: (mode: string) => void;
-};
-
-export const ColorModeContext = React.createContext(
- {} as ColorModeContextType,
-);
-
-export const ColorModeContextProvider: React.FC = ({
- children,
-}) => {
- const [mode, setMode] = React.useState("light");
-
- const setColorMode = () => {
- if (mode === "light") {
- setMode("dark");
- } else {
- setMode("light");
- }
- };
-
- const { darkAlgorithm, defaultAlgorithm } = theme;
-
- return (
-
- ,
- algorithm:
- mode === "light" ? defaultAlgorithm : darkAlgorithm,
- }}
- >
- {children}
-
-
- );
-};
diff --git a/refine-remix/plugins/antd/extend.js b/refine-remix/plugins/antd/extend.js
deleted file mode 100644
index 36e787878..000000000
--- a/refine-remix/plugins/antd/extend.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const base = {
- _app: {
- refineProps: ["notificationProvider={useNotificationProvider}"],
- import: [
- `import { App as AntdApp } from "antd"`,
- 'import resetStyle from "@refinedev/antd/dist/reset.css";',
- ],
- refineAntdImports: ["useNotificationProvider"],
- styleImport: ['{ rel: "stylesheet", href: resetStyle }'],
- wrapper: [
- [``, ``],
- [``, ``],
- ],
- localImport: [`import { ColorModeContextProvider } from "@contexts";`],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/antd/meta.json b/refine-remix/plugins/antd/meta.json
deleted file mode 100644
index cf09020d0..000000000
--- a/refine-remix/plugins/antd/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Ant Design",
- "url": "https://refine.dev/docs/ui-frameworks/antd/tutorial/"
-}
diff --git a/refine-remix/plugins/antd/package.json b/refine-remix/plugins/antd/package.json
deleted file mode 100644
index 167139382..000000000
--- a/refine-remix/plugins/antd/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "dependencies": {
- "@refinedev/antd": "^5.37.4",
- "antd": "^5.0.5",
- "@ant-design/icons": "^5.0.1"
- }
-}
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.login.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.login.tsx
deleted file mode 100644
index 1fd08fb5f..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-<%_ if (answers["ui-framework"] === "antd") { _%>
-import { ThemedTitleV2 } from "@refinedev/antd";
-import { Button, Typography, Layout, Space } from "antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import Box from "@mui/material/Box";
-import Button from "@mui/material/Button";
-import Container from "@mui/material/Container";
-import Typography from "@mui/material/Typography";
-import { ThemedTitleV2 } from "@refinedev/mui";
-<%_ } _%>
-
-export default function Login() {
- <%_ if (answers["ui-framework"] === "antd") { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Auth0
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Auth0
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- return(
-
-
-
Powered by
-
- Auth0
-
- );
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.tsx
deleted file mode 100644
index 084ef6291..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/_auth.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { type LoaderFunctionArgs, redirect } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
-
- if (session) {
- return redirect(`/`);
- }
-
- return {};
-};
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/_layout.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/_layout.tsx
deleted file mode 100644
index 1dd67cf89..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/_layout.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
- <%_ } _%>
-
-import { Header } from "@components/header";
-import { authenticator } from "~/utils/auth.server";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
-
-
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0._index.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0._index.tsx
deleted file mode 100644
index d6b33a157..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0._index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs, ActionArgs } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export const action = async ({ request }: ActionArgs) => {
- await authenticator.authenticate("auth0", request, {
- failureRedirect: "/login",
- });
-};
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- await authenticator.authenticate("auth0", request, {
- failureRedirect: "/login",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0.callback.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0.callback.tsx
deleted file mode 100644
index aefd7c0a0..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.auth0.callback.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authenticator } from "~/utils/auth.server";
-
-export const loader = ({ request }: LoaderFunctionArgs) => {
- return authenticator.authenticate("auth0", request, {
- failureRedirect: "/login",
- successRedirect: "http://localhost:3000/",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.logout.tsx b/refine-remix/plugins/auth-provider-auth0/app/routes/auth.logout.tsx
deleted file mode 100644
index f488a38a2..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/routes/auth.logout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { redirect } from "@remix-run/node";
-
-import { destroySession, getSession } from "~/services/session.server";
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await getSession(request.headers.get("Cookie"));
- return redirect(`/`, {
- headers: {
- "Set-Cookie": await destroySession(session),
- },
- });
-};
diff --git a/refine-remix/plugins/auth-provider-auth0/app/services/session.server.ts b/refine-remix/plugins/auth-provider-auth0/app/services/session.server.ts
deleted file mode 100644
index f091e5733..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/services/session.server.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// app/services/session.server.ts
-import { createCookieSessionStorage } from "@remix-run/node";
-
-// export the whole sessionStorage object
-export const sessionStorage = createCookieSessionStorage({
- cookie: {
- name: "_session", // use any name you want here
- sameSite: "lax", // this helps with CSRF
- path: "/", // remember to add this so the cookie will work in all routes
- httpOnly: true, // for security reasons, make this cookie http only
- secrets: ["s3cr3t"], // replace this with an actual secret
- secure: process.env.NODE_ENV === "production", // enable this in prod only
- },
-});
-
-// you can also export the methods individually for your own usage
-export const { getSession, commitSession, destroySession } = sessionStorage;
diff --git a/refine-remix/plugins/auth-provider-auth0/app/utils/auth.server.ts b/refine-remix/plugins/auth-provider-auth0/app/utils/auth.server.ts
deleted file mode 100644
index 2540513bd..000000000
--- a/refine-remix/plugins/auth-provider-auth0/app/utils/auth.server.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Authenticator } from "remix-auth";
-import { Auth0Strategy } from "remix-auth-auth0";
-
-import { sessionStorage } from "~/services/session.server";
-
-// Create an instance of the authenticator, pass a generic with what your
-// strategies will return and will be stored in the session
-export const authenticator = new Authenticator<{}>(sessionStorage);
-
-const auth0Strategy = new Auth0Strategy(
- {
- // !!! Should be stored in .env file.
- callbackURL: "http://localhost:3000/auth/auth0/callback",
- clientID: "AcinJvjWp1Dr41gPcJeQ20r5vcsteks4",
- clientSecret:
- "y3pj2KaTiNgING-5e8_JYmX_bIQSwvkp_XgDcA75sEPSSB2zmi0n-3UoTfH0pOTP",
- domain: "dev-y38p834gjptooc4g.us.auth0.com",
- },
- async ({ accessToken, extraParams, profile, refreshToken }) => {
- const { id, displayName, photos } = profile;
- return Promise.resolve({
- id,
- name: displayName,
- avatar: photos?.[0]?.value,
- });
- },
-);
-
-authenticator.use(auth0Strategy);
diff --git a/refine-remix/plugins/auth-provider-auth0/extend.js b/refine-remix/plugins/auth-provider-auth0/extend.js
deleted file mode 100644
index e5fd87749..000000000
--- a/refine-remix/plugins/auth-provider-auth0/extend.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const base = {
- _app: {
- localImport: [
- `import type { LoaderFunctionArgs } from "@remix-run/node";`,
- `import { json } from "@remix-run/node";`,
- `import { authenticator } from "~/utils/auth.server";`,
- ],
- refineProps: ["authProvider={authProvider}"],
- refineImports: [`AuthBindings`],
- refineAntdImports: [],
- refineMuiImports: [],
- loader: [
- `export const loader = async ({ request }: LoaderFunctionArgs) => {
- const profile = await authenticator.isAuthenticated(request);
- const to = new URL(request.url).searchParams.get("to");
- return json({ profile, to });
- };`,
- ],
- inner: [
- `
- const { profile, to } = useLoaderData();
- const authProvider: AuthBindings = {
- login: async ({ providerName }) => {
- if (providerName) {`,
- "window.location.href = `/auth/${providerName} ? to = ${to}`;",
- `return {
- success: true,
- };
- }
-
- return {
- success: true,
- redirectTo: "/",
- };
- },
- logout: async () => {
- window.location.href = "/auth/logout";
- return {
- success: true,
- };
- },
- onError: async (error) => {
- console.error(error);
- return {
- error,
- };
- },
- check: async () => {
- return {
- authenticated: !!profile,
- };
- },
- getPermissions: async () => {
- return null;
- },
- getIdentity: async () => {
- if (profile) {
- return profile;
- }
-
- return null;
- },
- };`,
- ],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/auth-provider-auth0/meta.json b/refine-remix/plugins/auth-provider-auth0/meta.json
deleted file mode 100644
index 3e4d4d11f..000000000
--- a/refine-remix/plugins/auth-provider-auth0/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Custom Auth Provider",
- "url": "https://refine.dev/docs/core/providers/auth-provider/"
-}
diff --git a/refine-remix/plugins/auth-provider-auth0/package.json b/refine-remix/plugins/auth-provider-auth0/package.json
deleted file mode 100644
index f1f83e9f7..000000000
--- a/refine-remix/plugins/auth-provider-auth0/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "dependencies": {
- "remix-auth": "^3.4.0",
- "remix-auth-auth0": "^1.7.0"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/auth-provider-custom/app/authProvider.ts b/refine-remix/plugins/auth-provider-custom/app/authProvider.ts
deleted file mode 100644
index 9681b80a9..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/authProvider.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import type { AuthProvider } from "@refinedev/core";
-import * as cookie from "cookie";
-import Cookies from "js-cookie";
-
-const mockUsers = [
- {
- name: "John Doe",
- email: "admin@refine.dev",
- roles: ["admin"],
- avatar: "https://i.pravatar.cc/150?img=1",
- },
- {
- name: "Jane Doe",
- email: "editor@refine.dev",
- roles: ["editor"],
- avatar: "https://i.pravatar.cc/150?img=1",
- },
- {
- name: "John Doe",
- email: "demo@refine.dev",
- roles: ["admin"],
- avatar: "https://i.pravatar.cc/150?img=1",
- },
-];
-
-const COOKIE_NAME = "user";
-
-export const authProvider: AuthProvider = {
- login: async ({ email }) => {
- // Suppose we actually send a request to the back end here.
- const user = mockUsers.find((item) => item.email === email);
-
- if (user) {
- Cookies.set(COOKIE_NAME, JSON.stringify(user));
- return {
- success: true,
- redirectTo: "/",
- };
- }
-
- return {
- success: false,
- error: {
- message: "Login failed",
- name: "Invalid email or password",
- },
- };
- },
- logout: async () => {
- Cookies.remove(COOKIE_NAME);
-
- return {
- success: true,
- redirectTo: "/login",
- };
- },
- onError: async (error) => {
- console.error(error);
- return { error };
- },
- check: async (request) => {
- let user = undefined;
- if (request) {
- const hasCookie = request.headers.get("Cookie");
- if (hasCookie) {
- const parsedCookie = cookie.parse(
- request.headers.get("Cookie"),
- );
- user = parsedCookie[COOKIE_NAME];
- }
- } else {
- const parsedCookie = Cookies.get(COOKIE_NAME);
- user = parsedCookie ? JSON.parse(parsedCookie) : undefined;
- }
-
- const { pathname } = new URL(request.url);
-
- if (!user) {
- return {
- authenticated: false,
- error: {
- message: "Check failed",
- name: "Unauthenticated",
- },
- logout: true,
- redirectTo: `/login?to=${pathname}`,
- };
- }
-
- return {
- authenticated: true,
- };
- },
- getPermissions: async () => null,
- getIdentity: async () => {
- const parsedCookie = Cookies.get(COOKIE_NAME);
- if (parsedCookie) {
- const user = parsedCookie ? JSON.parse(parsedCookie) : undefined;
- return user;
- }
- return null;
- },
-};
diff --git a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.forgot-password.tsx b/refine-remix/plugins/auth-provider-custom/app/routes/_auth.forgot-password.tsx
deleted file mode 100644
index 488681418..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.forgot-password.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- AuthPage,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- AuthPage,
-} from "@refinedev/mui";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function ForgotPassword() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.login.tsx b/refine-remix/plugins/auth-provider-custom/app/routes/_auth.login.tsx
deleted file mode 100644
index c189d77ad..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- AuthPage,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- AuthPage,
-} from "@refinedev/mui";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Login() {
- return (
-
- />
- );
-}
diff --git a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.register.tsx b/refine-remix/plugins/auth-provider-custom/app/routes/_auth.register.tsx
deleted file mode 100644
index 05b1325fb..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.register.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- AuthPage,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- AuthPage,
-} from "@refinedev/mui";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Register() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.tsx b/refine-remix/plugins/auth-provider-custom/app/routes/_auth.tsx
deleted file mode 100644
index b02d21f92..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/routes/_auth.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { redirect } from "@remix-run/node";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authProvider } from "~/authProvider";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-/**
- * If the current session is authenticated, we're redirecting the user to the home page.
- * Alternatively, we could also use the `Authenticated` component inside the `AuthLayout` to handle the redirect.
- * But, server-side redirects are more performant.
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (authenticated) {
- throw redirect(redirectTo ?? "/");
- }
-
- return {};
-}
diff --git a/refine-remix/plugins/auth-provider-custom/app/routes/_layout.tsx b/refine-remix/plugins/auth-provider-custom/app/routes/_layout.tsx
deleted file mode 100644
index b94cb4fe0..000000000
--- a/refine-remix/plugins/auth-provider-custom/app/routes/_layout.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
- <%_ } _%>
-
-import { Header } from "@components/header";
-import { authProvider } from "~/authProvider";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/auth-provider-custom/extend.js b/refine-remix/plugins/auth-provider-custom/extend.js
deleted file mode 100644
index ecb37cfee..000000000
--- a/refine-remix/plugins/auth-provider-custom/extend.js
+++ /dev/null
@@ -1,14 +0,0 @@
-const base = {
- _app: {
- localImport: ['import { authProvider } from "~/authProvider";'],
- refineProps: ["authProvider={authProvider}"],
- refineAntdImports: [],
- refineMuiImports: [],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/auth-provider-custom/meta.json b/refine-remix/plugins/auth-provider-custom/meta.json
deleted file mode 100644
index 3e4d4d11f..000000000
--- a/refine-remix/plugins/auth-provider-custom/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Custom Auth Provider",
- "url": "https://refine.dev/docs/core/providers/auth-provider/"
-}
diff --git a/refine-remix/plugins/auth-provider-custom/package.json b/refine-remix/plugins/auth-provider-custom/package.json
deleted file mode 100644
index 2168150f9..000000000
--- a/refine-remix/plugins/auth-provider-custom/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "dependencies": {
- "cookie": "^0.5.0",
- "js-cookie": "^3.0.1"
- },
- "devDependencies": {
- "@types/js-cookie": "^3.0.2"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/_auth.login.tsx b/refine-remix/plugins/auth-provider-google/app/routes/_auth.login.tsx
deleted file mode 100644
index 0194ba4d4..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-<%_ if (answers["ui-framework"] === "antd") { _%>
-import { ThemedTitleV2 } from "@refinedev/antd";
-import { Button, Typography, Layout, Space } from "antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import Box from "@mui/material/Box";
-import Button from "@mui/material/Button";
-import Container from "@mui/material/Container";
-import Typography from "@mui/material/Typography";
-import { ThemedTitleV2 } from "@refinedev/mui";
-<%_ } _%>
-export default function Login() {
- <%_ if (answers["ui-framework"] === "antd") { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Google
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Google
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- return(
-
-
-
- Powered by
-
- Google
-
-
- );
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/_auth.tsx b/refine-remix/plugins/auth-provider-google/app/routes/_auth.tsx
deleted file mode 100644
index 084ef6291..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/_auth.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { type LoaderFunctionArgs, redirect } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
-
- if (session) {
- return redirect(`/`);
- }
-
- return {};
-};
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/_layout.tsx b/refine-remix/plugins/auth-provider-google/app/routes/_layout.tsx
deleted file mode 100644
index 959b43485..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/_layout.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
-<%_ } _%>
-
-import { Header } from "@components/header";
-import { authenticator } from "~/utils/auth.server";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/auth.google._index.tsx b/refine-remix/plugins/auth-provider-google/app/routes/auth.google._index.tsx
deleted file mode 100644
index 283f38287..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/auth.google._index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs, ActionArgs } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export const action = async ({ request }: ActionArgs) => {
- await authenticator.authenticate("google", request, {
- failureRedirect: "/login",
- });
-};
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- await authenticator.authenticate("google", request, {
- failureRedirect: "/login",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/auth.google.callback.tsx b/refine-remix/plugins/auth-provider-google/app/routes/auth.google.callback.tsx
deleted file mode 100644
index 29466a971..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/auth.google.callback.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authenticator } from "~/utils/auth.server";
-
-export const loader = ({ request }: LoaderFunctionArgs) => {
- return authenticator.authenticate("google", request, {
- failureRedirect: "/login",
- successRedirect: "http://localhost:3000/",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-google/app/routes/auth.logout.tsx b/refine-remix/plugins/auth-provider-google/app/routes/auth.logout.tsx
deleted file mode 100644
index f488a38a2..000000000
--- a/refine-remix/plugins/auth-provider-google/app/routes/auth.logout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { redirect } from "@remix-run/node";
-
-import { destroySession, getSession } from "~/services/session.server";
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await getSession(request.headers.get("Cookie"));
- return redirect(`/`, {
- headers: {
- "Set-Cookie": await destroySession(session),
- },
- });
-};
diff --git a/refine-remix/plugins/auth-provider-google/app/services/session.server.ts b/refine-remix/plugins/auth-provider-google/app/services/session.server.ts
deleted file mode 100644
index f091e5733..000000000
--- a/refine-remix/plugins/auth-provider-google/app/services/session.server.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// app/services/session.server.ts
-import { createCookieSessionStorage } from "@remix-run/node";
-
-// export the whole sessionStorage object
-export const sessionStorage = createCookieSessionStorage({
- cookie: {
- name: "_session", // use any name you want here
- sameSite: "lax", // this helps with CSRF
- path: "/", // remember to add this so the cookie will work in all routes
- httpOnly: true, // for security reasons, make this cookie http only
- secrets: ["s3cr3t"], // replace this with an actual secret
- secure: process.env.NODE_ENV === "production", // enable this in prod only
- },
-});
-
-// you can also export the methods individually for your own usage
-export const { getSession, commitSession, destroySession } = sessionStorage;
diff --git a/refine-remix/plugins/auth-provider-google/app/utils/auth.server.ts b/refine-remix/plugins/auth-provider-google/app/utils/auth.server.ts
deleted file mode 100644
index e00ace167..000000000
--- a/refine-remix/plugins/auth-provider-google/app/utils/auth.server.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Authenticator } from "remix-auth";
-import { GoogleStrategy } from "remix-auth-google";
-
-import { sessionStorage } from "~/services/session.server";
-
-// Create an instance of the authenticator, pass a generic with what your
-// strategies will return and will be stored in the session
-export const authenticator = new Authenticator<{}>(sessionStorage);
-
-const googleStrategy = new GoogleStrategy(
- {
- // !!! Should be stored in .env file.
- callbackURL: "http://localhost:3000/auth/google/callback",
- clientID: `1041339102270-e1fpe2b6v6u1didfndh7jkjmpcashs4f.apps.googleusercontent.com`,
- clientSecret: `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`,
- },
- async ({ accessToken, extraParams, profile, refreshToken, context }) => {
- const { id, displayName, photos } = profile;
- return Promise.resolve({
- id,
- name: displayName,
- avatar: photos?.[0]?.value,
- });
- },
-);
-
-authenticator.use(googleStrategy);
diff --git a/refine-remix/plugins/auth-provider-google/extend.js b/refine-remix/plugins/auth-provider-google/extend.js
deleted file mode 100644
index e5fd87749..000000000
--- a/refine-remix/plugins/auth-provider-google/extend.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const base = {
- _app: {
- localImport: [
- `import type { LoaderFunctionArgs } from "@remix-run/node";`,
- `import { json } from "@remix-run/node";`,
- `import { authenticator } from "~/utils/auth.server";`,
- ],
- refineProps: ["authProvider={authProvider}"],
- refineImports: [`AuthBindings`],
- refineAntdImports: [],
- refineMuiImports: [],
- loader: [
- `export const loader = async ({ request }: LoaderFunctionArgs) => {
- const profile = await authenticator.isAuthenticated(request);
- const to = new URL(request.url).searchParams.get("to");
- return json({ profile, to });
- };`,
- ],
- inner: [
- `
- const { profile, to } = useLoaderData();
- const authProvider: AuthBindings = {
- login: async ({ providerName }) => {
- if (providerName) {`,
- "window.location.href = `/auth/${providerName} ? to = ${to}`;",
- `return {
- success: true,
- };
- }
-
- return {
- success: true,
- redirectTo: "/",
- };
- },
- logout: async () => {
- window.location.href = "/auth/logout";
- return {
- success: true,
- };
- },
- onError: async (error) => {
- console.error(error);
- return {
- error,
- };
- },
- check: async () => {
- return {
- authenticated: !!profile,
- };
- },
- getPermissions: async () => {
- return null;
- },
- getIdentity: async () => {
- if (profile) {
- return profile;
- }
-
- return null;
- },
- };`,
- ],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/auth-provider-google/meta.json b/refine-remix/plugins/auth-provider-google/meta.json
deleted file mode 100644
index 3e4d4d11f..000000000
--- a/refine-remix/plugins/auth-provider-google/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Custom Auth Provider",
- "url": "https://refine.dev/docs/core/providers/auth-provider/"
-}
diff --git a/refine-remix/plugins/auth-provider-google/package.json b/refine-remix/plugins/auth-provider-google/package.json
deleted file mode 100644
index b3ad32d90..000000000
--- a/refine-remix/plugins/auth-provider-google/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "dependencies": {
- "remix-auth": "^3.4.0",
- "remix-auth-google": "^1.2.0"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.login.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.login.tsx
deleted file mode 100644
index 3667fe8d9..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-<%_ if (answers["ui-framework"] === "antd") { _%>
-import { ThemedTitleV2 } from "@refinedev/antd";
-import { Button, Typography, Layout, Space } from "antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import Box from "@mui/material/Box";
-import Button from "@mui/material/Button";
-import Container from "@mui/material/Container";
-import Typography from "@mui/material/Typography";
-import { ThemedTitleV2 } from "@refinedev/mui";
-<%_ } _%>
-
-export default function Login() {
- <%_ if (answers["ui-framework"] === "antd") { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Keycloak
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- return (
-
-
-
-
-
-
-
- Powered by
-
- Keycloak
-
-
-
- );
- <%_ } _%>
-
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- return(
-
-
-
- Powered by
-
- Keycloak
-
-
- );
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.tsx
deleted file mode 100644
index 084ef6291..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/_auth.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { type LoaderFunctionArgs, redirect } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
-
- if (session) {
- return redirect(`/`);
- }
-
- return {};
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/_layout.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/_layout.tsx
deleted file mode 100644
index 959b43485..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/_layout.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
-<%_ } _%>
-
-import { Header } from "@components/header";
-import { authenticator } from "~/utils/auth.server";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak._index.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak._index.tsx
deleted file mode 100644
index 099c1b203..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak._index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs, ActionArgs } from "@remix-run/node";
-import { authenticator } from "~/utils/auth.server";
-
-export const action = async ({ request }: ActionArgs) => {
- await authenticator.authenticate("keycloak", request, {
- failureRedirect: "/login",
- });
-};
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- await authenticator.authenticate("keycloak", request, {
- failureRedirect: "/login",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak.callback.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak.callback.tsx
deleted file mode 100644
index 3d8872102..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.keycloak.callback.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authenticator } from "~/utils/auth.server";
-
-export const loader = ({ request }: LoaderFunctionArgs) => {
- return authenticator.authenticate("keycloak", request, {
- failureRedirect: "/login",
- successRedirect: "http://localhost:3000/",
- });
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.logout.tsx b/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.logout.tsx
deleted file mode 100644
index f488a38a2..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/routes/auth.logout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { redirect } from "@remix-run/node";
-
-import { destroySession, getSession } from "~/services/session.server";
-
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await getSession(request.headers.get("Cookie"));
- return redirect(`/`, {
- headers: {
- "Set-Cookie": await destroySession(session),
- },
- });
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/services/session.server.ts b/refine-remix/plugins/auth-provider-keycloak/app/services/session.server.ts
deleted file mode 100644
index f091e5733..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/services/session.server.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-// app/services/session.server.ts
-import { createCookieSessionStorage } from "@remix-run/node";
-
-// export the whole sessionStorage object
-export const sessionStorage = createCookieSessionStorage({
- cookie: {
- name: "_session", // use any name you want here
- sameSite: "lax", // this helps with CSRF
- path: "/", // remember to add this so the cookie will work in all routes
- httpOnly: true, // for security reasons, make this cookie http only
- secrets: ["s3cr3t"], // replace this with an actual secret
- secure: process.env.NODE_ENV === "production", // enable this in prod only
- },
-});
-
-// you can also export the methods individually for your own usage
-export const { getSession, commitSession, destroySession } = sessionStorage;
diff --git a/refine-remix/plugins/auth-provider-keycloak/app/utils/auth.server.ts b/refine-remix/plugins/auth-provider-keycloak/app/utils/auth.server.ts
deleted file mode 100644
index ab545caa6..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/app/utils/auth.server.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Authenticator } from "remix-auth";
-import { KeycloakStrategy } from "remix-auth-keycloak";
-
-import { sessionStorage } from "~/services/session.server";
-
-// Create an instance of the authenticator, pass a generic with what your
-// strategies will return and will be stored in the session
-export const authenticator = new Authenticator<{}>(sessionStorage);
-
-const keycloakStrategy = new KeycloakStrategy(
- {
- // !!! Should be stored in .env file.
- useSSL: true,
- domain: "lemur-0.cloud-iam.com/auth",
- realm: "refine",
- clientID: "refine-demo",
- clientSecret: "refine",
- callbackURL: "http://localhost:3000/auth/keycloak/callback",
- },
- async ({ accessToken, extraParams, profile, refreshToken, context }) => {
- const { id, displayName, photos } = profile;
- return Promise.resolve({
- id,
- name: displayName,
- avatar: `https://faces-img.xcdn.link/thumb-lorem-face-6312_thumb.jpg`,
- });
- },
-);
-
-authenticator.use(keycloakStrategy);
diff --git a/refine-remix/plugins/auth-provider-keycloak/extend.js b/refine-remix/plugins/auth-provider-keycloak/extend.js
deleted file mode 100644
index e5fd87749..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/extend.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const base = {
- _app: {
- localImport: [
- `import type { LoaderFunctionArgs } from "@remix-run/node";`,
- `import { json } from "@remix-run/node";`,
- `import { authenticator } from "~/utils/auth.server";`,
- ],
- refineProps: ["authProvider={authProvider}"],
- refineImports: [`AuthBindings`],
- refineAntdImports: [],
- refineMuiImports: [],
- loader: [
- `export const loader = async ({ request }: LoaderFunctionArgs) => {
- const profile = await authenticator.isAuthenticated(request);
- const to = new URL(request.url).searchParams.get("to");
- return json({ profile, to });
- };`,
- ],
- inner: [
- `
- const { profile, to } = useLoaderData();
- const authProvider: AuthBindings = {
- login: async ({ providerName }) => {
- if (providerName) {`,
- "window.location.href = `/auth/${providerName} ? to = ${to}`;",
- `return {
- success: true,
- };
- }
-
- return {
- success: true,
- redirectTo: "/",
- };
- },
- logout: async () => {
- window.location.href = "/auth/logout";
- return {
- success: true,
- };
- },
- onError: async (error) => {
- console.error(error);
- return {
- error,
- };
- },
- check: async () => {
- return {
- authenticated: !!profile,
- };
- },
- getPermissions: async () => {
- return null;
- },
- getIdentity: async () => {
- if (profile) {
- return profile;
- }
-
- return null;
- },
- };`,
- ],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/auth-provider-keycloak/meta.json b/refine-remix/plugins/auth-provider-keycloak/meta.json
deleted file mode 100644
index 3e4d4d11f..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Custom Auth Provider",
- "url": "https://refine.dev/docs/core/providers/auth-provider/"
-}
diff --git a/refine-remix/plugins/auth-provider-keycloak/package.json b/refine-remix/plugins/auth-provider-keycloak/package.json
deleted file mode 100644
index 59dbba840..000000000
--- a/refine-remix/plugins/auth-provider-keycloak/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "dependencies": {
- "remix-auth": "^3.4.0",
- "remix-auth-keycloak": "^1.2.0"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-airtable/extend.js b/refine-remix/plugins/data-provider-airtable/extend.js
deleted file mode 100644
index 51f4f25c8..000000000
--- a/refine-remix/plugins/data-provider-airtable/extend.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const base = {
- _app: {
- import: [`import dataProvider from "@refinedev/airtable";`],
- afterImport: [
- `const API_TOKEN = "patI3quNRP17TNsjK.d59600d5955939ed02110fb1107036ff4482496004f020f5bf031f55789cd321";`,
- `const BASE_ID = "appKYl1H4k9g73sBT";`,
- "",
- ],
- refineProps: ["dataProvider={dataProvider(API_TOKEN, BASE_ID)}"],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-airtable/meta.json b/refine-remix/plugins/data-provider-airtable/meta.json
deleted file mode 100644
index 4d265d44b..000000000
--- a/refine-remix/plugins/data-provider-airtable/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Airtable Data Provider",
- "url": "https://refine.dev/docs/core/providers/auth-provider/"
-}
diff --git a/refine-remix/plugins/data-provider-airtable/package.json b/refine-remix/plugins/data-provider-airtable/package.json
deleted file mode 100644
index 8eec56d7a..000000000
--- a/refine-remix/plugins/data-provider-airtable/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "@refinedev/airtable": "^4.4.6"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts b/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts
deleted file mode 100644
index e674c7e32..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/authProvider.ts
+++ /dev/null
@@ -1,130 +0,0 @@
-import { AppwriteException } from "@refinedev/appwrite";
-import type { AuthProvider } from "@refinedev/core";
-import * as cookie from "cookie";
-import Cookies from "js-cookie";
-import { v4 as uuidv4 } from "uuid";
-import { account, appwriteClient, TOKEN_KEY } from "./utility";
-
-export const authProvider: AuthProvider = {
- login: async ({ email, password }) => {
- try {
- await account.createEmailSession(email, password);
-
- const { jwt } = await account.createJWT();
-
- if (jwt) {
- Cookies.set(TOKEN_KEY, jwt);
- }
-
- return {
- success: true,
- redirectTo: "/",
- };
- } catch (error) {
- const { type, message, code } = error as AppwriteException;
- return {
- success: false,
- error: {
- message,
- name: `${code} - ${type}`,
- },
- };
- }
- },
- logout: async () => {
- try {
- await account.deleteSession("current");
- } catch (error: any) {
- return {
- success: false,
- error,
- };
- }
- Cookies.remove(TOKEN_KEY);
- appwriteClient.setJWT("");
-
- return {
- success: true,
- redirectTo: "/login",
- };
- },
- register: async ({ email, password }) => {
- try {
- await account.create(uuidv4(), email, password);
- return {
- success: true,
- redirectTo: "/login",
- };
- } catch (error) {
- const { type, message, code } = error as AppwriteException;
- return {
- success: false,
- error: {
- message,
- name: `${code} - ${type}`,
- },
- };
- }
- },
- onError: async (error) => {
- console.error(error);
- return { error };
- },
- check: async (request) => {
- // for server side authentication
- let token = undefined;
- const hasCookie = request.headers.get("Cookie");
- if (hasCookie) {
- const parsedCookie = cookie.parse(request.headers.get("Cookie"));
- token = parsedCookie[TOKEN_KEY];
- } else {
- const parsedCookie = Cookies.get(TOKEN_KEY);
- token = parsedCookie ? JSON.parse(parsedCookie) : undefined;
- }
-
- if (token) {
- appwriteClient.setJWT(token);
- }
-
- const { pathname } = new URL(request.url);
- const query =
- pathname === "/" ? "" : `?to=${encodeURIComponent(pathname)}`;
-
- try {
- const session = await account.get();
-
- if (session) {
- return {
- authenticated: true,
- };
- }
- } catch (error: any) {
- return {
- authenticated: false,
- error: error,
- logout: true,
- redirectTo: `/login${query}`,
- };
- }
-
- return {
- authenticated: false,
- error: {
- message: "Check failed",
- name: "Unauthenticated",
- },
- logout: true,
- redirectTo: `/login${query}`,
- };
- },
- getPermissions: async () => null,
- getIdentity: async () => {
- const user = await account.get();
-
- if (user) {
- return user;
- }
-
- return null;
- },
-};
diff --git a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.forgot-password.tsx b/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.forgot-password.tsx
deleted file mode 100644
index 5bba63ad7..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.forgot-password.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function ForgotPassword() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.login.tsx b/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.login.tsx
deleted file mode 100644
index c3e642d5c..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Login() {
- return (
-
- />
- );
-}
diff --git a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.register.tsx b/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.register.tsx
deleted file mode 100644
index b8d4de56b..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.register.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Register() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.tsx b/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.tsx
deleted file mode 100644
index b02d21f92..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/routes/_auth.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { redirect } from "@remix-run/node";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authProvider } from "~/authProvider";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-/**
- * If the current session is authenticated, we're redirecting the user to the home page.
- * Alternatively, we could also use the `Authenticated` component inside the `AuthLayout` to handle the redirect.
- * But, server-side redirects are more performant.
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (authenticated) {
- throw redirect(redirectTo ?? "/");
- }
-
- return {};
-}
diff --git a/refine-remix/plugins/data-provider-appwrite/app/routes/_layout.tsx b/refine-remix/plugins/data-provider-appwrite/app/routes/_layout.tsx
deleted file mode 100644
index e7b3f99ae..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/routes/_layout.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
-<%_ } _%>
-
-import { Header } from "@components/header";
-import { authProvider } from "~/authProvider";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-appwrite/app/utility/appwriteClient.ts b/refine-remix/plugins/data-provider-appwrite/app/utility/appwriteClient.ts
deleted file mode 100644
index 9fb270c5a..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/utility/appwriteClient.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Account, Appwrite, Storage } from "@refinedev/appwrite";
-
-const APPWRITE_URL = "https://cloud.appwrite.io/v1";
-const APPWRITE_PROJECT = "6697687d002cbd31ba6b";
-const TOKEN_KEY = "appwrite-token";
-
-const appwriteClient = new Appwrite();
-
-appwriteClient.setEndpoint(APPWRITE_URL).setProject(APPWRITE_PROJECT);
-const account = new Account(appwriteClient);
-const storage = new Storage(appwriteClient);
-
-export { appwriteClient, account, storage, TOKEN_KEY };
diff --git a/refine-remix/plugins/data-provider-appwrite/app/utility/index.ts b/refine-remix/plugins/data-provider-appwrite/app/utility/index.ts
deleted file mode 100644
index b4f6465b1..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/utility/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from "./appwriteClient";
-<%_ if (answers["ui-framework"] === "antd") { _%>
-export * from "./normalize";
-<%_ } _%>
diff --git a/refine-remix/plugins/data-provider-appwrite/app/utility/normalize.ts b/refine-remix/plugins/data-provider-appwrite/app/utility/normalize.ts
deleted file mode 100644
index 038790ea5..000000000
--- a/refine-remix/plugins/data-provider-appwrite/app/utility/normalize.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { UploadFile } from "antd";
-
-interface UploadResponse {
- url: string;
-}
-interface EventArgs {
- file: UploadFile;
- fileList: Array>;
-}
-
-export const normalizeFile = (event: EventArgs) => {
- const { fileList } = event;
-
- return fileList.map((item) => {
- const { uid, name, type, size, response, percent, status } = item;
-
- return {
- uid,
- name,
- url: item.url || response?.url,
- type,
- size,
- percent,
- status,
- };
- });
-};
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-appwrite/extend.js b/refine-remix/plugins/data-provider-appwrite/extend.js
deleted file mode 100644
index ad251e8d7..000000000
--- a/refine-remix/plugins/data-provider-appwrite/extend.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const base = {
- _app: {
- import: [
- `import { dataProvider, liveProvider } from "@refinedev/appwrite";`,
- ],
- localImport: [
- `import { authProvider } from "~/authProvider";`,
- `import { appwriteClient } from "~/utility";`,
- ],
- refineProps: [
- `dataProvider={dataProvider(appwriteClient, {
- databaseId: "default",
- })}`,
- `liveProvider={liveProvider(appwriteClient, {
- databaseId: "default",
- })}`,
- `authProvider={authProvider}`,
- ],
- refineOptions: [`liveMode: "auto",`],
- refineAntdImports: [],
- refineMuiImports: [],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-appwrite/meta.json b/refine-remix/plugins/data-provider-appwrite/meta.json
deleted file mode 100644
index fa561e69f..000000000
--- a/refine-remix/plugins/data-provider-appwrite/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Appwrite Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-appwrite/package.json b/refine-remix/plugins/data-provider-appwrite/package.json
deleted file mode 100644
index 591aff18c..000000000
--- a/refine-remix/plugins/data-provider-appwrite/package.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "dependencies": {
- "@refinedev/appwrite": "^6.4.6",
- "cookie": "^0.5.0",
- "js-cookie": "^3.0.1",
- "@refinedev/kbar": "^1.3.6",
- "uuid": "^9.0.0"
- },
- "devDependencies": {
- "@types/js-cookie": "^3.0.2",
- "@types/uuid": "^9.0.2"
- }
-}
diff --git a/refine-remix/plugins/data-provider-custom-json-rest/extend.js b/refine-remix/plugins/data-provider-custom-json-rest/extend.js
deleted file mode 100644
index 02f53b8d4..000000000
--- a/refine-remix/plugins/data-provider-custom-json-rest/extend.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const base = {
- _app: {
- import: [`import dataProvider from "@refinedev/simple-rest";`],
- afterImport: [
- `const API_URL = "https://api.fake-rest.refine.dev";`,
- "",
- ],
- refineProps: ["dataProvider={dataProvider(API_URL)}"],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-custom-json-rest/meta.json b/refine-remix/plugins/data-provider-custom-json-rest/meta.json
deleted file mode 100644
index 29d70e045..000000000
--- a/refine-remix/plugins/data-provider-custom-json-rest/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "REST Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-custom-json-rest/package.json b/refine-remix/plugins/data-provider-custom-json-rest/package.json
deleted file mode 100644
index a67b037a4..000000000
--- a/refine-remix/plugins/data-provider-custom-json-rest/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "@refinedev/simple-rest": "^5.0.1"
- }
-}
diff --git a/refine-remix/plugins/data-provider-graphql/extend.js b/refine-remix/plugins/data-provider-graphql/extend.js
deleted file mode 100644
index dc6d2fa35..000000000
--- a/refine-remix/plugins/data-provider-graphql/extend.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const base = {
- _app: {
- import: [
- `import dataProvider, { GraphQLClient } from "@refinedev/graphql";`,
- ],
- afterImport: [
- `const API_URL = "https://your-graphql-url/graphql";`,
- "",
- `const client = new GraphQLClient(API_URL);`,
- `const gqlDataProvider = dataProvider(client);`,
- "",
- ],
- refineProps: ["dataProvider={gqlDataProvider}"],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-graphql/meta.json b/refine-remix/plugins/data-provider-graphql/meta.json
deleted file mode 100644
index adbc228e9..000000000
--- a/refine-remix/plugins/data-provider-graphql/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "GraphQL Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-graphql/package.json b/refine-remix/plugins/data-provider-graphql/package.json
deleted file mode 100644
index 626c3cc35..000000000
--- a/refine-remix/plugins/data-provider-graphql/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "dependencies": {
- "@refinedev/graphql": "^6.4.8",
- "graphql": "^15.5.3",
- "graphql-request": "^5.2.0"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-hasura/app/queries/blog-posts.ts b/refine-remix/plugins/data-provider-hasura/app/queries/blog-posts.ts
deleted file mode 100644
index 76bfc8400..000000000
--- a/refine-remix/plugins/data-provider-hasura/app/queries/blog-posts.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export const BLOG_POSTS_QUERY = [
- "id",
- "title",
- "status",
- "created_at",
- "category_id",
- "content",
- {
- category: ["id", "title"],
- },
-];
-
-export const BLOG_POSTS_CATEGORIES_SELECT_QUERY = ["id", "title"];
diff --git a/refine-remix/plugins/data-provider-hasura/app/queries/categories.ts b/refine-remix/plugins/data-provider-hasura/app/queries/categories.ts
deleted file mode 100644
index 9a6a5ccd8..000000000
--- a/refine-remix/plugins/data-provider-hasura/app/queries/categories.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const CATEGORIES_QUERY = ["id", "title"];
diff --git a/refine-remix/plugins/data-provider-hasura/extend.js b/refine-remix/plugins/data-provider-hasura/extend.js
deleted file mode 100644
index 2afb9ba6c..000000000
--- a/refine-remix/plugins/data-provider-hasura/extend.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const base = {
- _app: {
- import: [
- `import dataProvider, { GraphQLClient } from "@refinedev/hasura";`,
- ],
- afterImport: [
- "",
- `const API_URL = "https://flowing-mammal-24.hasura.app/v1/graphql";`,
- "",
- `const client = new GraphQLClient(API_URL, {
- headers: {
- "x-hasura-role": "public",
- },
- });`,
- ],
- refineProps: [`dataProvider={dataProvider(client)}`],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-hasura/meta.json b/refine-remix/plugins/data-provider-hasura/meta.json
deleted file mode 100644
index c101db484..000000000
--- a/refine-remix/plugins/data-provider-hasura/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Hasura Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-hasura/package.json b/refine-remix/plugins/data-provider-hasura/package.json
deleted file mode 100644
index b6e7b2f09..000000000
--- a/refine-remix/plugins/data-provider-hasura/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "dependencies": {
- "@refinedev/hasura": "^6.4.12",
- "graphql": "^15.6.1",
- "graphql-request": "^5.2.0",
- "graphql-tag": "^2.12.6"
- }
-}
diff --git a/refine-remix/plugins/data-provider-medusa/extend.js b/refine-remix/plugins/data-provider-medusa/extend.js
deleted file mode 100644
index f8267892c..000000000
--- a/refine-remix/plugins/data-provider-medusa/extend.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const base = {
- _app: {
- import: [
- `import dataProvider, { authProvider } from "@refinedev/medusa";`,
- ],
- afterImport: [
- `const API_URL = "https://your-medusa-url";`,
- "",
- `const medusaDataProvider = dataProvider(API_URL);`,
- `const medusaAuthProvider = authProvider(API_URL);`,
- "",
- ],
- refineProps: [
- "authProvider={medusaAuthProvider}",
- "dataProvider={medusaDataProvider}",
- ],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-medusa/package.json b/refine-remix/plugins/data-provider-medusa/package.json
deleted file mode 100644
index bfc50b17c..000000000
--- a/refine-remix/plugins/data-provider-medusa/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "@refinedev/medusa": "^3.0.1"
- }
-}
diff --git a/refine-remix/plugins/data-provider-nestjs-query/app/queries/blog-posts.ts b/refine-remix/plugins/data-provider-nestjs-query/app/queries/blog-posts.ts
deleted file mode 100644
index 3e77249eb..000000000
--- a/refine-remix/plugins/data-provider-nestjs-query/app/queries/blog-posts.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import gql from "graphql-tag";
-
-export const POST_CREATE_MUTATION = gql`
- mutation PostCreate($input: CreateOneBlogPostInput!) {
- createOneBlogPost(input: $input) {
- id
- title
- status
- categoryId
- category {
- id
- title
- }
- content
- }
- }
-`;
-
-export const POST_EDIT_MUTATION = gql`
- mutation PostEdit($input: UpdateOneBlogPostInput!) {
- updateOneBlogPost(input: $input) {
- id
- title
- status
- categoryId
- category {
- id
- title
- }
- content
- }
- }
-`;
-
-export const POSTS_LIST_QUERY = gql`
- query BlogPostsList(
- $paging: OffsetPaging!
- $filter: BlogPostFilter
- $sorting: [BlogPostSort!]!
- ) {
- blogPosts(paging: $paging, filter: $filter, sorting: $sorting) {
- nodes {
- id
- title
- categoryId
- category {
- id
- title
- }
- status
- content
- createdAt
- }
- totalCount
- }
- }
-`;
-
-export const POST_SHOW_QUERY = gql`
- query PostShow($id: ID!) {
- blogPost(id: $id) {
- id
- title
- status
- categoryId
- category {
- id
- title
- }
- content
- createdAt
- }
- }
-`;
-
-export const CATEGORIES_SELECT_QUERY = gql`
- query CategoriesSelect($filter: CategoryFilter!) {
- categories(filter: $filter) {
- nodes {
- id
- title
- }
- }
- }
-`;
diff --git a/refine-remix/plugins/data-provider-nestjs-query/app/queries/categories.ts b/refine-remix/plugins/data-provider-nestjs-query/app/queries/categories.ts
deleted file mode 100644
index 8e4e6e0b1..000000000
--- a/refine-remix/plugins/data-provider-nestjs-query/app/queries/categories.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import gql from "graphql-tag";
-
-export const CATEGORY_CREATE_MUTATION = gql`
- mutation CategoryCreate($input: CreateOneCategoryInput!) {
- createOneCategory(input: $input) {
- id
- title
- }
- }
-`;
-
-export const CATEGORY_EDIT_MUTATION = gql`
- mutation CategoryEdit($input: UpdateOneCategoryInput!) {
- updateOneCategory(input: $input) {
- id
- title
- }
- }
-`;
-
-export const CATEGORIES_LIST_QUERY = gql`
- query CategoriesList(
- $paging: OffsetPaging!
- $filter: CategoryFilter
- $sorting: [CategorySort!]!
- ) {
- categories(paging: $paging, filter: $filter, sorting: $sorting) {
- nodes {
- id
- title
- createdAt
- }
- totalCount
- }
- }
-`;
-export const CATEGORY_SHOW_QUERY = gql`
- query CategoryShow($id: ID!) {
- category(id: $id) {
- id
- title
- createdAt
- }
- }
-`;
diff --git a/refine-remix/plugins/data-provider-nestjs-query/extend.js b/refine-remix/plugins/data-provider-nestjs-query/extend.js
deleted file mode 100644
index 5dc3cb9c5..000000000
--- a/refine-remix/plugins/data-provider-nestjs-query/extend.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const base = {
- _app: {
- import: [
- `import dataProvider, { GraphQLClient, liveProvider } from "@refinedev/nestjs-query";`,
- `import { createClient } from "graphql-ws";`,
- ],
- afterImport: [
- "",
- `const API_URL = "https://api.nestjs-query.refine.dev/graphql";`,
- `const WS_URL = "wss://api.nestjs-query.refine.dev/graphql";`,
- "",
- `const gqlClient = new GraphQLClient(API_URL);`,
- "",
- ],
- refineProps: [
- `dataProvider={dataProvider(gqlClient)}`,
- `liveProvider={typeof window !== "undefined" ? liveProvider(createClient({ url: WS_URL })) : undefined}`,
- ],
- refineOptions: [`liveMode: "auto",`],
- },
-};
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-nestjs-query/meta.json b/refine-remix/plugins/data-provider-nestjs-query/meta.json
deleted file mode 100644
index 22a1fda3b..000000000
--- a/refine-remix/plugins/data-provider-nestjs-query/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "NestJS Query Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-nestjs-query/package.json b/refine-remix/plugins/data-provider-nestjs-query/package.json
deleted file mode 100644
index 6506d516e..000000000
--- a/refine-remix/plugins/data-provider-nestjs-query/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "scripts": {
- "codegen": "graphql-codegen"
- },
- "dependencies": {
- "@refinedev/nestjs-query": "^1.1.1",
- "graphql-tag": "^2.12.6",
- "graphql-ws": "^5.9.1"
- },
- "devDependencies": {
- "@graphql-codegen/cli": "^5.0.0",
- "@graphql-codegen/typescript": "^4.0.1",
- "@graphql-codegen/typescript-operations": "^4.0.1",
- "@graphql-codegen/import-types-preset": "^3.0.0"
- }
-}
diff --git a/refine-remix/plugins/data-provider-nestjsx-crud/extend.js b/refine-remix/plugins/data-provider-nestjsx-crud/extend.js
deleted file mode 100644
index 84535bb87..000000000
--- a/refine-remix/plugins/data-provider-nestjsx-crud/extend.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const base = {
- _app: {
- import: ['import dataProvider from "@refinedev/nestjsx-crud";'],
- afterImport: [`const API_URL = "https://api.nestjsx-crud.refine.dev";`],
- refineProps: ["dataProvider={dataProvider(API_URL)}"],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-nestjsx-crud/meta.json b/refine-remix/plugins/data-provider-nestjsx-crud/meta.json
deleted file mode 100644
index fe3a53616..000000000
--- a/refine-remix/plugins/data-provider-nestjsx-crud/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "NestJS Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-nestjsx-crud/package.json b/refine-remix/plugins/data-provider-nestjsx-crud/package.json
deleted file mode 100644
index 6b3f6355a..000000000
--- a/refine-remix/plugins/data-provider-nestjsx-crud/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "@refinedev/nestjsx-crud": "^5.0.1"
- }
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/authProvider.ts b/refine-remix/plugins/data-provider-strapi-v4/app/authProvider.ts
deleted file mode 100644
index 383d9f92a..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/authProvider.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import type { AuthProvider } from "@refinedev/core";
-import { AuthHelper } from "@refinedev/strapi-v4";
-import axios from "axios";
-import * as cookie from "cookie";
-import Cookies from "js-cookie";
-import { API_URL, TOKEN_KEY } from "~/constants";
-
-export const axiosInstance = axios.create();
-const strapiAuthHelper = AuthHelper(API_URL + "/api");
-
-axiosInstance.interceptors.request.use((config) => {
- const token = Cookies.get(TOKEN_KEY);
- if (token && config.headers) {
- config.headers["Authorization"] = `Bearer ${token}`;
- }
- return config;
-});
-
-export const authProvider: AuthProvider = {
- login: async ({ email, password }) => {
- const { data, status } = await strapiAuthHelper.login(email, password);
- if (status === 200) {
- Cookies.set(TOKEN_KEY, data.jwt);
-
- // set header axios instance
- axiosInstance.defaults.headers.common = {
- Authorization: `Bearer ${data.jwt}`,
- };
-
- return {
- success: true,
- redirectTo: "/",
- };
- }
- return {
- success: false,
- };
- },
- logout: async () => {
- Cookies.remove(TOKEN_KEY);
- return {
- success: true,
- redirectTo: "/login",
- };
- },
- onError: async (error) => {
- console.error(error);
- return { error };
- },
- check: async (request) => {
- let token = undefined;
- if (request) {
- const hasCookie = request.headers.get("Cookie");
- if (hasCookie) {
- const parsedCookie = cookie.parse(
- request.headers.get("Cookie"),
- );
- token = parsedCookie[TOKEN_KEY];
- }
- } else {
- const parsedCookie = Cookies.get(TOKEN_KEY);
- token = parsedCookie ? JSON.parse(parsedCookie) : undefined;
- }
-
- if (token) {
- axiosInstance.defaults.headers.common = {
- Authorization: `Bearer ${token}`,
- };
- return {
- authenticated: true,
- };
- }
-
- const { pathname } = new URL(request.url);
-
- return {
- authenticated: false,
- error: {
- message: "Check failed",
- name: "Unauthenticated",
- },
- logout: true,
- redirectTo: `/login?to=${pathname}`,
- };
- },
- getPermissions: async () => null,
- getIdentity: async () => {
- const token = Cookies.get(TOKEN_KEY);
- if (!token) return null;
- const { data, status } = await strapiAuthHelper.me(token);
- if (status === 200) {
- const { id, username, email } = data;
- return {
- id,
- name: username,
- email,
- };
- }
-
- return null;
- },
-};
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/constants.ts b/refine-remix/plugins/data-provider-strapi-v4/app/constants.ts
deleted file mode 100644
index eed20ac6a..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const API_URL = "https://api.strapi-v4.refine.dev";
-export const TOKEN_KEY = "strapi-jwt-token";
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.forgot-password.tsx b/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.forgot-password.tsx
deleted file mode 100644
index 444b0b0ed..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.forgot-password.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function ForgotPassword() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.login.tsx b/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.login.tsx
deleted file mode 100644
index 8676c0da5..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Login() {
- return (
-
- />
- );
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.register.tsx b/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.register.tsx
deleted file mode 100644
index 9e7554799..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.register.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Register() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.tsx b/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.tsx
deleted file mode 100644
index b02d21f92..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_auth.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { redirect } from "@remix-run/node";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authProvider } from "~/authProvider";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-/**
- * If the current session is authenticated, we're redirecting the user to the home page.
- * Alternatively, we could also use the `Authenticated` component inside the `AuthLayout` to handle the redirect.
- * But, server-side redirects are more performant.
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (authenticated) {
- throw redirect(redirectTo ?? "/");
- }
-
- return {};
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_layout.tsx b/refine-remix/plugins/data-provider-strapi-v4/app/routes/_layout.tsx
deleted file mode 100644
index e7b3f99ae..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/routes/_layout.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
-<%_ } _%>
-
-import { Header } from "@components/header";
-import { authProvider } from "~/authProvider";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-strapi-v4/app/session.server.ts b/refine-remix/plugins/data-provider-strapi-v4/app/session.server.ts
deleted file mode 100644
index 6bcbb5798..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/app/session.server.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { createCookieSessionStorage, redirect } from "@remix-run/node";
-import { authProvider } from "./authProvider";
-
-type LoginForm = {
- username: string;
- password: string;
-};
-
-// normally you want this to be env variable
-const sessionSecret = "SUPER_SECRET_SESSION"; //process.env.SESSION_SECRET;
-if (!sessionSecret) {
- throw new Error("SESSION_SECRET must be set");
-}
-
-const storage = createCookieSessionStorage({
- cookie: {
- name: "RJ_session",
- // normally you want this to be `secure: true`
- // but that doesn't work on localhost for Safari
- // https://web.dev/when-to-use-local-https/
- secure: process.env.NODE_ENV === "production",
- secrets: [sessionSecret],
- sameSite: "lax",
- path: "/",
- maxAge: 60 * 60 * 24 * 30,
- httpOnly: true,
- },
-});
-
-export async function login({ username, password }: LoginForm) {
- try {
- const user = await authProvider.login({ username, password });
- if (user) {
- return { user };
- }
- } catch (error) {
- return error;
- }
-}
-
-export async function requireUserId(
- request: Request,
- redirectTo: string = new URL(request.url).pathname,
-) {
- try {
- const user = await authProvider.checkAuth?.({ request, storage });
- return user;
- } catch (error) {
- const searchParams = new URLSearchParams([["to", redirectTo]]);
- throw redirect(`/login?${searchParams}`);
- }
-}
-
-export async function createUserSession(user: object, redirectTo: string) {
- const session = await storage.getSession();
- session.set("user", { ...user });
- return redirect(redirectTo, {
- headers: {
- "Set-Cookie": await storage.commitSession(session),
- },
- });
-}
-
-export async function logout(request: Request) {
- const session = await storage.getSession(request.headers.get("Cookie"));
- return redirect("/login", {
- headers: {
- "Set-Cookie": await storage.destroySession(session),
- },
- });
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/extend.js b/refine-remix/plugins/data-provider-strapi-v4/extend.js
deleted file mode 100644
index 6717a7593..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/extend.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const base = {
- _app: {
- import: [`import { DataProvider } from "@refinedev/strapi-v4";`],
- localImport: [
- `import { authProvider, axiosInstance } from "~/authProvider";`,
- `import { API_URL } from "~/constants";`,
- ],
- refineProps: [
- "authProvider={authProvider}",
- "dataProvider={DataProvider(API_URL + `/api`, axiosInstance)}",
- ],
- refineAntdImports: [],
- refineMuiImports: [],
- },
-};
-module.exports = {
- extend(answers) {
- if (answers["ui-framework"] === "antd") {
- base._app.refineAntdImports.push("AuthPage");
- }
-
- if (answers["ui-framework"] === "mui") {
- base._app.refineMuiImports.push("AuthPage");
- }
-
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-strapi-v4/meta.json b/refine-remix/plugins/data-provider-strapi-v4/meta.json
deleted file mode 100644
index 907bb7010..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Strapi v4 Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-strapi-v4/package.json b/refine-remix/plugins/data-provider-strapi-v4/package.json
deleted file mode 100644
index af767b401..000000000
--- a/refine-remix/plugins/data-provider-strapi-v4/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "dependencies": {
- "@refinedev/strapi-v4": "^6.0.1",
- "axios": "^1.6.2",
- "cookie": "^0.5.0",
- "js-cookie": "^3.0.1"
- },
- "devDependencies": {
- "@types/js-cookie": "^3.0.2"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-supabase/app/authProvider.ts b/refine-remix/plugins/data-provider-supabase/app/authProvider.ts
deleted file mode 100644
index 2953fcd06..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/authProvider.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-import type { AuthBindings } from "@refinedev/core";
-import Cookies from "js-cookie";
-import * as cookie from "cookie";
-
-import { supabaseClient } from "~/utility";
-import { TOKEN_KEY } from "~/constants";
-
-export const authProvider: AuthBindings = {
- login: async ({ email, password }) => {
- const { data, error } = await supabaseClient.auth.signInWithPassword({
- email,
- password,
- });
-
- if (error) {
- return {
- success: false,
- error,
- };
- }
-
- if (data?.session) {
- Cookies.set(TOKEN_KEY, data.session.access_token);
- return {
- success: true,
- redirectTo: "/",
- };
- }
-
- // for third-party login
- return {
- success: true,
- };
- },
- logout: async () => {
- const { error } = await supabaseClient.auth.signOut();
-
- if (error) {
- return {
- success: false,
- error: {
- message: error.message,
- name: "LogoutError",
- },
- };
- }
-
- Cookies.remove(TOKEN_KEY);
- return {
- success: true,
- redirectTo: "/login",
- };
- },
- register: async ({ email, password }) => {
- try {
- const { data, error } = await supabaseClient.auth.signUp({
- email,
- password,
- });
-
- if (error) {
- return {
- success: false,
- error,
- };
- }
-
- if (data) {
- return {
- success: true,
- redirectTo: "/",
- };
- }
- } catch (error: any) {
- return {
- success: false,
- error,
- };
- }
-
- return {
- success: false,
- error: {
- message: "Register failed",
- name: "Invalid email or password",
- },
- };
- },
- onError: async (error) => {
- console.error(error);
- return { error };
- },
- check: async (request) => {
- let token = undefined;
- if (request) {
- const hasCookie = request.headers.get("Cookie");
- if (hasCookie) {
- const parsedCookie = cookie.parse(
- request.headers.get("Cookie"),
- );
- token = parsedCookie[TOKEN_KEY];
- }
- } else {
- const parsedCookie = Cookies.get(TOKEN_KEY);
- token = parsedCookie ? JSON.parse(parsedCookie) : undefined;
- }
-
- const { data } = await supabaseClient.auth.getUser(token);
- const { user } = data;
-
- if (user) {
- return {
- authenticated: true,
- };
- }
-
- const { pathname } = new URL(request.url);
-
- return {
- authenticated: false,
- error: {
- message: "Check failed",
- name: "Unauthenticated",
- },
- logout: true,
- redirectTo: `/login?to=${pathname}`,
- };
- },
- getPermissions: async () => {
- const user = await supabaseClient.auth.getUser();
-
- if (user) {
- return user.data.user?.role;
- }
-
- return null;
- },
- getIdentity: async () => {
- const { data } = await supabaseClient.auth.getUser();
-
- if (data?.user) {
- return {
- ...data.user,
- name: data.user.email,
- };
- }
-
- return null;
- },
-};
diff --git a/refine-remix/plugins/data-provider-supabase/app/constants.ts b/refine-remix/plugins/data-provider-supabase/app/constants.ts
deleted file mode 100644
index b5bebb6bb..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/constants.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const TOKEN_KEY = "supabase-token";
diff --git a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.forgot-password.tsx b/refine-remix/plugins/data-provider-supabase/app/routes/_auth.forgot-password.tsx
deleted file mode 100644
index 444b0b0ed..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.forgot-password.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function ForgotPassword() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.login.tsx b/refine-remix/plugins/data-provider-supabase/app/routes/_auth.login.tsx
deleted file mode 100644
index 8676c0da5..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.login.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Login() {
- return (
-
- />
- );
-}
diff --git a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.register.tsx b/refine-remix/plugins/data-provider-supabase/app/routes/_auth.register.tsx
deleted file mode 100644
index 9e7554799..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.register.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { AuthPage } from "@refinedev/antd";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === 'mui') { _%>
- import { AuthPage } from "@refinedev/mui";
- <%_ } _%>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
- import { AuthPage } from "@refinedev/core";
-<%_ } _%>
-
-export default function Register() {
- return (
-
- );
-}
diff --git a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.tsx b/refine-remix/plugins/data-provider-supabase/app/routes/_auth.tsx
deleted file mode 100644
index b02d21f92..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/routes/_auth.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { redirect } from "@remix-run/node";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-
-import { authProvider } from "~/authProvider";
-
-export default function AuthLayout() {
- // no layout is applied for the auth routes
- return ;
-}
-
-/**
- * If the current session is authenticated, we're redirecting the user to the home page.
- * Alternatively, we could also use the `Authenticated` component inside the `AuthLayout` to handle the redirect.
- * But, server-side redirects are more performant.
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (authenticated) {
- throw redirect(redirectTo ?? "/");
- }
-
- return {};
-}
diff --git a/refine-remix/plugins/data-provider-supabase/app/routes/_layout.tsx b/refine-remix/plugins/data-provider-supabase/app/routes/_layout.tsx
deleted file mode 100644
index e7b3f99ae..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/routes/_layout.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import type { LoaderFunctionArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
-import {
- ThemedLayoutV2,
- ThemedSiderV2,
-} from "@refinedev/antd";
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
-import {
- ThemedLayoutV2,
-} from "@refinedev/mui";
-<%_ } _%>
-
-import { Header } from "@components/header";
-import { authProvider } from "~/authProvider";
-<%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-import { Layout } from "~/components/layout";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- <>
- <%_ if (answers["ui-framework"] === "no" || answers["ui-framework"] === "tailwindcss") { _%>
-
-
-
- <%_ } else { _%>
- }
- <%_ if (answers["ui-framework"] === 'antd') { _%>
- Sider={(props) => }
- <%_ } _%>
- >
-
-
- <%_ } _%>
- >
- );
-}
-
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-supabase/app/utility/index.ts b/refine-remix/plugins/data-provider-supabase/app/utility/index.ts
deleted file mode 100644
index 1a2159651..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/utility/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./supabaseClient";
diff --git a/refine-remix/plugins/data-provider-supabase/app/utility/supabaseClient.ts b/refine-remix/plugins/data-provider-supabase/app/utility/supabaseClient.ts
deleted file mode 100644
index 4368fd9f1..000000000
--- a/refine-remix/plugins/data-provider-supabase/app/utility/supabaseClient.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { createClient } from "@refinedev/supabase";
-
-const SUPABASE_URL = "https://iwdfzvfqbtokqetmbmbp.supabase.co";
-const SUPABASE_KEY =
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYzMDU2NzAxMCwiZXhwIjoxOTQ2MTQzMDEwfQ._gr6kXGkQBi9BM9dx5vKaNKYj_DJN1xlkarprGpM_fU";
-
-export const supabaseClient = createClient(SUPABASE_URL, SUPABASE_KEY, {
- db: {
- schema: "public",
- },
- auth: {
- persistSession: true,
- },
-});
\ No newline at end of file
diff --git a/refine-remix/plugins/data-provider-supabase/extend.js b/refine-remix/plugins/data-provider-supabase/extend.js
deleted file mode 100644
index be819e229..000000000
--- a/refine-remix/plugins/data-provider-supabase/extend.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const base = {
- _app: {
- import: [`import { dataProvider } from "@refinedev/supabase";`],
- localImport: [
- `import { authProvider } from "~/authProvider";`,
- `import { supabaseClient } from "~/utility";`,
- ],
- refineAntdImports: [],
- refineMuiImports: [],
- refineProps: [
- "dataProvider={dataProvider(supabaseClient)}",
- "authProvider={authProvider}",
- ],
- },
-};
-module.exports = {
- extend(answers) {
- if (answers["ui-framework"] === "antd") {
- base._app.refineAntdImports.push("AuthPage");
- }
-
- if (answers["ui-framework"] === "mui") {
- base._app.refineMuiImports.push("AuthPage");
- }
-
- return base;
- },
-};
diff --git a/refine-remix/plugins/data-provider-supabase/meta.json b/refine-remix/plugins/data-provider-supabase/meta.json
deleted file mode 100644
index 804c4711d..000000000
--- a/refine-remix/plugins/data-provider-supabase/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Supabase Data Provider",
- "url": "https://refine.dev/docs/core/providers/data-provider/#overview"
-}
diff --git a/refine-remix/plugins/data-provider-supabase/package.json b/refine-remix/plugins/data-provider-supabase/package.json
deleted file mode 100644
index c9459387f..000000000
--- a/refine-remix/plugins/data-provider-supabase/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "dependencies": {
- "@refinedev/supabase": "^5.7.4",
- "cookie": "^0.5.0",
- "js-cookie": "^3.0.1"
- },
- "devDependencies": {
- "@types/js-cookie": "^3.0.2"
- }
-}
\ No newline at end of file
diff --git a/refine-remix/plugins/headless-example/app/routes/_index.tsx b/refine-remix/plugins/headless-example/app/routes/_index.tsx
deleted file mode 100644
index b8f4a59ed..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NavigateToResource } from "@refinedev/remix-router";
-
-/**
- * Since we don't have any routes for the index page, we're redirecting the user to the first resource.
- *
- * This can also be done using the `loader` function and `redirect`.
- */
-export default function Index() {
- <%_ if (answers["data-provider"] === 'data-provider-strapi-v4') { _%>
- return ;
- <%_ } else { _%>
- return ;
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.$.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.$.tsx
deleted file mode 100644
index ee93e5023..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.$.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ErrorComponent } from "@refinedev/core";
-
-/**
- * We're using a splat route to catch all routes that don't match any other route and render the `ErrorComponent` as 404 page.
- */
-export default function Index() {
- return ;
-}
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts._index.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts._index.tsx
deleted file mode 100644
index 7748f75f1..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts._index.tsx
+++ /dev/null
@@ -1,282 +0,0 @@
-import {
- type GetManyResponse,
- useMany,
- useNavigation,
-} from "@refinedev/core";
-import { useTable } from "@refinedev/react-table";
-import { type ColumnDef, flexRender } from "@tanstack/react-table";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
-import { BLOG_POSTS_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POSTS_LIST_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-
-export default function BlogPostList() {
- const columns = React.useMemo[]>(
- () => [
- {
- id: "id",
- accessorKey: "id",
- header: "ID",
- },
- {
- id: "title",
- accessorKey: "title",
- header: "Title",
- },
- {
- id: "content",
- accessorKey: "content",
- header: "Content",
- },
- {
- id: "category",
- header: "Category",
- accessorKey: <%- blogPostCategoryTableField %>,
- <%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- cell: function render({ getValue, table }) {
- const meta = table.options.meta as {
- categoryData: GetManyResponse;
- };
-
- try {
- const category = meta.categoryData?.data?.find(
- (item) => item.id == getValue()?.id,
- );
-
- return category?.title ?? "Loading...";
- } catch (error) {
- return null;
- }
- },
- <%_ } _%>
- },
- {
- id: "status",
- accessorKey: "status",
- header: "Status",
- },
- {
- id: "createdAt",
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- accessorKey: "created_at",
-<%_ } else if (answers["data-provider"] === "data-provider-appwrite") { _%>
- accessorKey: "$createdAt",
-<%_ } else { _%>
- accessorKey: "createdAt",
-<%_ } _%>
- header: "Created At",
- cell: function render({ getValue }) {
- return new Date(getValue()).toLocaleString(undefined, {
- timeZone: "UTC",
- });
- },
- },
- {
- id: "actions",
- accessorKey: "id",
- header: "Actions",
- cell: function render({ getValue }) {
- return (
-
-
-
-
- );
- },
- },
- ],
- [],
- );
-
- const { edit, show, create } = useNavigation();
-
- const {
- getHeaderGroups,
- getRowModel,
- setOptions,
- refineCore: {
- tableQueryResult: { data: tableData },
- },
- getState,
- setPageIndex,
- getCanPreviousPage,
- getPageCount,
- getCanNextPage,
- nextPage,
- previousPage,
- setPageSize,
- } = useTable({
- columns,
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- refineCoreProps: {
- meta: {
- populate: ['category'],
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlQuery: POSTS_LIST_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- refineCoreProps: {
- meta: {
- select: '*, categories(id,title)',
- },
- },
-<%_ } _%>
- });
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData } = useMany({
- resource: "categories",
- ids: tableData?.data?.map((item) => item?.<%- blogPostCategoryFieldName %>?.id).filter(Boolean) ?? [],
- queryOptions: {
- enabled: !!tableData?.data,
- },
- });
-
- setOptions((prev) => ({
- ...prev,
- meta: {
- ...prev.meta,
- categoryData,
- },
- }));
-<%_ } _%>
-
- return (
-
-
-
{"List"}
-
-
-
-
-
- {getHeaderGroups().map((headerGroup) => (
-
- {headerGroup.headers.map((header) => (
-
- {!header.isPlaceholder &&
- flexRender(
- header.column.columnDef.header,
- header.getContext(),
- )}
- |
- ))}
-
- ))}
-
-
- {getRowModel().rows.map((row) => (
-
- {row.getVisibleCells().map((cell) => (
-
- {flexRender(
- cell.column.columnDef.cell,
- cell.getContext(),
- )}
- |
- ))}
-
- ))}
-
-
-
-
-
-
-
-
-
-
- {" "}
- {getState().pagination.pageIndex + 1} / {getPageCount()}{" "}
-
-
-
- | {"Go"}:{" "}
- {
- const page = e.target.value
- ? Number(e.target.value) - 1
- : 0;
- setPageIndex(page);
- }}
- />
- {" "}
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.create.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.create.tsx
deleted file mode 100644
index 48bb253b6..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.create.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import { useNavigation, useSelect } from "@refinedev/core";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_CREATE_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-
-export default function BlogPostCreate() {
- const { list } = useNavigation();
-
- const {
- refineCore: { onFinish },
- register,
- handleSubmit,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: POST_CREATE_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- const { options: categoryOptions } = useSelect({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
Create
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.edit.$id.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.edit.$id.tsx
deleted file mode 100644
index ac8576d70..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.edit.$id.tsx
+++ /dev/null
@@ -1,182 +0,0 @@
-import { useNavigation, useSelect } from "@refinedev/core";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_EDIT_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostCreate() {
- const { list } = useNavigation();
-
- const {
- refineCore: { onFinish, queryResult },
- register,
- handleSubmit,
- setValue,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- refineCoreProps: {
- meta: {
- populate: ['category'],
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: POST_EDIT_MUTATION,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- refineCoreProps: {
- meta: {
- select: '*, categories(id,title)',
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- refineCoreProps: {
- queryOptions: {
- select: ({ data }) => {
- return {
- data: {
- ...data,
- category: data.category.$id,
- },
- };
- },
- },
- },
-<%_ } _%>
- });
-
- const blogPostsData = queryResult?.data?.data;
-
- const { options: categoryOptions } = useSelect({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>,
-<%_ } else { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>?.id,
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
- React.useEffect(() => {
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- setValue(<%- blogPostCategoryIdFormField %>, blogPostsData?.<%- blogPostCategoryFieldName %>);
-<%_ } else { _%>
- setValue(<%- blogPostCategoryIdFormField %>, blogPostsData?.<%- blogPostCategoryFieldName %>?.id);
-<%_ } _%>
- }, [categoryOptions]);
-
-
- return (
-
-
-
Edit
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.show.$id.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.show.$id.tsx
deleted file mode 100644
index fd70948f7..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.blog-posts.show.$id.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-import {
- useNavigation,
- useOne,
- useResource,
- useShow,
-} from "@refinedev/core";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_SHOW_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostShow() {
- const { edit, list } = useNavigation();
- const { id } = useResource();
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: POST_SHOW_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
- });
- const { data } = queryResult;
-
- const record = data?.data;
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData, isLoading: categoryIsLoading } = useOne({
- resource: "categories",
- id: record?.<%- blogPostCategoryFieldName %>?.id || "",
- queryOptions: {
- enabled: !!record,
- },
- });
-<%_ } _%>
-
- return (
-
-
-
{"Show"}
-
-
-
-
-
-
-
-
{"ID"}
-
{record?.id ?? ""}
-
-
-
{"Title"}
-
{record?.title}
-
-
-
{"Content"}
-
{record?.content}
-
-
-
{"Category"}
-<%_ if (isGraphQL || answers["data-provider"] === "data-provider-appwrite") { _%>
-
{record?.<%- blogPostCategoryFieldName %>?.title}
-<%_ } else { _%>
-
- {categoryIsLoading ? (
- <>Loading...>
- ) : (
- <>{categoryData?.data?.title}>
- )}
-
-<%_ } _%>
-
-
-
{"Status"}
-
{record?.status}
-
-
-
{"Created at"}
-
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- {new Date(record?.created_at).toLocaleString(undefined, {
- timeZone: "UTC",
- })}
-<%_ } else if (answers["data-provider"] === "data-provider-appwrite") { _%>
- {new Date(record?.$createdAt).toLocaleString(undefined, {
- timeZone: "UTC",
- })}
-<%_ } else { _%>
- {new Date(record?.createdAt).toLocaleString(undefined, {
- timeZone: "UTC",
- })}
-<%_ } _%>
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.categories._index.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.categories._index.tsx
deleted file mode 100644
index dd541e4e0..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.categories._index.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import { useNavigation } from "@refinedev/core";
-import { useTable } from "@refinedev/react-table";
-import { type ColumnDef, flexRender } from "@tanstack/react-table";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
-import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORIES_LIST_QUERY } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryList() {
- const columns = React.useMemo[]>(
- () => [
- {
- id: "id",
- accessorKey: "id",
- header: "ID",
- },
- {
- id: "title",
- accessorKey: "title",
- header: "Title",
- },
- {
- id: "actions",
- accessorKey: "id",
- header: "Actions",
- cell: function render({ getValue }) {
- return (
-
-
-
-
- );
- },
- },
- ],
- [],
- );
-
- const { edit, show, create } = useNavigation();
-
- const {
- getHeaderGroups,
- getRowModel,
- setOptions,
- getState,
- setPageIndex,
- getCanPreviousPage,
- getPageCount,
- getCanNextPage,
- nextPage,
- previousPage,
- setPageSize,
- } = useTable({
- columns,
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: CATEGORIES_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlQuery: CATEGORIES_LIST_QUERY,
- },
- },
-<%_ } _%>
- });
-
- setOptions((prev) => ({
- ...prev,
- meta: {
- ...prev.meta,
- },
- }));
-
- return (
-
-
-
List
-
-
-
-
-
- {getHeaderGroups().map((headerGroup) => (
-
- {headerGroup.headers.map((header) => (
-
- {!header.isPlaceholder &&
- flexRender(
- header.column.columnDef.header,
- header.getContext(),
- )}
- |
- ))}
-
- ))}
-
-
- {getRowModel().rows.map((row) => (
-
- {row.getVisibleCells().map((cell) => (
-
- {flexRender(
- cell.column.columnDef.cell,
- cell.getContext(),
- )}
- |
- ))}
-
- ))}
-
-
-
-
-
-
-
-
-
-
- {" "}
- {getState().pagination.pageIndex + 1} / {getPageCount()}{" "}
-
-
-
- | Go:{" "}
- {
- const page = e.target.value
- ? Number(e.target.value) - 1
- : 0;
- setPageIndex(page);
- }}
- />
- {" "}
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.categories.create.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.categories.create.tsx
deleted file mode 100644
index cd3676b0e..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.categories.create.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { useNavigation } from "@refinedev/core";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_CREATE_MUTATION } from "../queries/categories";
-<%_ } _%>
-
-
-export default function CategoryCreate() {
- const { list } = useNavigation();
-
- const {
- refineCore: { onFinish },
- register,
- handleSubmit,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: CATEGORIES_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: CATEGORY_CREATE_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- return (
-
-
-
Create
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.categories.edit.$id.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.categories.edit.$id.tsx
deleted file mode 100644
index 6fa9d34c5..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.categories.edit.$id.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { useNavigation } from "@refinedev/core";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_EDIT_MUTATION } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryEdit() {
- const { list } = useNavigation();
-
- const {
- refineCore: { onFinish },
- register,
- handleSubmit,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: CATEGORIES_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: CATEGORY_EDIT_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- return (
-
-
-
Edit
-
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.categories.show.$id.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.categories.show.$id.tsx
deleted file mode 100644
index ac146e876..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.categories.show.$id.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import {
- useNavigation,
- useResource,
- useShow,
-} from "@refinedev/core";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_SHOW_QUERY } from "../queries/categories";
-<%_ } _%>
-
-
-export default function CategoryShow() {
- const { edit, list } = useNavigation();
- const { id } = useResource();
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORY_SHOW_QUERY,
- },
-<%_ } _%>
- });
- const { data } = queryResult;
-
- const record = data?.data;
-
- return (
-
-
-
Show
-
-
-
-
-
-
-
-
ID
-
{record?.id ?? ""}
-
-
-
Title
-
{record?.title}
-
-
-
- );
-};
diff --git a/refine-remix/plugins/headless-example/app/routes/_layout.tsx b/refine-remix/plugins/headless-example/app/routes/_layout.tsx
deleted file mode 100644
index b1d78e5d6..000000000
--- a/refine-remix/plugins/headless-example/app/routes/_layout.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { Outlet } from "@remix-run/react";
-import { Layout } from "~/components/layout";
-<%_ if (_app.isAuthProviderCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authProvider } from "~/authProvider";
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authenticator } from "~/utils/auth.server";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
-
-
-
- );
-}
-
-<%_ if (_app.isAuthProviderCheck) { _%>
- /**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
- export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
- }
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
-<%_ } _%>
\ No newline at end of file
diff --git a/refine-remix/plugins/headless-example/package.json b/refine-remix/plugins/headless-example/package.json
deleted file mode 100644
index cc62f0977..000000000
--- a/refine-remix/plugins/headless-example/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "dependencies": {
- "@refinedev/react-hook-form": "^4.8.14",
- "@refinedev/react-router-v6": "^4.5.5",
- "@refinedev/react-table": "^5.6.6",
- "@tanstack/react-table": "^8.2.6"
- }
-}
diff --git a/refine-remix/plugins/mui-example/app/routes/_index.tsx b/refine-remix/plugins/mui-example/app/routes/_index.tsx
deleted file mode 100644
index b8f4a59ed..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_index.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { NavigateToResource } from "@refinedev/remix-router";
-
-/**
- * Since we don't have any routes for the index page, we're redirecting the user to the first resource.
- *
- * This can also be done using the `loader` function and `redirect`.
- */
-export default function Index() {
- <%_ if (answers["data-provider"] === 'data-provider-strapi-v4') { _%>
- return ;
- <%_ } else { _%>
- return ;
- <%_ } _%>
-}
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.$.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.$.tsx
deleted file mode 100644
index 5ab8713a2..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.$.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ErrorComponent } from "@refinedev/mui";
-
-/**
- * We're using a splat route to catch all routes that don't match any other route and render the `ErrorComponent` as 404 page.
- */
-export default function Index() {
- return ;
-}
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts._index.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts._index.tsx
deleted file mode 100644
index c31389866..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts._index.tsx
+++ /dev/null
@@ -1,156 +0,0 @@
-import { DataGrid, type GridColDef } from "@mui/x-data-grid";
-import { useMany } from "@refinedev/core";
-import {
- DateField,
- DeleteButton,
- EditButton,
- List,
- MarkdownField,
- ShowButton,
- useDataGrid,
-} from "@refinedev/mui";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POSTS_LIST_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostList() {
- const { dataGridProps } = useDataGrid({
- syncWithLocation: true,
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: POSTS_LIST_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
- });
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData, isLoading: categoryIsLoading } = useMany({
- resource: "categories",
- ids: dataGridProps?.rows?.map((item: any) => item?.<%- blogPostCategoryFieldName %>?.id).filter(Boolean) ?? [],
- queryOptions: {
- enabled: !!dataGridProps?.rows,
- },
- });
-<%_ } _%>
-
- const columns = React.useMemo(
- () => [
- {
- field: "id",
- headerName: "ID",
- type: "number",
- minWidth: 50,
- },
- {
- field: "title",
- flex: 1,
- headerName: "Title",
- minWidth: 200,
- },
- {
- field: "content",
- flex: 1,
- headerName: "Content",
- minWidth: 250,
- renderCell: function render({ value }) {
- if (!value) return '-'
- return (
-
- );
- },
- },
- {
- field: <%- blogPostCategoryTableField %>,
- flex: 1,
- headerName: "Category",
- minWidth: 300,
- <%_ if (isGraphQL || answers["data-provider"] === "data-provider-appwrite") { _%>
- valueGetter: ({ row }) => {
- const value = row?.<%- blogPostCategoryFieldName %>?.title
- return value
- },
- <%_ } else { _%>
- valueGetter: ({ row }) => {
- const value = row?.<%- blogPostCategoryFieldName %>;
- return value;
- },
- renderCell: function render({ value }) {
- return categoryIsLoading ? (
- <>Loading...>
- ) : (
- categoryData?.data?.find((item) => item.id === value?.id)?.title
- );
- },
- <%_ } _%>
- },
- {
- field: "status",
- flex: 1,
- headerName: "Status",
- minWidth: 200,
- },
- {
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- field: "created_at",
-<%_ } else if (answers["data-provider"] === "data-provider-appwrite") { _%>
- field: "$createdAt",
-<%_ } else { _%>
- field: "createdAt",
-<%_ } _%>
- flex: 1,
- headerName: "Created at",
- minWidth: 250,
- renderCell: function render({ value }) {
- return ;
- },
- },
- {
- field: "actions",
- headerName: "Actions",
- sortable: false,
- renderCell: function render({ row }) {
- return (
- <>
-
-
-
- >
- );
- },
- align: "center",
- headerAlign: "center",
- minWidth: 80,
- },
- ],
- <%_ if (isGraphQL || answers["data-provider"] === "data-provider-appwrite") { _%>
- [],
- <%_ } else { _%>
- [categoryData],
- <%_ } _%>
- );
-
- return (
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.create.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.create.tsx
deleted file mode 100644
index df3067ef0..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.create.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-import { Autocomplete, Box, MenuItem, Select, TextField } from '@mui/material'
-import { Create, useAutocomplete } from "@refinedev/mui";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-import { Controller } from "react-hook-form";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_CREATE_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostCreate() {
- const {
- saveButtonProps,
- refineCore: { formLoading, onFinish },
- handleSubmit,
- register,
- control,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: POST_CREATE_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- const { autocompleteProps: categoryAutocompleteProps } = useAutocomplete({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
- }
- rules={{ required: "This field is required" }}
- // eslint-disable-next-line
- defaultValue={null as any}
- render={({ field }) => (
- {
- field.onChange(value.id)
- }}
- getOptionLabel={(item) => {
- return (
- categoryAutocompleteProps?.options?.find((p) => {
- const itemId = typeof item === 'object' ? item?.id?.toString() : item?.toString()
- const pId = p?.id?.toString()
- return itemId === pId
- })?.title ?? ''
- )
- }}
- isOptionEqualToValue={(option, value) => {
- const optionId = option?.id?.toString()
- const valueId = typeof value === 'object' ? value?.id?.toString() : value?.toString()
- return value === undefined || optionId === valueId
- }}
- renderInput={(params) => (
-
- error={!!(errors as any)?.<%- blogPostCategoryFieldName %>}
- helperText={
- (errors as any)?.<%- blogPostCategoryFieldName %>?.message
- }
-<%_ } else { _%>
- error={!!(errors as any)?.<%- blogPostCategoryFieldName %>?.id}
- helperText={
- (errors as any)?.<%- blogPostCategoryFieldName %>?.id?.message
- }
-<%_ } _%>
- required
- />
- )}
- />
- )}
- />
- {
- return (
-
- );
- }}
- />
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.edit.$id.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.edit.$id.tsx
deleted file mode 100644
index 0f9675dff..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.edit.$id.tsx
+++ /dev/null
@@ -1,189 +0,0 @@
-import { Autocomplete, Box, Select, TextField } from "@mui/material";
-import MenuItem from "@mui/material/MenuItem";
-import { Edit, useAutocomplete } from "@refinedev/mui";
-import { useForm } from "@refinedev/react-hook-form";
-import React from "react";
-import { Controller } from "react-hook-form";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_EDIT_MUTATION, CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-export default function BlogPostEdit() {
- const {
- saveButtonProps,
- refineCore: { queryResult, formLoading, onFinish },
- handleSubmit,
- register,
- control,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- refineCoreProps: {
- meta: {
- populate: ['category'],
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: POST_EDIT_MUTATION,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- refineCoreProps: {
- meta: {
- select: '*, categories(id,title)',
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- refineCoreProps: {
- queryOptions: {
- select: ({ data }) => {
- return {
- data: {
- ...data,
- category: data.category.$id,
- },
- };
- },
- },
- },
-<%_ } _%>
- });
-
- const blogPostsData = queryResult?.data?.data;
-
- const { autocompleteProps: categoryAutocompleteProps } = useAutocomplete({
- resource: "categories",
-<%_ if (answers["data-provider"] === "data-provider-appwrite") { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>,
-<%_ } else { _%>
- defaultValue: blogPostsData?.<%- blogPostCategoryFieldName %>?.id,
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_SELECT_QUERY,
- },
-<%_ } _%>
- });
-
-
- return (
-
-
-
-
- }
- rules={{ required: "This field is required" }}
- // eslint-disable-next-line
- defaultValue={null as any}
- render={({ field }) => (
- {
- field.onChange(value.id)
- }}
- getOptionLabel={(item) => {
- return (
- categoryAutocompleteProps?.options?.find((p) => {
- const itemId = typeof item === 'object' ? item?.id?.toString() : item?.toString()
- const pId = p?.id?.toString()
- return itemId === pId
- })?.title ?? ''
- )
- }}
- isOptionEqualToValue={(option, value) => {
- const optionId = option?.id?.toString()
- const valueId = typeof value === 'object' ? value?.id?.toString() : value?.toString()
- return value === undefined || optionId === valueId
- }}
- renderInput={(params) => (
-
- error={!!(errors as any)?.<%- blogPostCategoryFieldName %>}
- helperText={
- (errors as any)?.<%- blogPostCategoryFieldName %>?.message
- }
-<%_ } else { _%>
- error={!!(errors as any)?.<%- blogPostCategoryFieldName %>?.id}
- helperText={
- (errors as any)?.<%- blogPostCategoryFieldName %>?.id?.message
- }
-<%_ } _%>
- required
- />
- )}
- />
- )}
- />
- {
- return (
-
- );
- }}
- />
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.show.$id.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.show.$id.tsx
deleted file mode 100644
index d16e9de89..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.blog-posts.show.$id.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Stack, Typography } from "@mui/material";
-import { useOne, useShow } from "@refinedev/core";
-import {
- DateField,
- MarkdownField,
- NumberField,
- Show,
- TextFieldComponent as TextField,
-} from "@refinedev/mui";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { BLOG_POSTS_QUERY, BLOG_POSTS_CATEGORIES_SELECT_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { POST_SHOW_QUERY } from "../queries/blog-posts";
-<%_ } _%>
-
-
-export default function BlogPostShow() {
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: BLOG_POSTS_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-strapi-v4") { _%>
- meta: {
- populate: ['category'],
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: POST_SHOW_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-supabase") { _%>
- meta: {
- select: '*, categories(id,title)',
- },
-<%_ } _%>
- });
-
- const { data, isLoading } = queryResult;
-
- const record = data?.data;
-
-<%_ if (!isGraphQL && answers["data-provider"] !== "data-provider-appwrite") { _%>
- const { data: categoryData, isLoading: categoryIsLoading } = useOne({
- resource: "categories",
- id: record?.<%- blogPostCategoryFieldName %>?.id || "",
- queryOptions: {
- enabled: !!record,
- },
- });
-<%_ } _%>
-
- return (
-
-
-
- {"ID"}
-
-
-
-
- {"Title"}
-
-
-
-
- {"Content"}
-
-
-
-
- {"Category"}
-
-<%_ if (isGraphQL || answers["data-provider"] === "data-provider-appwrite") { _%>
- {record?.<%- blogPostCategoryFieldName %>?.title}
-<%_ } else { _%>
- {categoryIsLoading ? (
- <>Loading...>
- ) : (
- <>{categoryData?.data?.title}>
- )}
-<%_ } _%>
-
-
- {"Status"}
-
-
-
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
-
-<%_ } else if (answers["data-provider"] === "data-provider-appwrite") { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.categories._index.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.categories._index.tsx
deleted file mode 100644
index d283ba4d9..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.categories._index.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import { DataGrid, type GridColDef } from "@mui/x-data-grid";
-import {
- DeleteButton,
- EditButton,
- List,
- ShowButton,
- useDataGrid,
-} from "@refinedev/mui";
-import React from "react";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORIES_LIST_QUERY } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryList() {
- const { dataGridProps } = useDataGrid({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORIES_LIST_QUERY,
- },
-<%_ } _%>
- });
-
- const columns = React.useMemo(
- () => [
- {
- field: "id",
- headerName: "ID",
- type: "number",
- minWidth: 50,
- },
- {
- field: "title",
- flex: 1,
- headerName: "Title",
- minWidth: 200,
- },
- {
- field: "actions",
- headerName: "Actions",
- sortable: false,
- renderCell: function render({ row }) {
- return (
- <>
-
-
-
- >
- );
- },
- align: "center",
- headerAlign: "center",
- minWidth: 80,
- },
- ],
- [],
- );
-
- return (
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.categories.create.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.categories.create.tsx
deleted file mode 100644
index 496c1bba6..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.categories.create.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { Box, TextField } from "@mui/material";
-import { Create } from "@refinedev/mui";
-import { useForm } from "@refinedev/react-hook-form";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_CREATE_MUTATION } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryCreate() {
- const {
- saveButtonProps,
- refineCore: { formLoading },
- register,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: CATEGORIES_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: CATEGORY_CREATE_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.categories.edit.$id.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.categories.edit.$id.tsx
deleted file mode 100644
index e8f7442c8..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.categories.edit.$id.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Box, TextField } from "@mui/material";
-import { Edit } from "@refinedev/mui";
-import { useForm } from "@refinedev/react-hook-form";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_EDIT_MUTATION } from"../queries/categories";
-<%_ } _%>
-
-export default function CategoryEdit() {
- const {
- saveButtonProps,
- register,
- formState: { errors },
- } = useForm({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- refineCoreProps: {
- meta: {
- fields: CATEGORIES_QUERY,
- },
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- refineCoreProps: {
- meta: {
- gqlMutation: CATEGORY_EDIT_MUTATION,
- },
- },
-<%_ } _%>
- });
-
- return (
-
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.categories.show.$id.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.categories.show.$id.tsx
deleted file mode 100644
index 018d87fa6..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.categories.show.$id.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { Stack, Typography } from "@mui/material";
-import { useShow } from "@refinedev/core";
-import {
- NumberField,
- Show,
- TextFieldComponent as TextField,
-} from "@refinedev/mui";
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- import { CATEGORIES_QUERY } from "../queries/categories";
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- import { CATEGORY_SHOW_QUERY } from "../queries/categories";
-<%_ } _%>
-
-export default function CategoryShow() {
- const { queryResult } = useShow({
-<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
- meta: {
- fields: CATEGORIES_QUERY,
- },
-<%_ } _%>
-<%_ if (answers["data-provider"] === "data-provider-nestjs-query") { _%>
- meta: {
- gqlQuery: CATEGORY_SHOW_QUERY,
- },
-<%_ } _%>
- });
- const { data, isLoading } = queryResult;
-
- const record = data?.data;
-
- return (
-
-
-
- {"ID"}
-
-
-
- {"Title"}
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui-example/app/routes/_layout.tsx b/refine-remix/plugins/mui-example/app/routes/_layout.tsx
deleted file mode 100644
index 963826ba0..000000000
--- a/refine-remix/plugins/mui-example/app/routes/_layout.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import { ThemedLayoutV2, ThemedSiderV2 } from "@refinedev/mui";
-import { Outlet } from "@remix-run/react";
-import { Header } from "~/components/header";
-<%_ if (_app.isAuthProviderCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authProvider } from "~/authProvider";
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
- import type { LoaderFunctionArgs } from "@remix-run/node";
- import { redirect } from "@remix-run/node";
- import { authenticator } from "~/utils/auth.server";
-<%_ } _%>
-
-export default function BaseLayout() {
- return (
- }
- Sider={(props) => }
- >
-
-
- );
-}
-
-
-<%_ if (_app.isAuthProviderCheck) { _%>
- /**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
- export async function loader({ request }: LoaderFunctionArgs) {
- const { authenticated, redirectTo } = await authProvider.check(request);
-
- if (!authenticated) {
- throw redirect(redirectTo ?? "/login");
- }
-
- return {};
- }
-<%_ } _%>
-
-<%_ if (_app.isNextAuthCheck) { _%>
-/**
- * We're checking if the current session is authenticated.
- * If not, we're redirecting the user to the login page.
- * This is applied for all routes that are nested under this layout (_protected).
- */
-export const loader = async ({ request }: LoaderFunctionArgs) => {
- const session = await authenticator.isAuthenticated(request);
- const pathname = new URL(request.url).pathname;
-
- let to = ``;
- // ignore only `/` routes
- if (pathname !== "/") {
- to = `?to=${pathname}`;
- }
-
- if (!session) {
- return redirect(`/login${to}`);
- }
-
- return {};
-};
-<%_ } _%>
\ No newline at end of file
diff --git a/refine-remix/plugins/mui/app/components/header/index.tsx b/refine-remix/plugins/mui/app/components/header/index.tsx
deleted file mode 100644
index 26fe55121..000000000
--- a/refine-remix/plugins/mui/app/components/header/index.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import DarkModeOutlined from "@mui/icons-material/DarkModeOutlined";
-import LightModeOutlined from "@mui/icons-material/LightModeOutlined";
-import AppBar from "@mui/material/AppBar";
-import Avatar from "@mui/material/Avatar";
-import IconButton from "@mui/material/IconButton";
-import Stack from "@mui/material/Stack";
-import Toolbar from "@mui/material/Toolbar";
-import Typography from "@mui/material/Typography";
-import { useGetIdentity } from "@refinedev/core";
-import { HamburgerMenu, type RefineThemedLayoutV2HeaderProps } from "@refinedev/mui";
-import React, { useContext } from "react";
-import { ColorModeContext } from "~/contexts/ColorModeContext";
-
-type IUser = {
- id: number;
- name: string;
- avatar: string;
-};
-
-export const Header: React.FC = ({
- sticky = true,
-}) => {
- const { mode, setMode } = useContext(ColorModeContext);
-
- const { data: user } = useGetIdentity();
-
- return (
-
-
-
-
-
- {
- setMode();
- }}
- >
- {mode === "dark" ? (
-
- ) : (
-
- )}
-
-
- {(user?.avatar || user?.name) && (
-
- {user?.name && (
-
- {user?.name}
-
- )}
-
-
- )}
-
-
-
-
- );
-};
diff --git a/refine-remix/plugins/mui/app/contexts/ClientStyleContext.tsx b/refine-remix/plugins/mui/app/contexts/ClientStyleContext.tsx
deleted file mode 100644
index 026d4089c..000000000
--- a/refine-remix/plugins/mui/app/contexts/ClientStyleContext.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import * as React from "react";
-import { CacheProvider } from "@emotion/react";
-import createCache from "@emotion/cache";
-
-export interface ClientStyleContextData {
- reset: () => void;
-}
-
-interface ClientCacheProviderProps {
- children: React.ReactNode;
-}
-
-export const ClientStyleContext = React.createContext({
- // eslint-disable-next-line @typescript-eslint/no-empty-function
- reset: () => {},
-});
-
-const createEmotionCache = () => {
- return createCache({ key: "css" });
-};
-
-export const ClientStyleCacheProvider = ({
- children,
-}: ClientCacheProviderProps) => {
- const [cache, setCache] = React.useState(createEmotionCache());
-
- const clientStyleContextValue = React.useMemo(
- () => ({
- reset() {
- setCache(createEmotionCache());
- },
- }),
- [],
- );
-
- return (
-
- {children}
-
- );
-};
diff --git a/refine-remix/plugins/mui/app/contexts/ColorModeContext.tsx b/refine-remix/plugins/mui/app/contexts/ColorModeContext.tsx
deleted file mode 100644
index 0c9181129..000000000
--- a/refine-remix/plugins/mui/app/contexts/ColorModeContext.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import useMediaQuery from "@mui/material/useMediaQuery";
-import { ThemeProvider } from "@mui/material/styles";
-import { RefineThemes } from "@refinedev/mui";
-import React from "react";
-
-type ColorModeContextType = {
- mode: string;
- setMode: () => void;
-};
-
-export const ColorModeContext = React.createContext(
- {} as ColorModeContextType,
-);
-
-export const ColorModeContextProvider: React.FC = ({
- children,
-}) => {
- const [mode, setMode] = React.useState("light");
-
- const systemTheme = useMediaQuery(`(prefers-color-scheme: dark)`);
-
- const toggleTheme = () => {
- const nextTheme = mode === "light" ? "dark" : "light";
-
- setMode(nextTheme);
- };
-
- return (
-
- : RefineThemes.<%= selectedTheme %>Dark
- }
- >
- {children}
-
-
- );
-};
diff --git a/refine-remix/plugins/mui/app/contexts/index.ts b/refine-remix/plugins/mui/app/contexts/index.ts
deleted file mode 100644
index 3d1482de2..000000000
--- a/refine-remix/plugins/mui/app/contexts/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export {
- ClientStyleCacheProvider,
- ClientStyleContext,
-} from "./ClientStyleContext";
-export { ColorModeContext, ColorModeContextProvider } from "./ColorModeContext";
diff --git a/refine-remix/plugins/mui/app/entry.client.tsx b/refine-remix/plugins/mui/app/entry.client.tsx
deleted file mode 100644
index bbc6cf1d8..000000000
--- a/refine-remix/plugins/mui/app/entry.client.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import CssBaseline from "@mui/material/CssBaseline";
-import GlobalStyles from "@mui/material/GlobalStyles";
-import { RemixBrowser } from "@remix-run/react";
-import { startTransition, StrictMode } from "react";
-import { hydrateRoot } from "react-dom/client";
-import { ClientStyleCacheProvider, ColorModeContextProvider } from "~/contexts";
-
-const hydrate = () => {
- startTransition(() => {
- hydrateRoot(
- document,
-
-
-
-
-
-
-
-
- ,
- );
- });
-};
-
-if (window.requestIdleCallback) {
- window.requestIdleCallback(hydrate);
-} else {
- // Safari doesn't support requestIdleCallback
- // https://caniuse.com/requestidlecallback
- window.setTimeout(hydrate, 1);
-}
diff --git a/refine-remix/plugins/mui/app/interfaces/theme.d.ts b/refine-remix/plugins/mui/app/interfaces/theme.d.ts
deleted file mode 100644
index d95af93b3..000000000
--- a/refine-remix/plugins/mui/app/interfaces/theme.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import "@refinedev/mui";
-
-export interface CustomTheme {
- // Add custom variables here like below:
- // status: {
- // danger: string;
- // };
-}
-
-declare module "@refinedev/mui" {
- interface Theme extends import("@refinedev/mui").Theme, CustomTheme {}
- interface ThemeOptions
- extends import("@refinedev/mui").ThemeOptions,
- CustomTheme {}
-}
diff --git a/refine-remix/plugins/mui/app/root.tsx b/refine-remix/plugins/mui/app/root.tsx
deleted file mode 100644
index 23f94a4ca..000000000
--- a/refine-remix/plugins/mui/app/root.tsx
+++ /dev/null
@@ -1,174 +0,0 @@
-import React from 'react';
-import type { MetaFunction } from "@remix-run/node";
-import {
- Links,
- LiveReload,
- Meta,
- Outlet,
- Scripts,
- ScrollRestoration,
- useLoaderData,
-} from "@remix-run/react";
-
-import { Refine, GitHubBanner, <%- (_app.refineImports || []).join("\n,") _%> } from '@refinedev/core';
-<%_ if (answers["ui-framework"] === 'mui') { _%>
- import GlobalStyles from "@mui/material/GlobalStyles";
- import CssBaseline from "@mui/material/CssBaseline";
- import { <%- (_app.refineMuiImports || []).join("\n,") _%> } from '@refinedev/mui';
-<%_ } _%>
-
-import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar";
-import routerProvider, { UnsavedChangesNotifier } from "@refinedev/remix-router";
-
-<%- (_app.import || []).join("\n") _%>
-
-<%- (_app.localImport || []).join("\n") _%>
-
-<%- (_app.relativeImport || []).join("\n") _%>
-
-<%- (_app.afterImport || []).join("\n") _%>
-
-<%
- var top = _app.wrapper.map(wrapper => wrapper[0] || "");
- var bottom = _app.wrapper.map(wrapper => wrapper[1] || "").reverse();
-%>
-
-export const meta: MetaFunction = () => ([
- {
- title: "New Remix + Refine App",
- }
-]);
-
-
-interface DocumentProps {
- children: React.ReactNode;
- title?: string;
- }
-
- const Document = withEmotionCache(({ children, title }: DocumentProps, emotionCache) => {
- const clientStyleData = React.useContext(ClientStyleContext);
-
- // Only executed on client
- useEnhancedEffect(() => {
- // re-link sheet container
- emotionCache.sheet.container = document.head;
- // re-inject tags
- const tags = emotionCache.sheet.tags;
- emotionCache.sheet.flush();
- tags.forEach((tag) => {
- // eslint-disable-next-line no-underscore-dangle
- (emotionCache.sheet as any)._insertTag(tag);
- });
- // reset cache to reapply global styles
- clientStyleData.reset();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- return (
-
-
-
-
- {title ? {title} : null}
-
-
-
-
-
-
- {children}
-
-
-
-
-
- );
-});
-
-
-// https://remix.run/api/conventions#default-export
-// https://remix.run/api/conventions#route-filenames
-export default function App() {
- <%- (_app.innerHooks || []).join("\n") %>
- <%- (_app.inner || []).join("\n") %>
- return (
-
-
-
-
-
-<%- top.join("\n") %>
-
- <%_ if (_app.hasRoutes === true) { _%>
- resources={[
- <%_ if (answers["data-provider"] === 'data-provider-strapi-v4') { _%>
- {
- name: "blog-posts",
- list: "/blog-posts",
- create: "/blog-posts/create",
- edit: "/blog-posts/edit/:id",
- show: "/blog-posts/show/:id",
- meta: {
- canDelete: true,
- },
- },
- <%_ } else { _%>
- {
- name: "blog_posts",
- list: "/blog-posts",
- create: "/blog-posts/create",
- edit: "/blog-posts/edit/:id",
- show: "/blog-posts/show/:id",
- meta: {
- canDelete: true,
- },
- },
- <%_ } _%>
- {
- name: "categories",
- list: "/categories",
- create: "/categories/create",
- edit: "/categories/edit/:id",
- show: "/categories/show/:id",
- meta: {
- canDelete: true,
- },
- }
- ]}
- <%_ } _%>
- options={{
- syncWithLocation: true,
- warnWhenUnsavedChanges: true,
- useNewQueryKeys: true,
- <%_ if (typeof projectId !== 'undefined' && projectId !== '') { _%>
- projectId: "<%= projectId %>",
- <%_ } _%>
- <%- (_app.refineOptions ||Â []).join("\n") %>
- }}
- >
-
-
-
-
- <%- bottom.join("\n") %>
-
-
- );
- }
-
-export function links() {
- return [
- {
- rel: "stylesheet",
- href: "https://unpkg.com/modern-css-reset@1.4.0/dist/reset.min.css",
- },
- ];
-}
-
-
-<%- (_app.loader || []).join("\n,") _%>
diff --git a/refine-remix/plugins/mui/extend.js b/refine-remix/plugins/mui/extend.js
deleted file mode 100644
index 9a8bd0451..000000000
--- a/refine-remix/plugins/mui/extend.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const base = {
- _app: {
- import: [
- "import { withEmotionCache } from '@emotion/react';",
- `import { unstable_useEnhancedEffect as useEnhancedEffect } from "@mui/material";`,
- ],
- refineProps: ["notificationProvider={notificationProvider}"],
- refineMuiImports: ["notificationProvider", "RefineSnackbarProvider"],
- localImport: [`import { ClientStyleContext } from "~/contexts";`],
- wrapper: [["", ""]],
- },
-};
-
-module.exports = {
- extend() {
- return base;
- },
-};
diff --git a/refine-remix/plugins/mui/meta.json b/refine-remix/plugins/mui/meta.json
deleted file mode 100644
index d22dbdb58..000000000
--- a/refine-remix/plugins/mui/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Material UI",
- "url": "https://refine.dev/docs/ui-frameworks/mui/tutorial/"
-}
diff --git a/refine-remix/plugins/mui/package.json b/refine-remix/plugins/mui/package.json
deleted file mode 100644
index 2c7a9d514..000000000
--- a/refine-remix/plugins/mui/package.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "dependencies": {
- "@refinedev/mui": "^5.14.4",
- "@refinedev/react-hook-form": "^4.8.14",
- "@mui/icons-material": "^5.8.3",
- "@emotion/react": "^11.8.2",
- "@emotion/styled": "^11.8.1",
- "@mui/lab": "^5.0.0-alpha.85",
- "@mui/material": "^5.8.6",
- "@mui/x-data-grid": "^6.6.0"
- }
-}
diff --git a/refine-remix/plugins/tailwindcss/app/global.css b/refine-remix/plugins/tailwindcss/app/global.css
deleted file mode 100644
index d99ff9c0c..000000000
--- a/refine-remix/plugins/tailwindcss/app/global.css
+++ /dev/null
@@ -1,104 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-/*
-* These styles were added to improve the appearance of the example pages.
-* It is safe to delete them, and they are not intended to be used by Refine components.
-*/
-@layer base {
- input {
- @apply border border-gray-300 rounded-sm;
- }
-
- input[type="submit"] {
- @apply bg-[#EFEFEF];
- }
-
- button {
- @apply border border-gray-300 px-2 rounded-sm bg-[#EFEFEF];
- }
-
- h1 {
- @apply text-2xl font-bold my-6;
- }
-
- ul {
- @apply list-disc my-4;
- }
-
- a {
- @apply text-blue-700 underline;
- }
-
- label {
- @apply text-sm font-medium;
- }
-
- body {
- @apply m-0 bg-white;
- }
-
- table {
- @apply border border-black border-collapse;
- }
-
- table th,
- table td {
- @apply m-0 p-2 border-b border-r border-black;
- }
-
- table tr:last-child td {
- @apply border-b-0;
- }
-
- table th:last-child,
- table td:last-child {
- @apply border-r-0;
- }
-
- .layout {
- @apply flex gap-4;
- }
-
- @media (max-width: 751px) {
- .layout {
- @apply block;
- }
- }
-
- .layout .content {
- @apply flex flex-col flex-grow;
- }
-
- .breadcrumb {
- @apply flex gap-6 p-2 px-4 border-b border-gray-300;
- list-style-type: "/ ";
- }
-
- .breadcrumb a {
- @apply text-blue-700 no-underline;
- }
-
- .menu {
- @apply flex-shrink-0 p-2 pr-4 border-r border-gray-300;
- }
-
- .menu a {
- @apply text-black;
- }
-
- .menu .active {
- @apply font-bold;
- }
-
- @media (max-width: 751px) {
- .menu {
- @apply border-r-0 border-b border-gray-300;
- }
- }
-
- .menu ul {
- @apply pl-4;
- }
-}
diff --git a/refine-remix/plugins/tailwindcss/meta.json b/refine-remix/plugins/tailwindcss/meta.json
deleted file mode 100644
index ab0662175..000000000
--- a/refine-remix/plugins/tailwindcss/meta.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "Tailwind CSS",
- "url": "https://refine.dev/docs/guides-concepts/general-concepts/#headless-concept"
-}
diff --git a/refine-remix/plugins/tailwindcss/package.json b/refine-remix/plugins/tailwindcss/package.json
deleted file mode 100644
index 9dc73ff2e..000000000
--- a/refine-remix/plugins/tailwindcss/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "devDependencies": {
- "tailwindcss": "^3.4.3",
- "postcss": "^8.4.38",
- "autoprefixer": "^10.4.19"
- }
-}
diff --git a/refine-remix/plugins/tailwindcss/postcss.config.js b/refine-remix/plugins/tailwindcss/postcss.config.js
deleted file mode 100644
index 67cdf1a55..000000000
--- a/refine-remix/plugins/tailwindcss/postcss.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- plugins: {
- tailwindcss: {},
- autoprefixer: {},
- },
-};
diff --git a/refine-remix/plugins/tailwindcss/tailwind.config.ts b/refine-remix/plugins/tailwindcss/tailwind.config.ts
deleted file mode 100644
index 7e493683e..000000000
--- a/refine-remix/plugins/tailwindcss/tailwind.config.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { Config } from "tailwindcss";
-
-export default {
- content: ["./app/**/*.{js,jsx,ts,tsx}"],
- theme: {
- extend: {},
- },
- plugins: [],
-} satisfies Config;
diff --git a/refine-remix/prompt.js b/refine-remix/prompt.js
deleted file mode 100644
index 371097605..000000000
--- a/refine-remix/prompt.js
+++ /dev/null
@@ -1,246 +0,0 @@
-module.exports = {
- prompts: [
- {
- name: "data-provider",
- message: "Choose your backend service to connect:",
- type: "select",
- pageSize: 2,
- choices: [
- {
- message: "REST API",
- name: "data-provider-custom-json-rest",
- hint: "Installs REST API Data Provider.",
- },
- {
- message: "NestJS Query",
- name: "data-provider-nestjs-query",
- hint: "Installs NestJS Query Data Provider.",
- },
- {
- message: "GraphQL API",
- name: "data-provider-graphql",
- hint: "Installs GraphQL API Data Provider.",
- },
- {
- message: "Strapi v4",
- name: "data-provider-strapi-v4",
- hint: "Installs Strapi v4 Data Provider.",
- },
- {
- message: "nestjsx-crud",
- name: "data-provider-nestjsx-crud",
- hint: "Installs Nestjsx-crud Data Provider.",
- },
- {
- message: "Airtable",
- name: "data-provider-airtable",
- hint: "Installs Airtable Data Provider.",
- },
- {
- message: "Supabase",
- name: "data-provider-supabase",
- hint: "Installs Supabase Data Provider.",
- },
- {
- message: "Appwrite",
- name: "data-provider-appwrite",
- hint: "Installs Appwrite Data Provider.",
- },
- {
- message: "Hasura",
- name: "data-provider-hasura",
- hint: "Installs Hasura Data Provider.",
- },
- ],
- default: "data-provider-custom-json-rest",
- },
- {
- name: "ui-framework",
- message: "Do you want to use a UI Framework?:",
- type: "select",
- pageSize: 2,
- choices: [
- {
- message: "Headless",
- name: "no",
- hint: "No UI framework package will be installed.",
- },
- {
- message: "Ant Design",
- name: "antd",
- hint: "Installs Ant Design package.",
- },
- {
- message: "Material UI",
- name: "mui",
- hint: "Installs Material UI package.",
- },
- {
- message: "Tailwind CSS",
- name: "tailwindcss",
- hint: "Installs Tailwind CSS package.",
- },
- ],
- default: "no",
- },
- {
- name: "antd-example",
- message: "Do you want to add example pages?:",
- type: "select",
- choices: [
- {
- message: "No",
- name: "no",
- hint: "No examples will be installed.",
- },
- {
- message: "Yes (Recommended)",
- name: "antd-example",
- hint: "Installs example pages.",
- },
- ],
- skip: ({ answers }) =>
- answers["ui-framework"] !== "antd" ||
- answers["data-provider"] === "data-provider-graphql",
- default: "no",
- },
- {
- name: "mui-example",
- message: "Do you want to add example pages?:",
- type: "select",
- choices: [
- {
- message: "No",
- name: "no",
- hint: "No examples will be installed.",
- },
- {
- message: "Yes (Recommended)",
- name: "mui-example",
- hint: "Installs example pages.",
- },
- ],
- skip: ({ answers }) =>
- answers["ui-framework"] !== "mui" ||
- answers["data-provider"] === "data-provider-graphql",
- default: "no",
- },
- {
- name: "headless-example",
- message: "Do you want to add example pages?:",
- type: "select",
- choices: [
- {
- message: "No",
- name: "no",
- hint: "No examples will be installed.",
- },
- {
- message: "Yes (Recommended)",
- name: "headless-example",
- hint: "Installs example pages.",
- },
- ],
- skip: ({ answers }) =>
- answers["ui-framework"] === "antd" ||
- answers["ui-framework"] === "mui" ||
- answers["data-provider"] === "data-provider-graphql",
- default: "no",
- },
- {
- name: "auth-provider",
- message: "Do you need any Authentication logic?:",
- type: "select",
- choices: [
- {
- message: "None",
- name: "none",
- hint: "No Auth Provider will be installed.",
- },
- {
- message: "Custom",
- name: "auth-provider-custom",
- hint: "Installs a mock Auth Provider.",
- },
- {
- message: "Auth0",
- name: "auth-provider-auth0",
- hint: "Installs Auth0 with Remix-Auth",
- },
- {
- message: "Google",
- name: "auth-provider-google",
- hint: "Installs Google with Remix-Auth",
- },
- {
- message: "Keycloak",
- name: "auth-provider-keycloak",
- hint: "Installs Keycloak with Remix-Auth",
- },
- ],
- skip: ({ answers }) =>
- answers["data-provider"] === "data-provider-supabase" ||
- answers["data-provider"] === "data-provider-strapi-v4" ||
- answers["data-provider"] === "data-provider-appwrite" ||
- answers["data-provider"] === "data-provider-nhost",
- default: "none",
- },
- ],
- ignores: [
- {
- plugin: ["data-provider-appwrite"],
- when: function (answers) {
- return answers["ui-framework"] !== "antd";
- },
- pattern: ["app/utility/normalize.ts"],
- },
- {
- plugin: ["_base"],
- when: function (answers) {
- return (
- typeof answers["svg"] === "undefined" ||
- answers["ui-framework"] === "no" ||
- answers["ui-framework"] === "tailwindcss"
- );
- },
- pattern: ["app/components/app-icon/index.tsx"],
- },
- {
- plugin: ["_base"],
- when: function (answers) {
- return (
- answers["ui-framework"] !== "no" &&
- answers["ui-framework"] !== "tailwindcss"
- );
- },
- pattern: [
- "app/components/breadcrumb/index.tsx",
- "app/components/layout/index.tsx",
- "app/components/menu/index.tsx",
- "app/global.css",
- ],
- },
- {
- plugin: ["data-provider-hasura"],
- when: function (answers) {
- return [
- "headless-example",
- "antd-example",
- "mui-example",
- ].every((item) => answers[item] === "no");
- },
- pattern: ["app/queries/blog-posts.ts", "app/queries/categories.ts"],
- },
- {
- plugin: ["data-provider-nestjs-query"],
- when: function (answers) {
- return [
- "headless-example",
- "antd-example",
- "mui-example",
- ].every((item) => answers[item] === "no");
- },
- pattern: ["app/queries/blog-posts.ts", "app/queries/categories.ts"],
- },
- ],
-};
diff --git a/refine-remix/template/.eslintrc b/refine-remix/template/.eslintrc
deleted file mode 100644
index 715697546..000000000
--- a/refine-remix/template/.eslintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@remix-run/eslint-config", "@remix-run/eslint-config/node"]
-}
diff --git a/refine-remix/template/.npmrc b/refine-remix/template/.npmrc
deleted file mode 100644
index 657e4d8d5..000000000
--- a/refine-remix/template/.npmrc
+++ /dev/null
@@ -1,4 +0,0 @@
-legacy-peer-deps=true
-strict-peer-dependencies=false
-auto-install-peers=true
-shamefully-hoist=true
\ No newline at end of file
diff --git a/refine-remix/template/Dockerfile b/refine-remix/template/Dockerfile
deleted file mode 100644
index 8242848a7..000000000
--- a/refine-remix/template/Dockerfile
+++ /dev/null
@@ -1,43 +0,0 @@
-FROM refinedev/node:18 AS base
-
-FROM base as deps
-
-COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
-
-RUN \
- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
- elif [ -f package-lock.json ]; then npm ci; \
- elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
- else echo "Lockfile not found." && exit 1; \
- fi
-
-FROM base as builder
-
-COPY --from=deps /app/refine/node_modules ./node_modules
-
-COPY . .
-
-RUN npm run build
-
-FROM base as production-deps
-
-COPY --from=deps /app/refine/node_modules ./node_modules
-
-COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
-
-ENV NODE_ENV production
-
-RUN npm prune
-
-FROM base AS runner
-
-ENV NODE_ENV production
-
-COPY --from=production-deps --chown=refine:nodejs /app/refine/node_modules ./node_modules
-COPY --from=builder --chown=refine:nodejs /app/refine/build ./build
-COPY --from=builder --chown=refine:nodejs /app/refine/public ./public
-COPY --from=builder --chown=refine:nodejs /app/refine/package.json ./package.json
-
-USER refine
-
-CMD ["npm", "run", "start"]
diff --git a/refine-remix/template/README.MD b/refine-remix/template/README.MD
deleted file mode 100644
index d0c93f2c1..000000000
--- a/refine-remix/template/README.MD
+++ /dev/null
@@ -1,55 +0,0 @@
-# <%= name %>
-<% const refineGitUrl = "https://github.com/refinedev/refine"; -%>
-<% const createRefineAppGitUrl = "https://github.com/refinedev/refine/tree/master/packages/create-refine-app"; -%>
-<% const refineDocsUrl = "https://refine.dev/docs"; -%>
-
-
-
-
-This [Refine](<%- refineGitUrl %>) project was generated with [create refine-app](<%- createRefineAppGitUrl %>).
-
-## Getting Started
-
-A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility ✨
-
-Refine's hooks and components simplifies the development process and eliminates the repetitive tasks by providing industry-standard solutions for crucial aspects of a project, including authentication, access control, routing, networking, state management, and i18n.
-
-
-## Available Scripts
-
-### Running the development server.
-
-```bash
- <%= pmRun %> dev
-```
-
-### Building for production.
-
-```bash
- <%= pmRun %> build
-```
-
-### Running the production server.
-
-```bash
- <%= pmRun %> start
-```
-
-## Learn More
-
-To learn more about **Refine**, please check out the [Documentation](<%- refineDocsUrl %>)
-
-<% const list = pluginsData.filter((plugin) => plugin.url.length > 0) -%>
-<% for (var i = 0; i < list.length; i++ ) { -%>
-<% if (list[i].url.length > 0) { -%>
-- **<%= list[i].name -%>** [Docs](<%- list[i].url %>)
-<% } -%>
-<% } %>
-
-## License
-
-MIT
diff --git a/refine-remix/template/_package.json b/refine-remix/template/_package.json
deleted file mode 100644
index 97807e65a..000000000
--- a/refine-remix/template/_package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "<%= name %>",
- "version": "0.1.0",
- "private": true,
- "sideEffects": false,
- "scripts": {
- "dev": "refine dev",
- "build": "refine build",
- "start": "refine start ./build/index.js",
- "refine": "refine"
- },
- "dependencies": {
- "@refinedev/cli": "^2.16.22",
- "@refinedev/core": "^4.47.1",
- "@refinedev/devtools": "^1.1.32",
- "@refinedev/remix-router": "^3.0.0",
- "@refinedev/kbar": "^1.3.6",
- "@remix-run/node": "^2.4.1",
- "@remix-run/react": "^2.4.1",
- "@remix-run/serve": "^2.4.1",
- "isbot": "^3.6.8",
- "react": "^18.0.0",
- "react-dom": "^18.0.0"
- },
- "devDependencies": {
- "@remix-run/dev": "^2.4.1",
- "@remix-run/eslint-config": "^2.4.1",
- "@types/react": "^18.0.0",
- "@types/react-dom": "^18.0.0",
- "eslint": "^8.24.0",
- "typescript": "^5.4.2"
- <%_ if (typeof projectId !== 'undefined' && projectId !== '') { _%>
- },
- "refine": {
- "projectId": "<%= projectId %>"
- }
- <%_ } else { _%>
- }
- <%_ } _%>
-}
diff --git a/refine-remix/template/_tsconfig.json b/refine-remix/template/_tsconfig.json
deleted file mode 100644
index 893844160..000000000
--- a/refine-remix/template/_tsconfig.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
- "compilerOptions": {
- "lib": ["DOM", "DOM.Iterable", "ES2019"],
- "isolatedModules": true,
- "esModuleInterop": true,
- "jsx": "react-jsx",
- "moduleResolution": "node",
- "resolveJsonModule": true,
- "target": "ES2019",
- "strict": true,
- "allowJs": true,
- "forceConsistentCasingInFileNames": true,
- "baseUrl": ".",
- "paths": {
- "~/*": ["./app/*"],
- "@components/*": ["./app/components/*"],
- "@components": ["./app/components"],
- "@contexts/*": ["./app/contexts/*"],
- "@contexts": ["./app/contexts"],
- "@styles/*": ["./app/styles/*"],
- "@styles": ["./app/styles"],
- "@public/*": ["public/*"],
- "@public": ["public"]
- },
- "noEmit": true
- }
-}
diff --git a/refine-remix/template/app/entry.client.tsx b/refine-remix/template/app/entry.client.tsx
deleted file mode 100644
index 64ea0b340..000000000
--- a/refine-remix/template/app/entry.client.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * By default, Remix will handle hydrating your app on the client for you.
- * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨
- * For more information, see https://remix.run/file-conventions/entry.client
- */
-
-import { RemixBrowser } from "@remix-run/react";
-import { startTransition, StrictMode } from "react";
-import { hydrateRoot } from "react-dom/client";
-
-startTransition(() => {
- hydrateRoot(
- document,
-
-
- ,
- );
-});
diff --git a/refine-remix/template/app/entry.server.tsx b/refine-remix/template/app/entry.server.tsx
deleted file mode 100644
index ae78caa4c..000000000
--- a/refine-remix/template/app/entry.server.tsx
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * By default, Remix will handle generating the HTTP Response for you.
- * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨
- * For more information, see https://remix.run/file-conventions/entry.server
- */
-
-import type { AppLoadContext, EntryContext } from "@remix-run/node";
-import { createReadableStreamFromReadable } from "@remix-run/node";
-import { RemixServer } from "@remix-run/react";
-import isbot from "isbot";
-import { PassThrough } from "node:stream";
-import { renderToPipeableStream } from "react-dom/server";
-
-const ABORT_DELAY = 5_000;
-
-export default function handleRequest(
- request: Request,
- responseStatusCode: number,
- responseHeaders: Headers,
- remixContext: EntryContext,
- // This is ignored so we can keep it in the template for visibility. Feel
- // free to delete this parameter in your app if you're not using it!
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- loadContext: AppLoadContext,
-) {
- return isbot(request.headers.get("user-agent"))
- ? handleBotRequest(
- request,
- responseStatusCode,
- responseHeaders,
- remixContext,
- )
- : handleBrowserRequest(
- request,
- responseStatusCode,
- responseHeaders,
- remixContext,
- );
-}
-
-function handleBotRequest(
- request: Request,
- responseStatusCode: number,
- responseHeaders: Headers,
- remixContext: EntryContext,
-) {
- return new Promise((resolve, reject) => {
- let shellRendered = false;
- const { pipe, abort } = renderToPipeableStream(
- ,
- {
- onAllReady() {
- shellRendered = true;
- const body = new PassThrough();
- const stream = createReadableStreamFromReadable(body);
-
- responseHeaders.set("Content-Type", "text/html");
-
- resolve(
- new Response(stream, {
- headers: responseHeaders,
- status: responseStatusCode,
- }),
- );
-
- pipe(body);
- },
- onShellError(error: unknown) {
- reject(error);
- },
- onError(error: unknown) {
- responseStatusCode = 500;
- // Log streaming rendering errors from inside the shell. Don't log
- // errors encountered during initial shell rendering since they'll
- // reject and get logged in handleDocumentRequest.
- if (shellRendered) {
- console.error(error);
- }
- },
- },
- );
-
- setTimeout(abort, ABORT_DELAY);
- });
-}
-
-function handleBrowserRequest(
- request: Request,
- responseStatusCode: number,
- responseHeaders: Headers,
- remixContext: EntryContext,
-) {
- return new Promise((resolve, reject) => {
- let shellRendered = false;
- const { pipe, abort } = renderToPipeableStream(
- ,
- {
- onShellReady() {
- shellRendered = true;
- const body = new PassThrough();
- const stream = createReadableStreamFromReadable(body);
-
- responseHeaders.set("Content-Type", "text/html");
-
- resolve(
- new Response(stream, {
- headers: responseHeaders,
- status: responseStatusCode,
- }),
- );
-
- pipe(body);
- },
- onShellError(error: unknown) {
- reject(error);
- },
- onError(error: unknown) {
- responseStatusCode = 500;
- // Log streaming rendering errors from inside the shell. Don't log
- // errors encountered during initial shell rendering since they'll
- // reject and get logged in handleDocumentRequest.
- if (shellRendered) {
- console.error(error);
- }
- },
- },
- );
-
- setTimeout(abort, ABORT_DELAY);
- });
-}
diff --git a/refine-remix/template/app/root.tsx b/refine-remix/template/app/root.tsx
deleted file mode 100644
index 9540614aa..000000000
--- a/refine-remix/template/app/root.tsx
+++ /dev/null
@@ -1,134 +0,0 @@
-import type { MetaFunction } from "@remix-run/node";
-import {
- Links,
- LiveReload,
- Meta,
- Outlet,
- Scripts,
- ScrollRestoration,
- useLoaderData,
-} from "@remix-run/react";
-
-import { Refine, GitHubBanner, <%- (_app.refineImports || []).join("\n,") _%> } from '@refinedev/core';
-import { DevtoolsPanel, DevtoolsProvider } from "@refinedev/devtools";
-<%_ if (answers["ui-framework"] === 'antd') { _%>
- import { <%- (_app.refineAntdImports || []).join("\n,") _%> } from '@refinedev/antd';
-<%_ } _%>
-<%_ if (answers["ui-framework"] === 'mui') { _%>
- import { <%- (_app.refineMuiImports || []).join("\n,") _%> } from '@refinedev/mui';
-<%_ } _%>
-import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar";
-import routerProvider, { UnsavedChangesNotifier } from "@refinedev/remix-router";
-
-<%- (_app.import || []).join("\n") _%>
-
-<%- (_app.localImport || []).join("\n") _%>
-
-<%- (_app.relativeImport || []).join("\n") _%>
-
-<%- (_app.afterImport || []).join("\n") _%>
-
-<%
- var top = _app.wrapper.map(wrapper => wrapper[0] || "");
- var bottom = _app.wrapper.map(wrapper => wrapper[1] || "").reverse();
-%>
-
-export const meta: MetaFunction = () => ([
- {
- title: "New Remix + Refine App",
- }
-]);
-
-export default function App() {
-
- <%- (_app.innerHooks || []).join("\n") %>
- <%- (_app.inner || []).join("\n") %>
-
- return (
-
-
-
-
-
-
-
-
-
-
- <%- top.join("\n") %>
-
-
- <%_ if (_app.hasRoutes === true) { _%>
- resources={[
- <%_ if (answers["data-provider"] === 'data-provider-strapi-v4') { _%>
- {
- name: "blog-posts",
- list: "/blog-posts",
- create: "/blog-posts/create",
- edit: "/blog-posts/edit/:id",
- show: "/blog-posts/show/:id",
- meta: {
- canDelete: true,
- },
- },
- <%_ } else { _%>
- {
- name: "blog_posts",
- list: "/blog-posts",
- create: "/blog-posts/create",
- edit: "/blog-posts/edit/:id",
- show: "/blog-posts/show/:id",
- meta: {
- canDelete: true,
- },
- },
- <%_ } _%>
- {
- name: "categories",
- list: "/categories",
- create: "/categories/create",
- edit: "/categories/edit/:id",
- show: "/categories/show/:id",
- meta: {
- canDelete: true,
- },
- }
- ]}
- <%_ } _%>
- options={{
- syncWithLocation: true,
- warnWhenUnsavedChanges: true,
- useNewQueryKeys: true,
- <%_ if (typeof projectId !== 'undefined' && projectId !== '') { _%>
- projectId: "<%= projectId %>",
- <%_ } _%>
- <%- (_app.refineOptions ||Â []).join("\n") %>
- }}
- >
- <>
-
-
-
- >
-
-
-
- <%- bottom.join("\n") %>
-
-
-
-
-
-
- );
-}
-
-export function links() {
- return [
- <%- (_app.styleImport || []).join("\n,") _%>
- ];
-};
-
-<%- (_app.loader || []).join("\n,") _%>
diff --git a/refine-remix/template/app/routes/_index.tsx b/refine-remix/template/app/routes/_index.tsx
deleted file mode 100644
index 275dc5920..000000000
--- a/refine-remix/template/app/routes/_index.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { WelcomePage } from "@refinedev/core";
-
-export default function Index() {
- return ;
-}
diff --git a/refine-remix/template/gitignore b/refine-remix/template/gitignore
deleted file mode 100644
index 3f7bf98da..000000000
--- a/refine-remix/template/gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-node_modules
-
-/.cache
-/build
-/public/build
-.env
diff --git a/refine-remix/template/public/favicon.ico b/refine-remix/template/public/favicon.ico
deleted file mode 100644
index a3df394d6..000000000
Binary files a/refine-remix/template/public/favicon.ico and /dev/null differ
diff --git a/refine-remix/template/remix.config.js b/refine-remix/template/remix.config.js
deleted file mode 100644
index 6e1142162..000000000
--- a/refine-remix/template/remix.config.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('@remix-run/dev').AppConfig} */
-module.exports = {
- ignoredRouteFiles: ["**/.*"],
- serverModuleFormat: "cjs",
- // appDirectory: "app",
- // assetsBuildDirectory: "public/build",
- // serverBuildPath: "build/index.js",
- // publicPath: "/build/",
-};
diff --git a/refine-remix/template/remix.env.d.ts b/refine-remix/template/remix.env.d.ts
deleted file mode 100644
index 72e2affe3..000000000
--- a/refine-remix/template/remix.env.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-///
-///