From 81a32c8f77b3103c482e54ee02aa542cb12d6170 Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Wed, 2 Jul 2025 19:05:52 +0200 Subject: [PATCH 1/5] docs: Add preview component --- .vscode/settings.json | 2 +- apps/docs/content/docs/ui/dropdown-menu.mdx | 4 + apps/docs/package.json | 15 +- apps/docs/src/app/docs/[[...slug]]/page.tsx | 3 +- apps/docs/src/app/docs/layout.tsx | 3 +- apps/docs/src/app/global.css | 4 +- apps/docs/src/components/fumadocs/preview.tsx | 14 ++ apps/docs/src/examples/dropdown-menu.tsx | 24 ++++ apps/web/postcss.config.mjs | 4 +- apps/web/src/app/global.css | 2 +- pnpm-lock.yaml | 136 ++++++++++-------- 11 files changed, 139 insertions(+), 72 deletions(-) create mode 100644 apps/docs/src/components/fumadocs/preview.tsx create mode 100644 apps/docs/src/examples/dropdown-menu.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index bd4be0338..3fac19c54 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "cSpell.words": ["sonner", "vitnode"], + "cSpell.words": ["fumadocs", "sonner", "vitnode"], "github.copilot.chat.commitMessageGeneration.instructions": [ { "text": "Follow the Conventional Commits format strictly for commit messages. Use the structure below:\n\n```\n[optional scope]: \n```\n\nGuidelines:\n\n1. **Type and Scope**: Choose an appropriate type (e.g., `feat`, `fix`, `refactor`, `docs`) and optional scope to describe the affected module or feature.\n\n2. **Gitmoji**: Include a relevant `gitmoji` that best represents the nature of the change.\n\n3. **Description**: Write a concise, informative description in the header; use backticks if referencing code or specific terms.\n\nCommit messages should be clear, informative, and professional, aiding readability and project tracking." diff --git a/apps/docs/content/docs/ui/dropdown-menu.mdx b/apps/docs/content/docs/ui/dropdown-menu.mdx index 807fbe96d..92d80f42f 100644 --- a/apps/docs/content/docs/ui/dropdown-menu.mdx +++ b/apps/docs/content/docs/ui/dropdown-menu.mdx @@ -3,6 +3,10 @@ title: Dropdown Menu description: A dropdown menu component for building interactive menus in your application. --- +## Preview + + + ## Usage ```ts diff --git a/apps/docs/package.json b/apps/docs/package.json index cd6c56372..c6524c6a2 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -11,11 +11,11 @@ "dependencies": { "@vitnode/core": "workspace:*", "babel-plugin-react-compiler": "19.1.0-rc.2", - "fumadocs-core": "^15.5.5", - "fumadocs-mdx": "^11.6.9", - "fumadocs-ui": "^15.5.5", + "fumadocs-core": "^15.6.0", + "fumadocs-mdx": "^11.6.10", + "fumadocs-ui": "^15.6.0", "lucide-react": "^0.517.0", - "motion": "^12.19.1", + "motion": "^12.20.1", "next": "^15.3.4", "react": "^19.1.0", "react-dom": "^19.1.0", @@ -24,13 +24,14 @@ "devDependencies": { "@tailwindcss/postcss": "^4.1.11", "@types/mdx": "^2.0.13", - "@types/node": "^24", - "@types/react": "^19.1", - "@types/react-dom": "^19.1", + "@types/node": "^24.0.7", + "@types/react": "^19.1.8", + "@types/react-dom": "^19.1.6", "class-variance-authority": "^0.7.1", "postcss": "^8.5.6", "shiki": "^3.7.0", "tailwindcss": "^4.1.11", + "tw-animate-css": "^1.3.4", "typescript": "^5.8.3" } } diff --git a/apps/docs/src/app/docs/[[...slug]]/page.tsx b/apps/docs/src/app/docs/[[...slug]]/page.tsx index fa25f5f92..e61f02c12 100644 --- a/apps/docs/src/app/docs/[[...slug]]/page.tsx +++ b/apps/docs/src/app/docs/[[...slug]]/page.tsx @@ -3,6 +3,7 @@ import { DocsPage, DocsBody } from 'fumadocs-ui/page'; import { notFound, redirect } from 'next/navigation'; import defaultMdxComponents from 'fumadocs-ui/mdx'; import { ViewOptions } from './page.client'; +import { Preview } from '@/components/fumadocs/preview'; export default async function Page(props: { params: Promise<{ slug?: string[] }>; @@ -39,7 +40,7 @@ export default async function Page(props: { - + ); diff --git a/apps/docs/src/app/docs/layout.tsx b/apps/docs/src/app/docs/layout.tsx index ee6e87796..64f6d866b 100644 --- a/apps/docs/src/app/docs/layout.tsx +++ b/apps/docs/src/app/docs/layout.tsx @@ -6,7 +6,8 @@ import type { ReactNode } from 'react'; export default function Layout({ children }: { children: ReactNode }) { return ( { + const Component = React.lazy(() => import(`../../examples/${name}.tsx`)); + + return ( +
+ }> + + +
+ ); +}; diff --git a/apps/docs/src/examples/dropdown-menu.tsx b/apps/docs/src/examples/dropdown-menu.tsx new file mode 100644 index 000000000..4fafb526e --- /dev/null +++ b/apps/docs/src/examples/dropdown-menu.tsx @@ -0,0 +1,24 @@ +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@vitnode/core/components/ui/dropdown-menu'; + +export default function DropdownMenuExample() { + return ( + + Open + + My Account + + Profile + Billing + Team + Subscription + + + ); +} diff --git a/apps/web/postcss.config.mjs b/apps/web/postcss.config.mjs index 5d6d8457f..4c12660ec 100644 --- a/apps/web/postcss.config.mjs +++ b/apps/web/postcss.config.mjs @@ -1,8 +1,6 @@ /** @type {import('postcss-load-config').Config} */ -const config = { +export default { plugins: { '@tailwindcss/postcss': {}, }, }; - -export default config; diff --git a/apps/web/src/app/global.css b/apps/web/src/app/global.css index 137b81a96..c08746e60 100644 --- a/apps/web/src/app/global.css +++ b/apps/web/src/app/global.css @@ -43,7 +43,7 @@ } .dark { - --background: oklch(0.14 0 0); + --background: oklch(0.1 0 0); --foreground: oklch(0.98 0 0); --card: oklch(0.18 0 0); --card-foreground: oklch(0.98 0 0); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3d4b41f6..1499878cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,20 +39,20 @@ importers: specifier: 19.1.0-rc.2 version: 19.1.0-rc.2 fumadocs-core: - specifier: ^15.5.5 - version: 15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + specifier: ^15.6.0 + version: 15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) fumadocs-mdx: - specifier: ^11.6.9 - version: 11.6.9(@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.3.5(@types/node@24.0.4)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0)) + specifier: ^11.6.10 + version: 11.6.10(@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0)) fumadocs-ui: - specifier: ^15.5.5 - version: 15.5.5(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tailwindcss@4.1.11) + specifier: ^15.6.0 + version: 15.6.0(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tailwindcss@4.1.11) lucide-react: specifier: ^0.517.0 version: 0.517.0(react@19.1.0) motion: - specifier: ^12.19.1 - version: 12.19.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + specifier: ^12.20.1 + version: 12.20.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next: specifier: ^15.3.4 version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -73,13 +73,13 @@ importers: specifier: ^2.0.13 version: 2.0.13 '@types/node': - specifier: ^24 - version: 24.0.4 + specifier: ^24.0.7 + version: 24.0.7 '@types/react': - specifier: ^19.1 + specifier: ^19.1.8 version: 19.1.8 '@types/react-dom': - specifier: ^19.1 + specifier: ^19.1.6 version: 19.1.6(@types/react@19.1.8) class-variance-authority: specifier: ^0.7.1 @@ -93,6 +93,9 @@ importers: tailwindcss: specifier: ^4.1.11 version: 4.1.11 + tw-animate-css: + specifier: ^1.3.4 + version: 1.3.4 typescript: specifier: ^5.8.3 version: 5.8.3 @@ -1410,6 +1413,9 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/sourcemap-codec@1.5.2': + resolution: {integrity: sha512-gKYheCylLIedI+CSZoDtGkFV9YEBxRRVcfCH7OfAqh4TyUyRjEE6WVE/aXDXX0p8BIe/QgLcaAoI0220KRRFgg==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -2871,12 +2877,15 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@20.19.1': - resolution: {integrity: sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==} + '@types/node@20.19.2': + resolution: {integrity: sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==} '@types/node@24.0.4': resolution: {integrity: sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA==} + '@types/node@24.0.7': + resolution: {integrity: sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw==} + '@types/nodemailer@6.4.17': resolution: {integrity: sha512-I9CCaIp6DTldEg7vyUTZi8+9Vo0hi1/T8gv3C89yk1rSAAzoKQ8H8ki/jBYJSFoH/BisgLP8tkZMlQ91CIquww==} @@ -4049,8 +4058,8 @@ packages: resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} engines: {node: '>= 14.17'} - framer-motion@12.19.1: - resolution: {integrity: sha512-nq9hwWAEKf4gzprbOZzKugLV5OVKF7zrNDY6UOVu+4D3ZgIkg8L9Jy6AMrpBM06fhbKJ6LEG6UY5+t7Eq6wNlg==} + framer-motion@12.20.1: + resolution: {integrity: sha512-NW2t2GHQcNvLHq18JyNVY15VKrwru+nkNyhLdqf4MbxbGhxZcSDi68iNcAy6O1nG0yYAQJbLioBIH1Kmg8Xr1g==} peerDependencies: '@emotion/is-prop-valid': '*' react: ^18.0.0 || ^19.0.0 @@ -4073,8 +4082,8 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - fumadocs-core@15.5.5: - resolution: {integrity: sha512-o+XSqf9i/DfDQXIxnIbAna06Sk0PpRiWXQOtLewIOopdDEnk76slu3tGEuJRNrO10eOKvd9YxdUephxQ+flhqQ==} + fumadocs-core@15.6.0: + resolution: {integrity: sha512-qeGsainTxFwYiqHjyGqhIJBUvQina7ods0TN5YfQqXmLMm0LhQ+Im8vEpYlIhpBYxy6rwVpv06Tc+UZuDRU0UQ==} peerDependencies: '@oramacloud/client': 1.x.x || 2.x.x '@types/react': '*' @@ -4096,8 +4105,8 @@ packages: react-dom: optional: true - fumadocs-mdx@11.6.9: - resolution: {integrity: sha512-Gm29CFOpvBe8m8r4Es0U6xsVvGaKEMiACsJeUYr6QdZiTYKXkl9a+gI6kkOfPJ/Aoyb561mh3Q0JSONX37GT5w==} + fumadocs-mdx@11.6.10: + resolution: {integrity: sha512-W13mGPKDviKHq1FdxJqbBmA8vQ0niEISUUREJU8u3q1g5lQgnZ9whZjTnvijnqiGNbBsjb8CmjU20OlmwG6nhA==} hasBin: true peerDependencies: '@fumadocs/mdx-remote': ^1.2.0 @@ -4112,8 +4121,8 @@ packages: vite: optional: true - fumadocs-ui@15.5.5: - resolution: {integrity: sha512-fUr62k1jce+VPm7OdVGBVwZEGGLjXGsf+VNy1JKvPLlXzfBtMgHYuiKhE4aY81sP/IYEOJO+oIWfEe0HI0afcg==} + fumadocs-ui@15.6.0: + resolution: {integrity: sha512-Pf7lo2TfawCEhJH6k0poVBduLt3a3XDtfQ3JVNn0HCG9s9/gbpdsrGaYLYMdUaUSidiTqYD0WKePpWDa1m6UQA==} peerDependencies: '@types/react': '*' next: 14.x.x || 15.x.x @@ -5059,14 +5068,14 @@ packages: mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} - motion-dom@12.19.0: - resolution: {integrity: sha512-m96uqq8VbwxFLU0mtmlsIVe8NGGSdpBvBSHbnnOJQxniPaabvVdGgxSamhuDwBsRhwX7xPxdICgVJlOpzn/5bw==} + motion-dom@12.20.1: + resolution: {integrity: sha512-XyveLJ9dmQTmaEsP9RlcuoNFxWlRIGdasdPJBB4aOwPr8bRcJdhltudAbiEjRQBmsGD30sjJdaEjhkHsAHapLQ==} motion-utils@12.19.0: resolution: {integrity: sha512-BuFTHINYmV07pdWs6lj6aI63vr2N4dg0vR+td0rtrdpWOhBzIkEklZyLcvKBoEtwSqx8Jg06vUB5RS0xDiUybw==} - motion@12.19.1: - resolution: {integrity: sha512-OhoHWrht+zwDPccr2wGltJdwgz2elFBBt/sLei2g0hwICvy2hOBFUkA4Ylup3VnDgz+vUtecf694EV7bJK4XjA==} + motion@12.20.1: + resolution: {integrity: sha512-UPUsh8jVxmcTPWqcdU5ZcNhO8EU4sfG+UcvKAUXFIwUE1oZJFxtyDui9tD7zlVau1eIBXqZ4Qe0hK2r8pOjDcQ==} peerDependencies: '@emotion/is-prop-valid': '*' react: ^18.0.0 || ^19.0.0 @@ -5179,6 +5188,10 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + npm-to-yarn@3.0.1: + resolution: {integrity: sha512-tt6PvKu4WyzPwWUzy/hvPFqn+uwXO0K1ZHka8az3NnrhWJDmSqI8ncWq0fkL0k/lmmi5tAC11FXwXuh0rFbt1A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + nwsapi@2.2.20: resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} @@ -5314,8 +5327,8 @@ packages: pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - pg-cloudflare@1.2.6: - resolution: {integrity: sha512-uxmJAnmIgmYgnSFzgOf2cqGQBzwnRYcrEgXuFjJNEkpedEIPBSEzxY7ph4uA9k1mI+l/GR0HjPNS6FKNZe8SBQ==} + pg-cloudflare@1.2.7: + resolution: {integrity: sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==} pg-connection-string@2.9.1: resolution: {integrity: sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==} @@ -5333,8 +5346,8 @@ packages: peerDependencies: pg: '>=8.0' - pg-protocol@1.10.2: - resolution: {integrity: sha512-Ci7jy8PbaWxfsck2dwZdERcDG2A0MG8JoQILs+uZNjABFuBuItAZCWUNz8sXRDMoui24rJw7WlXqgpMdBSN/vQ==} + pg-protocol@1.10.3: + resolution: {integrity: sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==} pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} @@ -7294,10 +7307,10 @@ snapshots: dependencies: tslib: 2.8.1 - '@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)': + '@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)': dependencies: '@mdx-js/mdx': 3.1.0(acorn@8.15.0) - fumadocs-core: 15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + fumadocs-core: 15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) gray-matter: 4.0.3 react: 19.1.0 zod: 3.25.67 @@ -7570,6 +7583,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/sourcemap-codec@1.5.2': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -8990,7 +9005,7 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@20.19.1': + '@types/node@20.19.2': dependencies: undici-types: 6.21.0 @@ -8998,21 +9013,25 @@ snapshots: dependencies: undici-types: 7.8.0 + '@types/node@24.0.7': + dependencies: + undici-types: 7.8.0 + '@types/nodemailer@6.4.17': dependencies: '@types/node': 24.0.4 '@types/pg@8.11.10': dependencies: - '@types/node': 24.0.4 - pg-protocol: 1.10.2 + '@types/node': 24.0.7 + pg-protocol: 1.10.3 pg-types: 4.0.2 optional: true '@types/pg@8.11.6': dependencies: - '@types/node': 24.0.4 - pg-protocol: 1.10.2 + '@types/node': 24.0.7 + pg-protocol: 1.10.3 pg-types: 4.0.2 optional: true @@ -10382,9 +10401,9 @@ snapshots: form-data-encoder@2.1.4: {} - framer-motion@12.19.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + framer-motion@12.20.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: - motion-dom: 12.19.0 + motion-dom: 12.20.1 motion-utils: 12.19.0 tslib: 2.8.1 optionalDependencies: @@ -10397,7 +10416,7 @@ snapshots: fsevents@2.3.3: optional: true - fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@formatjs/intl-localematcher': 0.6.1 '@orama/orama': 3.1.9 @@ -10408,6 +10427,7 @@ snapshots: hast-util-to-jsx-runtime: 2.3.6 image-size: 2.0.2 negotiator: 1.0.0 + npm-to-yarn: 3.0.1 react-remove-scroll: 2.7.1(@types/react@19.1.8)(react@19.1.0) remark: 15.0.1 remark-gfm: 4.0.1 @@ -10423,14 +10443,14 @@ snapshots: transitivePeerDependencies: - supports-color - fumadocs-mdx@11.6.9(@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.3.5(@types/node@24.0.4)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0)): + fumadocs-mdx@11.6.10(@fumadocs/mdx-remote@1.3.0(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0))(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0)): dependencies: '@mdx-js/mdx': 3.1.0(acorn@8.15.0) '@standard-schema/spec': 1.0.0 chokidar: 4.0.3 esbuild: 0.25.5 estree-util-value-to-estree: 3.4.0 - fumadocs-core: 15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + fumadocs-core: 15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) js-yaml: 4.1.0 lru-cache: 11.1.0 picocolors: 1.1.1 @@ -10439,14 +10459,14 @@ snapshots: unist-util-visit: 5.0.0 zod: 3.25.67 optionalDependencies: - '@fumadocs/mdx-remote': 1.3.0(acorn@8.15.0)(fumadocs-core@15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) + '@fumadocs/mdx-remote': 1.3.0(acorn@8.15.0)(fumadocs-core@15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0) next: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - vite: 6.3.5(@types/node@24.0.4)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0) + vite: 6.3.5(@types/node@24.0.7)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0) transitivePeerDependencies: - acorn - supports-color - fumadocs-ui@15.5.5(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tailwindcss@4.1.11): + fumadocs-ui@15.6.0(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tailwindcss@4.1.11): dependencies: '@radix-ui/react-accordion': 1.2.11(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@radix-ui/react-collapsible': 1.1.11(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -10459,7 +10479,7 @@ snapshots: '@radix-ui/react-slot': 1.2.3(@types/react@19.1.8)(react@19.1.0) '@radix-ui/react-tabs': 1.1.12(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) class-variance-authority: 0.7.1 - fumadocs-core: 15.5.5(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + fumadocs-core: 15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) lodash.merge: 4.6.2 next-themes: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0) postcss-selector-parser: 7.1.0 @@ -11707,15 +11727,15 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.1 - motion-dom@12.19.0: + motion-dom@12.20.1: dependencies: motion-utils: 12.19.0 motion-utils@12.19.0: {} - motion@12.19.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): + motion@12.20.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: - framer-motion: 12.19.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + framer-motion: 12.20.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) tslib: 2.8.1 optionalDependencies: react: 19.1.0 @@ -11737,7 +11757,7 @@ snapshots: nano-css@5.6.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.2 css-tree: 1.1.3 csstype: 3.1.3 fastest-stable-stringify: 2.0.2 @@ -11848,6 +11868,8 @@ snapshots: dependencies: path-key: 3.1.1 + npm-to-yarn@3.0.1: {} + nwsapi@2.2.20: {} object-assign@4.1.1: {} @@ -12001,7 +12023,7 @@ snapshots: pend@1.2.0: {} - pg-cloudflare@1.2.6: + pg-cloudflare@1.2.7: optional: true pg-connection-string@2.9.1: @@ -12018,7 +12040,7 @@ snapshots: pg: 8.13.1 optional: true - pg-protocol@1.10.2: + pg-protocol@1.10.3: optional: true pg-types@2.2.0: @@ -12045,11 +12067,11 @@ snapshots: dependencies: pg-connection-string: 2.9.1 pg-pool: 3.10.1(pg@8.13.1) - pg-protocol: 1.10.2 + pg-protocol: 1.10.3 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: - pg-cloudflare: 1.2.6 + pg-cloudflare: 1.2.7 optional: true pgpass@1.0.5: @@ -12377,7 +12399,7 @@ snapshots: '@pivanov/utils': 0.0.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0) '@preact/signals': 1.3.2(preact@10.26.9) '@rollup/pluginutils': 5.2.0(rollup@4.44.1) - '@types/node': 20.19.1 + '@types/node': 20.19.2 bippy: 0.3.17(@types/react@19.1.8)(react@19.1.0) esbuild: 0.25.5 estree-walker: 3.0.3 @@ -13480,7 +13502,7 @@ snapshots: - supports-color - typescript - vite@6.3.5(@types/node@24.0.4)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0): + vite@6.3.5(@types/node@24.0.7)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.8.0): dependencies: esbuild: 0.25.5 fdir: 6.4.6(picomatch@4.0.2) @@ -13489,7 +13511,7 @@ snapshots: rollup: 4.44.1 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 24.0.4 + '@types/node': 24.0.7 fsevents: 2.3.3 jiti: 2.4.2 lightningcss: 1.30.1 From 0aafd9b29619f692105f9e73c4c4270b3a0205f2 Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Wed, 2 Jul 2025 20:04:51 +0200 Subject: [PATCH 2/5] docs: Move vitnode to docs --- apps/{web => docs}/.prettierrc.mjs | 0 apps/{web => docs}/components.json | 0 apps/{web => docs}/drizzle.config.ts | 0 apps/{web => docs}/e2e/auth.spec.ts | 0 apps/{web => docs}/e2e/homepage.spec.ts | 0 apps/{web => docs}/eslint.config.mjs | 0 apps/docs/global.d.ts | 9 + apps/docs/layout.tsx | 31 + apps/docs/next.config.mjs | 14 - apps/{web => docs}/next.config.ts | 11 +- apps/docs/package.json | 32 +- apps/{web => docs}/playwright.config.ts | 0 apps/docs/postcss.config.mjs | 5 +- apps/docs/source.config.ts | 2 +- apps/docs/src/app/(home)/layout.tsx | 2 + apps/docs/src/app/(home)/page.tsx | 14 +- .../src/app/(home)/sections/admin/admin.tsx | 19 +- .../app/(home)/sections/call-to-action.tsx | 7 +- .../sections/powering-by/logos/drizzleorm.tsx | 22 +- .../sections/powering-by/logos/honojs.tsx | 12 +- .../sections/powering-by/logos/postgresql.tsx | 6 +- .../powering-by/logos/tailwindcss.tsx | 12 +- .../sections/powering-by/powering-by.tsx | 42 +- .../(docs)}/docs/[[...slug]]/page.client.tsx | 14 +- .../(docs)}/docs/[[...slug]]/page.tsx | 21 +- .../src/app/[locale]/(docs)/docs/layout.tsx | 48 + .../(plugins)/(vitnode-core)/login/page.tsx | 0 .../login/sso/[providerId]/page.tsx | 0 .../(vitnode-core)/register/page.tsx | 0 .../app/[locale]/(main)/[...rest]/page.tsx | 0 .../src/app/[locale]/(main)/layout.tsx | 0 .../src/app/[locale]/(main)/not-found.tsx | 0 .../src/app/[locale]/(main)/page.tsx | 0 .../(vitnode-blog)/blog/categories/page.tsx | 0 .../(vitnode-blog)/blog/posts/page.tsx | 0 .../(vitnode-core)/core/debug/page.tsx | 0 .../(plugins)/(vitnode-core)/core/page.tsx | 0 .../(vitnode-core)/core/test/page.tsx | 0 .../(vitnode-core)/core/users/page.tsx | 0 .../src/app/[locale]/admin/page.tsx | 0 .../{web => docs}/src/app/[locale]/layout.tsx | 0 .../src/app/api/[...route]/route.ts | 0 apps/docs/src/app/api/search/route.ts | 3 +- apps/docs/src/app/docs/layout.tsx | 43 - apps/{web => docs}/src/app/global-error.tsx | 0 apps/docs/src/app/layout.client.tsx | 1 + apps/docs/src/app/layout.config.tsx | 3 +- apps/docs/src/app/layout.tsx | 32 +- apps/docs/src/components/fumadocs/preview.tsx | 4 +- apps/docs/src/components/infinite-slider.tsx | 16 +- apps/docs/src/components/text-animate.tsx | 75 +- apps/docs/src/lib/source.ts | 3 +- .../src/locales/@vitnode/blog/en.json | 0 .../src/locales/@vitnode/core/en.json | 0 apps/{web => docs}/src/middleware.ts | 2 +- apps/{web => docs}/src/vitnode.api.config.ts | 0 apps/{web => docs}/src/vitnode.config.ts | 8 +- apps/docs/tsconfig.json | 26 +- apps/web/.gitignore | 43 - apps/web/migrations/0000_stormy_ronan.sql | 205 --- apps/web/migrations/0001_thick_thor.sql | 6 - apps/web/migrations/meta/0000_snapshot.json | 1399 ---------------- apps/web/migrations/meta/0001_snapshot.json | 1446 ----------------- apps/web/migrations/meta/_journal.json | 20 - apps/web/package.json | 56 - apps/web/postcss.config.mjs | 6 - .../src/app/[locale]/admin/(auth)/layout.tsx | 10 - apps/web/src/app/favicon.ico | Bin 4286 -> 0 bytes apps/web/src/app/global.css | 129 -- apps/web/src/app/layout.tsx | 9 - apps/web/src/app/not-found.tsx | 13 - apps/web/src/locales/@vitnode/blog/pl.json | 70 - apps/web/src/locales/@vitnode/core/pl.json | 155 -- apps/web/tsconfig.json | 21 - packages/create-vitnode-app/src/questions.ts | 2 +- pnpm-lock.yaml | 55 +- 76 files changed, 343 insertions(+), 3841 deletions(-) rename apps/{web => docs}/.prettierrc.mjs (100%) rename apps/{web => docs}/components.json (100%) rename apps/{web => docs}/drizzle.config.ts (100%) rename apps/{web => docs}/e2e/auth.spec.ts (100%) rename apps/{web => docs}/e2e/homepage.spec.ts (100%) rename apps/{web => docs}/eslint.config.mjs (100%) create mode 100644 apps/docs/global.d.ts create mode 100644 apps/docs/layout.tsx delete mode 100644 apps/docs/next.config.mjs rename apps/{web => docs}/next.config.ts (59%) rename apps/{web => docs}/playwright.config.ts (100%) rename apps/docs/src/app/{ => [locale]/(docs)}/docs/[[...slug]]/page.client.tsx (98%) rename apps/docs/src/app/{ => [locale]/(docs)}/docs/[[...slug]]/page.tsx (86%) create mode 100644 apps/docs/src/app/[locale]/(docs)/docs/layout.tsx rename apps/{web => docs}/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/sso/[providerId]/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/(plugins)/(vitnode-core)/register/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/[...rest]/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/layout.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/not-found.tsx (100%) rename apps/{web => docs}/src/app/[locale]/(main)/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/debug/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/test/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/users/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/admin/page.tsx (100%) rename apps/{web => docs}/src/app/[locale]/layout.tsx (100%) rename apps/{web => docs}/src/app/api/[...route]/route.ts (100%) delete mode 100644 apps/docs/src/app/docs/layout.tsx rename apps/{web => docs}/src/app/global-error.tsx (100%) rename apps/{web => docs}/src/locales/@vitnode/blog/en.json (100%) rename apps/{web => docs}/src/locales/@vitnode/core/en.json (100%) rename apps/{web => docs}/src/middleware.ts (96%) rename apps/{web => docs}/src/vitnode.api.config.ts (100%) rename apps/{web => docs}/src/vitnode.config.ts (85%) delete mode 100644 apps/web/.gitignore delete mode 100644 apps/web/migrations/0000_stormy_ronan.sql delete mode 100644 apps/web/migrations/0001_thick_thor.sql delete mode 100644 apps/web/migrations/meta/0000_snapshot.json delete mode 100644 apps/web/migrations/meta/0001_snapshot.json delete mode 100644 apps/web/migrations/meta/_journal.json delete mode 100644 apps/web/package.json delete mode 100644 apps/web/postcss.config.mjs delete mode 100644 apps/web/src/app/[locale]/admin/(auth)/layout.tsx delete mode 100644 apps/web/src/app/favicon.ico delete mode 100644 apps/web/src/app/global.css delete mode 100644 apps/web/src/app/layout.tsx delete mode 100644 apps/web/src/app/not-found.tsx delete mode 100644 apps/web/src/locales/@vitnode/blog/pl.json delete mode 100644 apps/web/src/locales/@vitnode/core/pl.json delete mode 100644 apps/web/tsconfig.json diff --git a/apps/web/.prettierrc.mjs b/apps/docs/.prettierrc.mjs similarity index 100% rename from apps/web/.prettierrc.mjs rename to apps/docs/.prettierrc.mjs diff --git a/apps/web/components.json b/apps/docs/components.json similarity index 100% rename from apps/web/components.json rename to apps/docs/components.json diff --git a/apps/web/drizzle.config.ts b/apps/docs/drizzle.config.ts similarity index 100% rename from apps/web/drizzle.config.ts rename to apps/docs/drizzle.config.ts diff --git a/apps/web/e2e/auth.spec.ts b/apps/docs/e2e/auth.spec.ts similarity index 100% rename from apps/web/e2e/auth.spec.ts rename to apps/docs/e2e/auth.spec.ts diff --git a/apps/web/e2e/homepage.spec.ts b/apps/docs/e2e/homepage.spec.ts similarity index 100% rename from apps/web/e2e/homepage.spec.ts rename to apps/docs/e2e/homepage.spec.ts diff --git a/apps/web/eslint.config.mjs b/apps/docs/eslint.config.mjs similarity index 100% rename from apps/web/eslint.config.mjs rename to apps/docs/eslint.config.mjs diff --git a/apps/docs/global.d.ts b/apps/docs/global.d.ts new file mode 100644 index 000000000..599b27bef --- /dev/null +++ b/apps/docs/global.d.ts @@ -0,0 +1,9 @@ +/// + +import type core from './src/locales/@vitnode/core/en.json'; + +declare module 'next-intl' { + interface AppConfig { + Messages: typeof core; + } +} diff --git a/apps/docs/layout.tsx b/apps/docs/layout.tsx new file mode 100644 index 000000000..cafd70161 --- /dev/null +++ b/apps/docs/layout.tsx @@ -0,0 +1,31 @@ +import './global.css'; +import type { ReactNode } from 'react'; + +import { RootProvider } from 'fumadocs-ui/provider'; +import { Geist, Geist_Mono } from 'next/font/google'; + +import { Body } from './src/app/layout.client'; + +const geistSans = Geist({ + variable: '--font-geist-sans', + subsets: ['latin'], +}); + +const geistMono = Geist_Mono({ + variable: '--font-geist-mono', + subsets: ['latin'], +}); + +export default function Layout({ children }: { children: ReactNode }) { + return ( + + + {children} + + + ); +} diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs deleted file mode 100644 index f4da21dfd..000000000 --- a/apps/docs/next.config.mjs +++ /dev/null @@ -1,14 +0,0 @@ -import { createMDX } from 'fumadocs-mdx/next'; - -const withMDX = createMDX(); - -/** @type {import('next').NextConfig} */ -const config = { - reactStrictMode: true, - experimental: { - inlineCss: true, - reactCompiler: true, - }, -}; - -export default withMDX(config); diff --git a/apps/web/next.config.ts b/apps/docs/next.config.ts similarity index 59% rename from apps/web/next.config.ts rename to apps/docs/next.config.ts index adef895c1..9a1375d38 100644 --- a/apps/web/next.config.ts +++ b/apps/docs/next.config.ts @@ -1,17 +1,14 @@ import type { NextConfig } from 'next'; +import { createMDX } from 'fumadocs-mdx/next'; import { vitNodeNextConfig } from '@vitnode/core/config/next.config'; +const withMDX = createMDX(); + const nextConfig: NextConfig = { - /* config options here */ - // logging: { - // fetches: { - // fullUrl: true, - // }, - // }, experimental: { inlineCss: true, reactCompiler: true, }, }; -export default vitNodeNextConfig(nextConfig); +export default withMDX(vitNodeNextConfig(nextConfig)); diff --git a/apps/docs/package.json b/apps/docs/package.json index c6524c6a2..6d3628a8b 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,34 +1,60 @@ { "name": "docs", "version": "1.2.0-canary.26", + "type": "module", "private": true, "scripts": { + "drizzle-kit": "drizzle-kit", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit up && drizzle-kit generate && drizzle-kit migrate", + "dev": "vitnode init && next dev --turbopack", + "dev:email": "email dev", "build": "next build --turbopack", - "dev": "next dev --port 3001 --turbopack", - "start": "next start --port 3001", + "start": "next start", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test:e2e": "playwright test", + "test:e2e:ui": "playwright test --ui", + "test:e2e:debug": "playwright test --debug", + "test:e2e:report": "playwright show-report", "postinstall": "fumadocs-mdx" }, "dependencies": { + "@hono/zod-openapi": "^0.19.8", + "@hono/zod-validator": "^0.7.0", + "@vitnode/blog": "workspace:*", "@vitnode/core": "workspace:*", "babel-plugin-react-compiler": "19.1.0-rc.2", + "drizzle-kit": "^0.31.3", + "drizzle-orm": "^0.44.2", "fumadocs-core": "^15.6.0", "fumadocs-mdx": "^11.6.10", "fumadocs-ui": "^15.6.0", + "hono": "^4.8.3", "lucide-react": "^0.517.0", "motion": "^12.20.1", "next": "^15.3.4", + "next-intl": "^4.3.1", "react": "^19.1.0", "react-dom": "^19.1.0", - "react-use": "^17.6.0" + "react-hook-form": "^7.58.1", + "react-use": "^17.6.0", + "sonner": "^2.0.5", + "zod": "^3.25.67" }, "devDependencies": { + "@playwright/test": "^1.53.1", "@tailwindcss/postcss": "^4.1.11", "@types/mdx": "^2.0.13", "@types/node": "^24.0.7", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", + "@vitnode/eslint-config": "workspace:*", "class-variance-authority": "^0.7.1", + "dotenv": "^16.6.0", + "eslint": "^9.29.0", "postcss": "^8.5.6", + "react-email": "^4.0.17", "shiki": "^3.7.0", "tailwindcss": "^4.1.11", "tw-animate-css": "^1.3.4", diff --git a/apps/web/playwright.config.ts b/apps/docs/playwright.config.ts similarity index 100% rename from apps/web/playwright.config.ts rename to apps/docs/playwright.config.ts diff --git a/apps/docs/postcss.config.mjs b/apps/docs/postcss.config.mjs index a34a3d560..5d6d8457f 100644 --- a/apps/docs/postcss.config.mjs +++ b/apps/docs/postcss.config.mjs @@ -1,5 +1,8 @@ -export default { +/** @type {import('postcss-load-config').Config} */ +const config = { plugins: { '@tailwindcss/postcss': {}, }, }; + +export default config; diff --git a/apps/docs/source.config.ts b/apps/docs/source.config.ts index 84281e2ad..47c48e97f 100644 --- a/apps/docs/source.config.ts +++ b/apps/docs/source.config.ts @@ -1,4 +1,4 @@ -import { defineDocs, defineConfig } from 'fumadocs-mdx/config'; +import { defineConfig, defineDocs } from 'fumadocs-mdx/config'; export const docs = defineDocs({ dir: 'content/docs', diff --git a/apps/docs/src/app/(home)/layout.tsx b/apps/docs/src/app/(home)/layout.tsx index 1dd4684d0..93555ad3f 100644 --- a/apps/docs/src/app/(home)/layout.tsx +++ b/apps/docs/src/app/(home)/layout.tsx @@ -1,5 +1,7 @@ import type { ReactNode } from 'react'; + import { HomeLayout } from 'fumadocs-ui/layouts/home'; + import { baseOptions } from '@/app/layout.config'; export default function Layout({ children }: { children: ReactNode }) { diff --git a/apps/docs/src/app/(home)/page.tsx b/apps/docs/src/app/(home)/page.tsx index 26f360de4..5b333e737 100644 --- a/apps/docs/src/app/(home)/page.tsx +++ b/apps/docs/src/app/(home)/page.tsx @@ -1,10 +1,12 @@ -import Link from 'fumadocs-core/link'; -import { Metadata } from 'next'; +import type { Metadata } from 'next'; + import { buttonVariants } from '@vitnode/core/components/ui/button'; import { cn } from '@vitnode/core/lib/utils'; +import Link from 'fumadocs-core/link'; + +import { AdminSection } from './sections/admin/admin'; import { CallToActionSection } from './sections/call-to-action'; import { PoweringBySection } from './sections/powering-by/powering-by'; -import { AdminSection } from './sections/admin/admin'; export const metadata: Metadata = { title: 'VitNode: Extendable Framework for Building Apps', @@ -19,19 +21,19 @@ export default function HomePage() {
🎉{` `} VitNode 2.0 in progress... {/* */} -

+

Extendable Framework for Building Apps

-

+

Simplifies development with a powerful Plugin System, Admin Control Panel and extensible architecture.

diff --git a/apps/docs/src/app/(home)/sections/admin/admin.tsx b/apps/docs/src/app/(home)/sections/admin/admin.tsx index 16f973dc3..34eb36d6b 100644 --- a/apps/docs/src/app/(home)/sections/admin/admin.tsx +++ b/apps/docs/src/app/(home)/sections/admin/admin.tsx @@ -1,5 +1,6 @@ -import { CpuIcon, LockIcon, SparklesIcon, ZapIcon } from 'lucide-react'; +import { CpuIcon, LockIcon, SparklesIcon } from 'lucide-react'; import Image from 'next/image'; + import debugPanelImg from './debug_panel.png'; export const AdminSection = () => { @@ -12,21 +13,21 @@ export const AdminSection = () => {
-
-
+
+
payments illustration dark payments illustration light
diff --git a/apps/docs/src/app/(home)/sections/call-to-action.tsx b/apps/docs/src/app/(home)/sections/call-to-action.tsx index f49bcaf7a..b983d8a49 100644 --- a/apps/docs/src/app/(home)/sections/call-to-action.tsx +++ b/apps/docs/src/app/(home)/sections/call-to-action.tsx @@ -1,15 +1,16 @@ import { Card } from '@vitnode/core/components/ui/card'; -import { CodeBlock } from '../../../components/fumadocs/code-block'; import { cn } from '@vitnode/core/lib/utils'; +import { CodeBlock } from '../../../components/fumadocs/code-block'; + export const CallToActionSection = () => { return (
-

+

Start Building

-

+

Everything you need for modern web apps, zero config.

diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx b/apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx index 13e87ee0d..08cb9f942 100644 --- a/apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx +++ b/apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx @@ -1,39 +1,39 @@ export const DrizzleORMLogo = () => { return ( { return ( <> - + diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx b/apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx index 810320621..b85d7f8c5 100644 --- a/apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx +++ b/apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx @@ -2,10 +2,10 @@ export const PostgreSQLLogo = () => { return ( <> { return ( - + diff --git a/apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx b/apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx index 416f551e7..74a404d7c 100644 --- a/apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx +++ b/apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx @@ -1,11 +1,13 @@ -import Link from 'next/link'; +import { Link } from '@vitnode/core/lib/navigation'; + import { InfiniteSlider } from '@/components/infinite-slider'; -import { NextJSLogo } from './logos/nextjs'; -import { HonoJSLogo } from './logos/honojs'; -import { TailwindCSSLogo } from './logos/tailwindcss'; + import { DrizzleORMLogo } from './logos/drizzleorm'; -import { PostgreSQLLogo } from './logos/postgresql'; +import { HonoJSLogo } from './logos/honojs'; import { NextIntlLogo } from './logos/next-intl'; +import { NextJSLogo } from './logos/nextjs'; +import { PostgreSQLLogo } from './logos/postgresql'; +import { TailwindCSSLogo } from './logos/tailwindcss'; export const PoweringBySection = () => { return ( @@ -16,60 +18,60 @@ export const PoweringBySection = () => {

Powering by the best tools

- + -
-
+
+
diff --git a/apps/docs/src/app/docs/[[...slug]]/page.client.tsx b/apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.client.tsx similarity index 98% rename from apps/docs/src/app/docs/[[...slug]]/page.client.tsx rename to apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.client.tsx index f845e3473..3a1ae54d4 100644 --- a/apps/docs/src/app/docs/[[...slug]]/page.client.tsx +++ b/apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.client.tsx @@ -2,23 +2,23 @@ // Source: https://github.com/fuma-nama/fumadocs/blob/dev/apps/docs/app/docs/%5B...slug%5D/page.client.tsx -import { ChevronDown } from 'fumadocs-ui/internal/icons'; -import { ExternalLinkIcon, MessageCircleIcon } from 'lucide-react'; import { cva } from 'class-variance-authority'; +import { buttonVariants } from 'fumadocs-ui/components/ui/button'; import { Popover, PopoverContent, PopoverTrigger, } from 'fumadocs-ui/components/ui/popover'; +import { ChevronDown } from 'fumadocs-ui/internal/icons'; import { cn } from 'fumadocs-ui/utils/cn'; -import { buttonVariants } from 'fumadocs-ui/components/ui/button'; +import { ExternalLinkIcon, MessageCircleIcon } from 'lucide-react'; import React from 'react'; const optionVariants = cva( 'text-sm p-2 rounded-lg inline-flex items-center gap-2 hover:text-fd-accent-foreground hover:bg-fd-accent [&_svg]:size-4', ); -export function ViewOptions(props: { markdownUrl: string; githubUrl: string }) { +export function ViewOptions(props: { githubUrl: string; markdownUrl: string }) { const markdownUrl = new URL(props.markdownUrl, 'https://vitnode.com/'); const q = `Read ${markdownUrl}, I want to ask questions about it.`; @@ -64,9 +64,9 @@ export function ViewOptions(props: { markdownUrl: string; githubUrl: string }) { href: gpt, icon: ( OpenAI @@ -96,11 +96,11 @@ export function ViewOptions(props: { markdownUrl: string; githubUrl: string }) { }, ].map(item => ( {item.icon} {item.title} diff --git a/apps/docs/src/app/docs/[[...slug]]/page.tsx b/apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.tsx similarity index 86% rename from apps/docs/src/app/docs/[[...slug]]/page.tsx rename to apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.tsx index e61f02c12..942d29040 100644 --- a/apps/docs/src/app/docs/[[...slug]]/page.tsx +++ b/apps/docs/src/app/[locale]/(docs)/docs/[[...slug]]/page.tsx @@ -1,16 +1,19 @@ -import { source } from '@/lib/source'; -import { DocsPage, DocsBody } from 'fumadocs-ui/page'; -import { notFound, redirect } from 'next/navigation'; +import { redirect } from '@vitnode/core/lib/navigation'; import defaultMdxComponents from 'fumadocs-ui/mdx'; -import { ViewOptions } from './page.client'; +import { DocsBody, DocsPage } from 'fumadocs-ui/page'; +import { notFound } from 'next/navigation'; + import { Preview } from '@/components/fumadocs/preview'; +import { source } from '@/lib/source'; + +import { ViewOptions } from './page.client'; export default async function Page(props: { params: Promise<{ slug?: string[] }>; }) { const params = await props.params; if (!params.slug) { - redirect('/docs/dev'); + await redirect('/docs/dev'); } const page = source.getPage(params.slug); if (!page) notFound(); @@ -18,12 +21,12 @@ export default async function Page(props: { return (

@@ -31,10 +34,10 @@ export default async function Page(props: {

{page.data.description}

-
+
@@ -46,7 +49,7 @@ export default async function Page(props: { ); } -export async function generateStaticParams() { +export function generateStaticParams() { return source.generateParams(); } diff --git a/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx b/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx new file mode 100644 index 000000000..64a455228 --- /dev/null +++ b/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx @@ -0,0 +1,48 @@ +import type { ReactNode } from 'react'; + +import { DocsLayout } from 'fumadocs-ui/layouts/notebook'; +import { RootProvider } from 'fumadocs-ui/provider'; + +import { baseOptions } from '@/app/layout.config'; +import { source } from '@/lib/source'; + +export default function Layout({ children }: { children: ReactNode }) { + return ( + + + {node.icon} +
+ ), + }; + }, + }, + }} + tree={source.pageTree} + > + {children} +
+ + ); +} diff --git a/apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/page.tsx b/apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/page.tsx rename to apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/page.tsx diff --git a/apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/sso/[providerId]/page.tsx b/apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/sso/[providerId]/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/sso/[providerId]/page.tsx rename to apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/login/sso/[providerId]/page.tsx diff --git a/apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/register/page.tsx b/apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/register/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-core)/register/page.tsx rename to apps/docs/src/app/[locale]/(main)/(plugins)/(vitnode-core)/register/page.tsx diff --git a/apps/web/src/app/[locale]/(main)/[...rest]/page.tsx b/apps/docs/src/app/[locale]/(main)/[...rest]/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/[...rest]/page.tsx rename to apps/docs/src/app/[locale]/(main)/[...rest]/page.tsx diff --git a/apps/web/src/app/[locale]/(main)/layout.tsx b/apps/docs/src/app/[locale]/(main)/layout.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/layout.tsx rename to apps/docs/src/app/[locale]/(main)/layout.tsx diff --git a/apps/web/src/app/[locale]/(main)/not-found.tsx b/apps/docs/src/app/[locale]/(main)/not-found.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/not-found.tsx rename to apps/docs/src/app/[locale]/(main)/not-found.tsx diff --git a/apps/web/src/app/[locale]/(main)/page.tsx b/apps/docs/src/app/[locale]/(main)/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/(main)/page.tsx rename to apps/docs/src/app/[locale]/(main)/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/posts/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/debug/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/debug/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/debug/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/debug/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/test/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/test/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/test/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/test/page.tsx diff --git a/apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/users/page.tsx b/apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/users/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/users/page.tsx rename to apps/docs/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-core)/core/users/page.tsx diff --git a/apps/web/src/app/[locale]/admin/page.tsx b/apps/docs/src/app/[locale]/admin/page.tsx similarity index 100% rename from apps/web/src/app/[locale]/admin/page.tsx rename to apps/docs/src/app/[locale]/admin/page.tsx diff --git a/apps/web/src/app/[locale]/layout.tsx b/apps/docs/src/app/[locale]/layout.tsx similarity index 100% rename from apps/web/src/app/[locale]/layout.tsx rename to apps/docs/src/app/[locale]/layout.tsx diff --git a/apps/web/src/app/api/[...route]/route.ts b/apps/docs/src/app/api/[...route]/route.ts similarity index 100% rename from apps/web/src/app/api/[...route]/route.ts rename to apps/docs/src/app/api/[...route]/route.ts diff --git a/apps/docs/src/app/api/search/route.ts b/apps/docs/src/app/api/search/route.ts index df889626d..9e0c44333 100644 --- a/apps/docs/src/app/api/search/route.ts +++ b/apps/docs/src/app/api/search/route.ts @@ -1,4 +1,5 @@ -import { source } from '@/lib/source'; import { createFromSource } from 'fumadocs-core/search/server'; +import { source } from '@/lib/source'; + export const { GET } = createFromSource(source); diff --git a/apps/docs/src/app/docs/layout.tsx b/apps/docs/src/app/docs/layout.tsx deleted file mode 100644 index 64f6d866b..000000000 --- a/apps/docs/src/app/docs/layout.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { DocsLayout } from 'fumadocs-ui/layouts/notebook'; -import { baseOptions } from '@/app/layout.config'; -import { source } from '@/lib/source'; -import type { ReactNode } from 'react'; - -export default function Layout({ children }: { children: ReactNode }) { - return ( - - {node.icon} - - ), - }; - }, - }, - }} - > - {children} - - ); -} diff --git a/apps/web/src/app/global-error.tsx b/apps/docs/src/app/global-error.tsx similarity index 100% rename from apps/web/src/app/global-error.tsx rename to apps/docs/src/app/global-error.tsx diff --git a/apps/docs/src/app/layout.client.tsx b/apps/docs/src/app/layout.client.tsx index 2630539ed..474a007d7 100644 --- a/apps/docs/src/app/layout.client.tsx +++ b/apps/docs/src/app/layout.client.tsx @@ -5,6 +5,7 @@ import { useParams } from 'next/navigation'; export function useMode(): string | undefined { const { slug } = useParams(); + return Array.isArray(slug) && slug.length > 0 ? slug[0] : undefined; } diff --git a/apps/docs/src/app/layout.config.tsx b/apps/docs/src/app/layout.config.tsx index a261149f0..c88059144 100644 --- a/apps/docs/src/app/layout.config.tsx +++ b/apps/docs/src/app/layout.config.tsx @@ -1,6 +1,7 @@ -import { LogoVitNode } from '@/components/logo-vitnode'; import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared'; +import { LogoVitNode } from '@/components/logo-vitnode'; + /** * Shared layout configurations * diff --git a/apps/docs/src/app/layout.tsx b/apps/docs/src/app/layout.tsx index 6c9c540e4..8ed5dbaf5 100644 --- a/apps/docs/src/app/layout.tsx +++ b/apps/docs/src/app/layout.tsx @@ -1,29 +1,9 @@ import './global.css'; -import { RootProvider } from 'fumadocs-ui/provider'; -import { Geist, Geist_Mono } from 'next/font/google'; -import type { ReactNode } from 'react'; -import { Body } from './layout.client'; -const geistSans = Geist({ - variable: '--font-geist-sans', - subsets: ['latin'], -}); - -const geistMono = Geist_Mono({ - variable: '--font-geist-mono', - subsets: ['latin'], -}); - -export default function Layout({ children }: { children: ReactNode }) { - return ( - - - {children} - - - ); +export default async function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return children; } diff --git a/apps/docs/src/components/fumadocs/preview.tsx b/apps/docs/src/components/fumadocs/preview.tsx index 8dcbbd940..b865441a3 100644 --- a/apps/docs/src/components/fumadocs/preview.tsx +++ b/apps/docs/src/components/fumadocs/preview.tsx @@ -2,7 +2,9 @@ import { Loader } from '@vitnode/core/components/ui/loader'; import React from 'react'; export const Preview = ({ name }: { name: string }) => { - const Component = React.lazy(() => import(`../../examples/${name}.tsx`)); + const Component = React.lazy( + async () => import(`../../examples/${name}.tsx`), + ); return (
diff --git a/apps/docs/src/components/infinite-slider.tsx b/apps/docs/src/components/infinite-slider.tsx index 405b29d5b..1bc66e8be 100644 --- a/apps/docs/src/components/infinite-slider.tsx +++ b/apps/docs/src/components/infinite-slider.tsx @@ -1,19 +1,19 @@ 'use client'; import { cn } from '@vitnode/core/lib/utils'; -import { useMotionValue, animate, motion } from 'motion/react'; -import { useState, useEffect } from 'react'; +import { animate, motion, useMotionValue } from 'motion/react'; +import { useEffect, useState } from 'react'; import { useMeasure } from 'react-use'; -export type InfiniteSliderProps = { +export interface InfiniteSliderProps { children: React.ReactNode; + className?: string; + direction?: 'horizontal' | 'vertical'; gap?: number; + reverse?: boolean; speed?: number; speedOnHover?: number; - direction?: 'horizontal' | 'vertical'; - reverse?: boolean; - className?: string; -}; +} export function InfiniteSlider({ children, @@ -95,6 +95,7 @@ export function InfiniteSlider({
{children} diff --git a/apps/docs/src/components/text-animate.tsx b/apps/docs/src/components/text-animate.tsx index d503ebade..af06431f2 100644 --- a/apps/docs/src/components/text-animate.tsx +++ b/apps/docs/src/components/text-animate.tsx @@ -1,23 +1,38 @@ 'use client'; +import type { MotionProps, Variants } from 'motion/react'; +import type { ElementType } from 'react'; + import { cn } from '@vitnode/core/lib/utils'; -import { AnimatePresence, motion, MotionProps, Variants } from 'motion/react'; -import { ElementType, memo } from 'react'; +import { AnimatePresence, motion } from 'motion/react'; +import { memo } from 'react'; -type AnimationType = 'text' | 'word' | 'character' | 'line'; +type AnimationType = 'character' | 'line' | 'text' | 'word'; type AnimationVariant = - | 'fadeIn' | 'blurIn' - | 'blurInUp' | 'blurInDown' - | 'slideUp' + | 'blurInUp' + | 'fadeIn' + | 'scaleDown' + | 'scaleUp' | 'slideDown' | 'slideLeft' | 'slideRight' - | 'scaleUp' - | 'scaleDown'; + | 'slideUp'; interface TextAnimateProps extends MotionProps { + /** + * The animation preset to use + */ + animation?: AnimationVariant; + /** + * The element type to render + */ + as?: ElementType; + /** + * How to split the text ("text", "word", "character") + */ + by?: AnimationType; /** * The text content to animate */ @@ -26,10 +41,6 @@ interface TextAnimateProps extends MotionProps { * The class name to be applied to the component */ className?: string; - /** - * The class name to be applied to each segment - */ - segmentClassName?: string; /** * The delay before the animation starts */ @@ -39,29 +50,21 @@ interface TextAnimateProps extends MotionProps { */ duration?: number; /** - * Custom motion variants for the animation - */ - variants?: Variants; - /** - * The element type to render + * Whether to animate only once */ - as?: ElementType; + once?: boolean; /** - * How to split the text ("text", "word", "character") + * The class name to be applied to each segment */ - by?: AnimationType; + segmentClassName?: string; /** * Whether to start animation when component enters viewport */ startOnView?: boolean; /** - * Whether to animate only once - */ - once?: boolean; - /** - * The animation preset to use + * Custom motion variants for the animation */ - animation?: AnimationVariant; + variants?: Variants; } const staggerTimings: Record = { @@ -315,15 +318,15 @@ const TextAnimateBase = ({ let segments: string[] = []; switch (by) { - case 'word': - segments = children.split(/(\s+)/); - break; case 'character': segments = children.split(''); break; case 'line': segments = children.split('\n'); break; + case 'word': + segments = children.split(/(\s+)/); + break; case 'text': default: segments = [children]; @@ -378,25 +381,25 @@ const TextAnimateBase = ({ return ( {segments.map((segment, i) => ( {segment} diff --git a/apps/docs/src/lib/source.ts b/apps/docs/src/lib/source.ts index aa2cb837a..06b5e62dd 100644 --- a/apps/docs/src/lib/source.ts +++ b/apps/docs/src/lib/source.ts @@ -1,8 +1,9 @@ -import { docs } from '@/.source'; import { loader } from 'fumadocs-core/source'; import { icons } from 'lucide-react'; import { createElement } from 'react'; +import { docs } from '@/.source'; + export const source = loader({ baseUrl: '/docs', icon(icon) { diff --git a/apps/web/src/locales/@vitnode/blog/en.json b/apps/docs/src/locales/@vitnode/blog/en.json similarity index 100% rename from apps/web/src/locales/@vitnode/blog/en.json rename to apps/docs/src/locales/@vitnode/blog/en.json diff --git a/apps/web/src/locales/@vitnode/core/en.json b/apps/docs/src/locales/@vitnode/core/en.json similarity index 100% rename from apps/web/src/locales/@vitnode/core/en.json rename to apps/docs/src/locales/@vitnode/core/en.json diff --git a/apps/web/src/middleware.ts b/apps/docs/src/middleware.ts similarity index 96% rename from apps/web/src/middleware.ts rename to apps/docs/src/middleware.ts index d3692d532..99e9d7051 100644 --- a/apps/web/src/middleware.ts +++ b/apps/docs/src/middleware.ts @@ -15,7 +15,7 @@ export const config = { // Set a cookie to remember the previous locale for // all requests that have a locale prefix - '/(pl|en)/:path*', + '/(en)/:path*', // Enable redirects that add missing locales // (e.g. `/pathnames` -> `/en/pathnames`) diff --git a/apps/web/src/vitnode.api.config.ts b/apps/docs/src/vitnode.api.config.ts similarity index 100% rename from apps/web/src/vitnode.api.config.ts rename to apps/docs/src/vitnode.api.config.ts diff --git a/apps/web/src/vitnode.config.ts b/apps/docs/src/vitnode.config.ts similarity index 85% rename from apps/web/src/vitnode.config.ts rename to apps/docs/src/vitnode.config.ts index 2df1ce21d..fa8a728bc 100644 --- a/apps/web/src/vitnode.config.ts +++ b/apps/docs/src/vitnode.config.ts @@ -12,17 +12,13 @@ export const vitNodeConfig = buildConfig({ locales: [ { code: 'en', - name: 'English (USA)', - }, - { - code: 'pl', - name: 'Polski (PL)', + name: 'English', }, ], defaultLocale: 'en', }, theme: { - defaultTheme: 'dark', + defaultTheme: 'light', }, }); diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 8730cf889..2dd283779 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -1,29 +1,21 @@ { + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@vitnode/eslint-config/tsconfig", "compilerOptions": { - "baseUrl": ".", "target": "ESNext", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "paths": { - "@/.source": ["./.source/index.ts"], - "@/*": ["./src/*"] - }, + "noEmit": true, + "baseUrl": ".", "plugins": [ { "name": "next" } - ] + ], + "paths": { + "@/.source": ["./.source/index.ts"], + "@/*": ["./src/*"] + } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] diff --git a/apps/web/.gitignore b/apps/web/.gitignore deleted file mode 100644 index 62121fb82..000000000 --- a/apps/web/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage -/playwright-report -/test-results - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/apps/web/migrations/0000_stormy_ronan.sql b/apps/web/migrations/0000_stormy_ronan.sql deleted file mode 100644 index f2c645079..000000000 --- a/apps/web/migrations/0000_stormy_ronan.sql +++ /dev/null @@ -1,205 +0,0 @@ -CREATE TYPE "public"."coreLogsType" AS ENUM('warn', 'error', 'debug');--> statement-breakpoint -CREATE TABLE "core_admin_permissions" ( - "id" serial PRIMARY KEY NOT NULL, - "roleId" integer, - "userId" integer, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - "protected" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -ALTER TABLE "core_admin_permissions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_admin_sessions" ( - "id" serial PRIMARY KEY NOT NULL, - "token" varchar(255) NOT NULL, - "userId" integer NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "lastSeen" timestamp DEFAULT now() NOT NULL, - "expiresAt" timestamp NOT NULL, - "deviceId" integer NOT NULL, - CONSTRAINT "core_admin_sessions_token_unique" UNIQUE("token") -); ---> statement-breakpoint -ALTER TABLE "core_admin_sessions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_languages" ( - "id" serial PRIMARY KEY NOT NULL, - "code" varchar(32) NOT NULL, - "name" varchar(255) NOT NULL, - "timezone" varchar(255) DEFAULT 'UTC' NOT NULL, - "protected" boolean DEFAULT false NOT NULL, - "default" boolean DEFAULT false NOT NULL, - "enabled" boolean DEFAULT true NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - "time24" boolean DEFAULT false NOT NULL, - CONSTRAINT "core_languages_code_unique" UNIQUE("code") -); ---> statement-breakpoint -ALTER TABLE "core_languages" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_languages_words" ( - "id" serial PRIMARY KEY NOT NULL, - "languageCode" varchar NOT NULL, - "pluginCode" varchar(50) NOT NULL, - "itemId" integer NOT NULL, - "value" text NOT NULL, - "tableName" varchar(255) NOT NULL, - "variable" varchar(255) NOT NULL -); ---> statement-breakpoint -ALTER TABLE "core_languages_words" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_logs" ( - "id" serial PRIMARY KEY NOT NULL, - "pluginId" varchar(255) NOT NULL, - "type" "coreLogsType" NOT NULL, - "content" text NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "ipAddress" varchar(45) NOT NULL -); ---> statement-breakpoint -ALTER TABLE "core_logs" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_moderators_permissions" ( - "id" serial PRIMARY KEY NOT NULL, - "roleId" integer, - "userId" integer, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - "protected" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -ALTER TABLE "core_moderators_permissions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_roles" ( - "id" serial PRIMARY KEY NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - "protected" boolean DEFAULT false NOT NULL, - "default" boolean DEFAULT false NOT NULL, - "root" boolean DEFAULT false NOT NULL, - "guest" boolean DEFAULT false NOT NULL, - "color" varchar(19) -); ---> statement-breakpoint -ALTER TABLE "core_roles" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_sessions" ( - "id" serial PRIMARY KEY NOT NULL, - "token" varchar(255) NOT NULL, - "userId" integer NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "expiresAt" timestamp NOT NULL, - "deviceId" integer NOT NULL, - CONSTRAINT "core_sessions_token_unique" UNIQUE("token") -); ---> statement-breakpoint -ALTER TABLE "core_sessions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_sessions_known_devices" ( - "id" serial PRIMARY KEY NOT NULL, - "publicId" varchar(32) NOT NULL, - "ipAddress" varchar(40) NOT NULL, - "userAgent" text NOT NULL, - "lastSeen" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "core_sessions_known_devices_publicId_unique" UNIQUE("publicId") -); ---> statement-breakpoint -ALTER TABLE "core_sessions_known_devices" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_users" ( - "id" serial PRIMARY KEY NOT NULL, - "nameCode" varchar(255) NOT NULL, - "name" varchar(255) NOT NULL, - "email" varchar(255) NOT NULL, - "password" varchar, - "createdAt" timestamp DEFAULT now() NOT NULL, - "newsletter" boolean DEFAULT false NOT NULL, - "avatarColor" varchar(6) NOT NULL, - "emailVerified" boolean DEFAULT false NOT NULL, - "roleId" integer NOT NULL, - "birthday" timestamp, - "ipAddress" varchar(40) NOT NULL, - "language" varchar(32) DEFAULT 'en' NOT NULL, - CONSTRAINT "core_users_nameCode_unique" UNIQUE("nameCode"), - CONSTRAINT "core_users_name_unique" UNIQUE("name"), - CONSTRAINT "core_users_email_unique" UNIQUE("email") -); ---> statement-breakpoint -ALTER TABLE "core_users" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_users_confirm_emails" ( - "id" serial PRIMARY KEY NOT NULL, - "userId" integer NOT NULL, - "token" varchar(100) NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "expires" timestamp NOT NULL, - CONSTRAINT "core_users_confirm_emails_token_unique" UNIQUE("token") -); ---> statement-breakpoint -ALTER TABLE "core_users_confirm_emails" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_users_forgot_password" ( - "id" serial PRIMARY KEY NOT NULL, - "userId" integer NOT NULL, - "token" varchar(100) NOT NULL, - "ip_address" varchar(40) NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "expiresAt" timestamp NOT NULL, - CONSTRAINT "core_users_forgot_password_userId_unique" UNIQUE("userId"), - CONSTRAINT "core_users_forgot_password_token_unique" UNIQUE("token") -); ---> statement-breakpoint -ALTER TABLE "core_users_forgot_password" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "core_users_sso" ( - "userId" integer NOT NULL, - "providerId" varchar(255) NOT NULL, - "providerAccountId" varchar(255) NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL -); ---> statement-breakpoint -ALTER TABLE "core_users_sso" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "blog_categories" ( - "id" serial PRIMARY KEY NOT NULL, - "title" varchar(100) NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - "titleSeo" varchar(100) DEFAULT '' NOT NULL, - CONSTRAINT "blog_categories_titleSeo_unique" UNIQUE("titleSeo") -); ---> statement-breakpoint -ALTER TABLE "blog_categories" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -CREATE TABLE "blog_posts" ( - "id" serial PRIMARY KEY NOT NULL, - "title" varchar(255) NOT NULL, - "titleSeo" varchar(255) NOT NULL, - "content" text NOT NULL, - "categoryId" integer NOT NULL, - "createdAt" timestamp DEFAULT now() NOT NULL, - "updatedAt" timestamp NOT NULL, - CONSTRAINT "blog_posts_titleSeo_unique" UNIQUE("titleSeo") -); ---> statement-breakpoint -ALTER TABLE "blog_posts" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint -ALTER TABLE "core_admin_permissions" ADD CONSTRAINT "core_admin_permissions_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_admin_permissions" ADD CONSTRAINT "core_admin_permissions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_admin_sessions" ADD CONSTRAINT "core_admin_sessions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_admin_sessions" ADD CONSTRAINT "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk" FOREIGN KEY ("deviceId") REFERENCES "public"."core_sessions_known_devices"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_languages_words" ADD CONSTRAINT "core_languages_words_languageCode_core_languages_code_fk" FOREIGN KEY ("languageCode") REFERENCES "public"."core_languages"("code") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_moderators_permissions" ADD CONSTRAINT "core_moderators_permissions_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_moderators_permissions" ADD CONSTRAINT "core_moderators_permissions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_sessions" ADD CONSTRAINT "core_sessions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_sessions" ADD CONSTRAINT "core_sessions_deviceId_core_sessions_known_devices_id_fk" FOREIGN KEY ("deviceId") REFERENCES "public"."core_sessions_known_devices"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_users" ADD CONSTRAINT "core_users_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_users" ADD CONSTRAINT "core_users_language_core_languages_code_fk" FOREIGN KEY ("language") REFERENCES "public"."core_languages"("code") ON DELETE set default ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_users_confirm_emails" ADD CONSTRAINT "core_users_confirm_emails_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_users_forgot_password" ADD CONSTRAINT "core_users_forgot_password_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "core_users_sso" ADD CONSTRAINT "core_users_sso_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "blog_posts" ADD CONSTRAINT "blog_posts_categoryId_blog_categories_id_fk" FOREIGN KEY ("categoryId") REFERENCES "public"."blog_categories"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -CREATE INDEX "core_admin_permissions_role_id_idx" ON "core_admin_permissions" USING btree ("roleId");--> statement-breakpoint -CREATE INDEX "core_admin_permissions_user_id_idx" ON "core_admin_permissions" USING btree ("userId");--> statement-breakpoint -CREATE INDEX "core_admin_sessions_token_idx" ON "core_admin_sessions" USING btree ("token");--> statement-breakpoint -CREATE INDEX "core_admin_sessions_user_id_idx" ON "core_admin_sessions" USING btree ("userId");--> statement-breakpoint -CREATE INDEX "core_languages_code_idx" ON "core_languages" USING btree ("code");--> statement-breakpoint -CREATE INDEX "core_languages_name_idx" ON "core_languages" USING btree ("name");--> statement-breakpoint -CREATE INDEX "core_languages_words_lang_code_idx" ON "core_languages_words" USING btree ("languageCode");--> statement-breakpoint -CREATE INDEX "core_moderators_permissions_role_id_idx" ON "core_moderators_permissions" USING btree ("roleId");--> statement-breakpoint -CREATE INDEX "core_moderators_permissions_user_id_idx" ON "core_moderators_permissions" USING btree ("userId");--> statement-breakpoint -CREATE INDEX "core_sessions_user_id_idx" ON "core_sessions" USING btree ("userId");--> statement-breakpoint -CREATE INDEX "core_sessions_known_devices_ip_address_idx" ON "core_sessions_known_devices" USING btree ("ipAddress");--> statement-breakpoint -CREATE INDEX "core_users_name_code_idx" ON "core_users" USING btree ("nameCode");--> statement-breakpoint -CREATE INDEX "core_users_name_idx" ON "core_users" USING btree ("name");--> statement-breakpoint -CREATE INDEX "core_users_email_idx" ON "core_users" USING btree ("email");--> statement-breakpoint -CREATE INDEX "core_users_sso_user_id_idx" ON "core_users_sso" USING btree ("userId"); \ No newline at end of file diff --git a/apps/web/migrations/0001_thick_thor.sql b/apps/web/migrations/0001_thick_thor.sql deleted file mode 100644 index 9bd467bd6..000000000 --- a/apps/web/migrations/0001_thick_thor.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "core_logs" ADD COLUMN "method" varchar(10) DEFAULT 'GET' NOT NULL;--> statement-breakpoint -ALTER TABLE "core_logs" ADD COLUMN "path" text DEFAULT 'localhost' NOT NULL;--> statement-breakpoint -ALTER TABLE "core_logs" ADD COLUMN "userAgent" text;--> statement-breakpoint -ALTER TABLE "core_logs" ADD COLUMN "statusCode" integer DEFAULT 500 NOT NULL;--> statement-breakpoint -ALTER TABLE "core_logs" ADD COLUMN "userId" bigint;--> statement-breakpoint -ALTER TABLE "core_logs" ADD CONSTRAINT "core_logs_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE set null ON UPDATE cascade; \ No newline at end of file diff --git a/apps/web/migrations/meta/0000_snapshot.json b/apps/web/migrations/meta/0000_snapshot.json deleted file mode 100644 index 0b46f9572..000000000 --- a/apps/web/migrations/meta/0000_snapshot.json +++ /dev/null @@ -1,1399 +0,0 @@ -{ - "id": "960a9871-cd4a-4144-bc0a-af0717f397a7", - "prevId": "00000000-0000-0000-0000-000000000000", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.core_admin_permissions": { - "name": "core_admin_permissions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_admin_permissions_role_id_idx": { - "name": "core_admin_permissions_role_id_idx", - "columns": [ - { - "expression": "roleId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_admin_permissions_user_id_idx": { - "name": "core_admin_permissions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_admin_permissions_roleId_core_roles_id_fk": { - "name": "core_admin_permissions_roleId_core_roles_id_fk", - "tableFrom": "core_admin_permissions", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_admin_permissions_userId_core_users_id_fk": { - "name": "core_admin_permissions_userId_core_users_id_fk", - "tableFrom": "core_admin_permissions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_admin_sessions": { - "name": "core_admin_sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "lastSeen": { - "name": "lastSeen", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "deviceId": { - "name": "deviceId", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_admin_sessions_token_idx": { - "name": "core_admin_sessions_token_idx", - "columns": [ - { - "expression": "token", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_admin_sessions_user_id_idx": { - "name": "core_admin_sessions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_admin_sessions_userId_core_users_id_fk": { - "name": "core_admin_sessions_userId_core_users_id_fk", - "tableFrom": "core_admin_sessions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk": { - "name": "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk", - "tableFrom": "core_admin_sessions", - "tableTo": "core_sessions_known_devices", - "columnsFrom": [ - "deviceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_admin_sessions_token_unique": { - "name": "core_admin_sessions_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_languages": { - "name": "core_languages", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "code": { - "name": "code", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "timezone": { - "name": "timezone", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "default": "'UTC'" - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "default": { - "name": "default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "time24": { - "name": "time24", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_languages_code_idx": { - "name": "core_languages_code_idx", - "columns": [ - { - "expression": "code", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_languages_name_idx": { - "name": "core_languages_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_languages_code_unique": { - "name": "core_languages_code_unique", - "nullsNotDistinct": false, - "columns": [ - "code" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_languages_words": { - "name": "core_languages_words", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "languageCode": { - "name": "languageCode", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pluginCode": { - "name": "pluginCode", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "itemId": { - "name": "itemId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tableName": { - "name": "tableName", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "variable": { - "name": "variable", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_languages_words_lang_code_idx": { - "name": "core_languages_words_lang_code_idx", - "columns": [ - { - "expression": "languageCode", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_languages_words_languageCode_core_languages_code_fk": { - "name": "core_languages_words_languageCode_core_languages_code_fk", - "tableFrom": "core_languages_words", - "tableTo": "core_languages", - "columnsFrom": [ - "languageCode" - ], - "columnsTo": [ - "code" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_logs": { - "name": "core_logs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pluginId": { - "name": "pluginId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "coreLogsType", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(45)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_moderators_permissions": { - "name": "core_moderators_permissions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_moderators_permissions_role_id_idx": { - "name": "core_moderators_permissions_role_id_idx", - "columns": [ - { - "expression": "roleId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_moderators_permissions_user_id_idx": { - "name": "core_moderators_permissions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_moderators_permissions_roleId_core_roles_id_fk": { - "name": "core_moderators_permissions_roleId_core_roles_id_fk", - "tableFrom": "core_moderators_permissions", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_moderators_permissions_userId_core_users_id_fk": { - "name": "core_moderators_permissions_userId_core_users_id_fk", - "tableFrom": "core_moderators_permissions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_roles": { - "name": "core_roles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "default": { - "name": "default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "root": { - "name": "root", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "guest": { - "name": "guest", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "color": { - "name": "color", - "type": "varchar(19)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_sessions": { - "name": "core_sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "deviceId": { - "name": "deviceId", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_sessions_user_id_idx": { - "name": "core_sessions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_sessions_userId_core_users_id_fk": { - "name": "core_sessions_userId_core_users_id_fk", - "tableFrom": "core_sessions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_sessions_deviceId_core_sessions_known_devices_id_fk": { - "name": "core_sessions_deviceId_core_sessions_known_devices_id_fk", - "tableFrom": "core_sessions", - "tableTo": "core_sessions_known_devices", - "columnsFrom": [ - "deviceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_sessions_token_unique": { - "name": "core_sessions_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_sessions_known_devices": { - "name": "core_sessions_known_devices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "userAgent": { - "name": "userAgent", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "lastSeen": { - "name": "lastSeen", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "core_sessions_known_devices_ip_address_idx": { - "name": "core_sessions_known_devices_ip_address_idx", - "columns": [ - { - "expression": "ipAddress", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_sessions_known_devices_publicId_unique": { - "name": "core_sessions_known_devices_publicId_unique", - "nullsNotDistinct": false, - "columns": [ - "publicId" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users": { - "name": "core_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "nameCode": { - "name": "nameCode", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "newsletter": { - "name": "newsletter", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "avatarColor": { - "name": "avatarColor", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true - }, - "emailVerified": { - "name": "emailVerified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "birthday": { - "name": "birthday", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "language": { - "name": "language", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true, - "default": "'en'" - } - }, - "indexes": { - "core_users_name_code_idx": { - "name": "core_users_name_code_idx", - "columns": [ - { - "expression": "nameCode", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_users_name_idx": { - "name": "core_users_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_users_email_idx": { - "name": "core_users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_users_roleId_core_roles_id_fk": { - "name": "core_users_roleId_core_roles_id_fk", - "tableFrom": "core_users", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "core_users_language_core_languages_code_fk": { - "name": "core_users_language_core_languages_code_fk", - "tableFrom": "core_users", - "tableTo": "core_languages", - "columnsFrom": [ - "language" - ], - "columnsTo": [ - "code" - ], - "onDelete": "set default", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_nameCode_unique": { - "name": "core_users_nameCode_unique", - "nullsNotDistinct": false, - "columns": [ - "nameCode" - ] - }, - "core_users_name_unique": { - "name": "core_users_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - }, - "core_users_email_unique": { - "name": "core_users_email_unique", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_confirm_emails": { - "name": "core_users_confirm_emails", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "core_users_confirm_emails_userId_core_users_id_fk": { - "name": "core_users_confirm_emails_userId_core_users_id_fk", - "tableFrom": "core_users_confirm_emails", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_confirm_emails_token_unique": { - "name": "core_users_confirm_emails_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_forgot_password": { - "name": "core_users_forgot_password", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "ip_address": { - "name": "ip_address", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "core_users_forgot_password_userId_core_users_id_fk": { - "name": "core_users_forgot_password_userId_core_users_id_fk", - "tableFrom": "core_users_forgot_password", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_forgot_password_userId_unique": { - "name": "core_users_forgot_password_userId_unique", - "nullsNotDistinct": false, - "columns": [ - "userId" - ] - }, - "core_users_forgot_password_token_unique": { - "name": "core_users_forgot_password_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_sso": { - "name": "core_users_sso", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "providerId": { - "name": "providerId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_users_sso_user_id_idx": { - "name": "core_users_sso_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_users_sso_userId_core_users_id_fk": { - "name": "core_users_sso_userId_core_users_id_fk", - "tableFrom": "core_users_sso", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.blog_categories": { - "name": "blog_categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "titleSeo": { - "name": "titleSeo", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "blog_categories_titleSeo_unique": { - "name": "blog_categories_titleSeo_unique", - "nullsNotDistinct": false, - "columns": [ - "titleSeo" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.blog_posts": { - "name": "blog_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "titleSeo": { - "name": "titleSeo", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "categoryId": { - "name": "categoryId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "blog_posts_categoryId_blog_categories_id_fk": { - "name": "blog_posts_categoryId_blog_categories_id_fk", - "tableFrom": "blog_posts", - "tableTo": "blog_categories", - "columnsFrom": [ - "categoryId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "blog_posts_titleSeo_unique": { - "name": "blog_posts_titleSeo_unique", - "nullsNotDistinct": false, - "columns": [ - "titleSeo" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - } - }, - "enums": { - "public.coreLogsType": { - "name": "coreLogsType", - "schema": "public", - "values": [ - "warn", - "error", - "debug" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/web/migrations/meta/0001_snapshot.json b/apps/web/migrations/meta/0001_snapshot.json deleted file mode 100644 index ba74c370a..000000000 --- a/apps/web/migrations/meta/0001_snapshot.json +++ /dev/null @@ -1,1446 +0,0 @@ -{ - "id": "5efac58e-292d-4cd6-865d-9e5d15b893a0", - "prevId": "960a9871-cd4a-4144-bc0a-af0717f397a7", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.core_admin_permissions": { - "name": "core_admin_permissions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_admin_permissions_role_id_idx": { - "name": "core_admin_permissions_role_id_idx", - "columns": [ - { - "expression": "roleId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_admin_permissions_user_id_idx": { - "name": "core_admin_permissions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_admin_permissions_roleId_core_roles_id_fk": { - "name": "core_admin_permissions_roleId_core_roles_id_fk", - "tableFrom": "core_admin_permissions", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_admin_permissions_userId_core_users_id_fk": { - "name": "core_admin_permissions_userId_core_users_id_fk", - "tableFrom": "core_admin_permissions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_admin_sessions": { - "name": "core_admin_sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "lastSeen": { - "name": "lastSeen", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "deviceId": { - "name": "deviceId", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_admin_sessions_token_idx": { - "name": "core_admin_sessions_token_idx", - "columns": [ - { - "expression": "token", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_admin_sessions_user_id_idx": { - "name": "core_admin_sessions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_admin_sessions_userId_core_users_id_fk": { - "name": "core_admin_sessions_userId_core_users_id_fk", - "tableFrom": "core_admin_sessions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk": { - "name": "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk", - "tableFrom": "core_admin_sessions", - "tableTo": "core_sessions_known_devices", - "columnsFrom": [ - "deviceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_admin_sessions_token_unique": { - "name": "core_admin_sessions_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_languages": { - "name": "core_languages", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "code": { - "name": "code", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "timezone": { - "name": "timezone", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true, - "default": "'UTC'" - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "default": { - "name": "default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "time24": { - "name": "time24", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_languages_code_idx": { - "name": "core_languages_code_idx", - "columns": [ - { - "expression": "code", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_languages_name_idx": { - "name": "core_languages_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_languages_code_unique": { - "name": "core_languages_code_unique", - "nullsNotDistinct": false, - "columns": [ - "code" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_languages_words": { - "name": "core_languages_words", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "languageCode": { - "name": "languageCode", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "pluginCode": { - "name": "pluginCode", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "itemId": { - "name": "itemId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tableName": { - "name": "tableName", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "variable": { - "name": "variable", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_languages_words_lang_code_idx": { - "name": "core_languages_words_lang_code_idx", - "columns": [ - { - "expression": "languageCode", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_languages_words_languageCode_core_languages_code_fk": { - "name": "core_languages_words_languageCode_core_languages_code_fk", - "tableFrom": "core_languages_words", - "tableTo": "core_languages", - "columnsFrom": [ - "languageCode" - ], - "columnsTo": [ - "code" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_logs": { - "name": "core_logs", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pluginId": { - "name": "pluginId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "coreLogsType", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(45)", - "primaryKey": false, - "notNull": true - }, - "method": { - "name": "method", - "type": "varchar(10)", - "primaryKey": false, - "notNull": true, - "default": "'GET'" - }, - "path": { - "name": "path", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'localhost'" - }, - "userAgent": { - "name": "userAgent", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "statusCode": { - "name": "statusCode", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 500 - }, - "userId": { - "name": "userId", - "type": "bigint", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "core_logs_userId_core_users_id_fk": { - "name": "core_logs_userId_core_users_id_fk", - "tableFrom": "core_logs", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_moderators_permissions": { - "name": "core_moderators_permissions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "core_moderators_permissions_role_id_idx": { - "name": "core_moderators_permissions_role_id_idx", - "columns": [ - { - "expression": "roleId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_moderators_permissions_user_id_idx": { - "name": "core_moderators_permissions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_moderators_permissions_roleId_core_roles_id_fk": { - "name": "core_moderators_permissions_roleId_core_roles_id_fk", - "tableFrom": "core_moderators_permissions", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_moderators_permissions_userId_core_users_id_fk": { - "name": "core_moderators_permissions_userId_core_users_id_fk", - "tableFrom": "core_moderators_permissions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_roles": { - "name": "core_roles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "protected": { - "name": "protected", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "default": { - "name": "default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "root": { - "name": "root", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "guest": { - "name": "guest", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "color": { - "name": "color", - "type": "varchar(19)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_sessions": { - "name": "core_sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "deviceId": { - "name": "deviceId", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_sessions_user_id_idx": { - "name": "core_sessions_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_sessions_userId_core_users_id_fk": { - "name": "core_sessions_userId_core_users_id_fk", - "tableFrom": "core_sessions", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "core_sessions_deviceId_core_sessions_known_devices_id_fk": { - "name": "core_sessions_deviceId_core_sessions_known_devices_id_fk", - "tableFrom": "core_sessions", - "tableTo": "core_sessions_known_devices", - "columnsFrom": [ - "deviceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_sessions_token_unique": { - "name": "core_sessions_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_sessions_known_devices": { - "name": "core_sessions_known_devices", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "publicId": { - "name": "publicId", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "userAgent": { - "name": "userAgent", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "lastSeen": { - "name": "lastSeen", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "core_sessions_known_devices_ip_address_idx": { - "name": "core_sessions_known_devices_ip_address_idx", - "columns": [ - { - "expression": "ipAddress", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_sessions_known_devices_publicId_unique": { - "name": "core_sessions_known_devices_publicId_unique", - "nullsNotDistinct": false, - "columns": [ - "publicId" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users": { - "name": "core_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "nameCode": { - "name": "nameCode", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "newsletter": { - "name": "newsletter", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "avatarColor": { - "name": "avatarColor", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true - }, - "emailVerified": { - "name": "emailVerified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "roleId": { - "name": "roleId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "birthday": { - "name": "birthday", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "ipAddress": { - "name": "ipAddress", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "language": { - "name": "language", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true, - "default": "'en'" - } - }, - "indexes": { - "core_users_name_code_idx": { - "name": "core_users_name_code_idx", - "columns": [ - { - "expression": "nameCode", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_users_name_idx": { - "name": "core_users_name_idx", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "core_users_email_idx": { - "name": "core_users_email_idx", - "columns": [ - { - "expression": "email", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_users_roleId_core_roles_id_fk": { - "name": "core_users_roleId_core_roles_id_fk", - "tableFrom": "core_users", - "tableTo": "core_roles", - "columnsFrom": [ - "roleId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "core_users_language_core_languages_code_fk": { - "name": "core_users_language_core_languages_code_fk", - "tableFrom": "core_users", - "tableTo": "core_languages", - "columnsFrom": [ - "language" - ], - "columnsTo": [ - "code" - ], - "onDelete": "set default", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_nameCode_unique": { - "name": "core_users_nameCode_unique", - "nullsNotDistinct": false, - "columns": [ - "nameCode" - ] - }, - "core_users_name_unique": { - "name": "core_users_name_unique", - "nullsNotDistinct": false, - "columns": [ - "name" - ] - }, - "core_users_email_unique": { - "name": "core_users_email_unique", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_confirm_emails": { - "name": "core_users_confirm_emails", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expires": { - "name": "expires", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "core_users_confirm_emails_userId_core_users_id_fk": { - "name": "core_users_confirm_emails_userId_core_users_id_fk", - "tableFrom": "core_users_confirm_emails", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_confirm_emails_token_unique": { - "name": "core_users_confirm_emails_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_forgot_password": { - "name": "core_users_forgot_password", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "token": { - "name": "token", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "ip_address": { - "name": "ip_address", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "expiresAt": { - "name": "expiresAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "core_users_forgot_password_userId_core_users_id_fk": { - "name": "core_users_forgot_password_userId_core_users_id_fk", - "tableFrom": "core_users_forgot_password", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "core_users_forgot_password_userId_unique": { - "name": "core_users_forgot_password_userId_unique", - "nullsNotDistinct": false, - "columns": [ - "userId" - ] - }, - "core_users_forgot_password_token_unique": { - "name": "core_users_forgot_password_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.core_users_sso": { - "name": "core_users_sso", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "providerId": { - "name": "providerId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "providerAccountId": { - "name": "providerAccountId", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "core_users_sso_user_id_idx": { - "name": "core_users_sso_user_id_idx", - "columns": [ - { - "expression": "userId", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "core_users_sso_userId_core_users_id_fk": { - "name": "core_users_sso_userId_core_users_id_fk", - "tableFrom": "core_users_sso", - "tableTo": "core_users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.blog_categories": { - "name": "blog_categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "titleSeo": { - "name": "titleSeo", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "blog_categories_titleSeo_unique": { - "name": "blog_categories_titleSeo_unique", - "nullsNotDistinct": false, - "columns": [ - "titleSeo" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - }, - "public.blog_posts": { - "name": "blog_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "titleSeo": { - "name": "titleSeo", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "categoryId": { - "name": "categoryId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "blog_posts_categoryId_blog_categories_id_fk": { - "name": "blog_posts_categoryId_blog_categories_id_fk", - "tableFrom": "blog_posts", - "tableTo": "blog_categories", - "columnsFrom": [ - "categoryId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "blog_posts_titleSeo_unique": { - "name": "blog_posts_titleSeo_unique", - "nullsNotDistinct": false, - "columns": [ - "titleSeo" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": true - } - }, - "enums": { - "public.coreLogsType": { - "name": "coreLogsType", - "schema": "public", - "values": [ - "warn", - "error", - "debug" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/web/migrations/meta/_journal.json b/apps/web/migrations/meta/_journal.json deleted file mode 100644 index f4c39d31e..000000000 --- a/apps/web/migrations/meta/_journal.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "entries": [ - { - "idx": 0, - "version": "7", - "when": 1750691750823, - "tag": "0000_stormy_ronan", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1750876038988, - "tag": "0001_thick_thor", - "breakpoints": true - } - ] -} \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json deleted file mode 100644 index a79356aeb..000000000 --- a/apps/web/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "web", - "version": "1.2.0-canary.26", - "private": true, - "type": "module", - "scripts": { - "drizzle-kit": "drizzle-kit", - "db:push": "drizzle-kit push", - "db:migrate": "drizzle-kit up && drizzle-kit generate && drizzle-kit migrate", - "dev": "vitnode init && next dev --turbopack", - "dev:email": "email dev", - "build": "next build --turbopack", - "start": "next start", - "lint": "eslint .", - "lint:fix": "eslint . --fix", - "test:e2e": "playwright test", - "test:e2e:ui": "playwright test --ui", - "test:e2e:debug": "playwright test --debug", - "test:e2e:report": "playwright show-report" - }, - "dependencies": { - "@hono/zod-openapi": "^0.19.8", - "@hono/zod-validator": "^0.7.0", - "@hookform/resolvers": "^5.1.1", - "@react-email/components": "^0.1.1", - "@vitnode/blog": "workspace:*", - "@vitnode/core": "workspace:*", - "babel-plugin-react-compiler": "19.1.0-rc.2", - "dotenv": "^16.6.0", - "drizzle-kit": "^0.31.3", - "drizzle-orm": "^0.44.2", - "hono": "^4.8.3", - "lucide-react": "^0.523.0", - "next": "^15.3.4", - "next-intl": "^4.3.1", - "react": "^19.1.0", - "react-dom": "^19.1.0", - "react-hook-form": "^7.58.1", - "sonner": "^2.0.5", - "zod": "^3.25.67" - }, - "devDependencies": { - "@playwright/test": "^1.53.1", - "@tailwindcss/postcss": "^4.1.11", - "@types/node": "^24", - "@types/react": "^19.1", - "@types/react-dom": "^19.1", - "@vitnode/eslint-config": "workspace:*", - "eslint": "^9.29.0", - "prettier": "^3.6.1", - "react-email": "^4.0.17", - "tailwindcss": "^4.1.11", - "tw-animate-css": "^1.3.4", - "typescript": "^5.8.3" - } -} diff --git a/apps/web/postcss.config.mjs b/apps/web/postcss.config.mjs deleted file mode 100644 index 4c12660ec..000000000 --- a/apps/web/postcss.config.mjs +++ /dev/null @@ -1,6 +0,0 @@ -/** @type {import('postcss-load-config').Config} */ -export default { - plugins: { - '@tailwindcss/postcss': {}, - }, -}; diff --git a/apps/web/src/app/[locale]/admin/(auth)/layout.tsx b/apps/web/src/app/[locale]/admin/(auth)/layout.tsx deleted file mode 100644 index 01f8ac1c5..000000000 --- a/apps/web/src/app/[locale]/admin/(auth)/layout.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { - AdminLayout, - type AdminLayoutProps, -} from '@vitnode/core/views/admin/layouts/admin-layout'; - -import { vitNodeConfig } from '@/vitnode.config'; - -export default function Layout(props: AdminLayoutProps) { - return ; -} diff --git a/apps/web/src/app/favicon.ico b/apps/web/src/app/favicon.ico deleted file mode 100644 index fbdb96b2476447e89cfa937bef5bcda210b02bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmb_gJ!lkB5T1}Cg+&5_ZLYM`yA*c0UW=5Lo2ZqI3TZD_iWW+m2nMuJv5U5Xyg-V8 zA}LZ_kz!9G2&TAzLIVCg-?zK(ZfWB9-d-)-4J?~{d0 z2KH#*#e&jskzI?R%>o+pxBKugsFl$k5 zrQ{LUaOYX16M8Z7{OfIZhO)nZokn+|Lybq!TJbT^@IQBMMzQv|m=Rx97mF8s=XVe< z=t|vlKIh?cU%WmUQ}`zLz?GNxbMJYlHvaL4S1BFH2@L6*&y{K6gGkT}3y&fC0))%~;Rq?fY zL+|6be2rcqV}M+&f`7PqU#%_VBFB_#Ef=fcOF!@|dyB-zvsRC?b|T#c{YT>Sdedy2Y+Yb_V0Kj`_x{(Gynk~(Mh9=(2?%eiKQR*z#C96z|$7&~Lw*av^; zzZ#CVha8Z3n9?ualU+PEQZm906($_9f)J zb8Nm&Vll{z2ROky7e=03at7RqeiN9Wz2NRVDWN+bf35YxxcuV&O|p(TaqsXV7mA-- z2X%0zjV7+quo&0xAEM<`qWM12+%C~<*ZupT&VY`-({)a?2;IPlu=?{B*#7}fZtiRV diff --git a/apps/web/src/app/global.css b/apps/web/src/app/global.css deleted file mode 100644 index c08746e60..000000000 --- a/apps/web/src/app/global.css +++ /dev/null @@ -1,129 +0,0 @@ -@import 'tailwindcss' source('../../src'); - -@import 'tw-animate-css'; - -@source "../../node_modules/@vitnode/core/dist/src/components"; -@source "../../node_modules/@vitnode/core/dist/src/views"; - -@custom-variant dark (&:is(.dark *)); - -:root:not(.dark) { - --background: oklch(0.98 0 0); - --foreground: oklch(0.145 0 0); - --card: oklch(1 0 0); - --card-foreground: oklch(0.145 0 0); - --popover: oklch(1 0 0); - --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.51 0.16 262.61); - --primary-foreground: oklch(0.985 0 0); - --secondary: oklch(0.96 0 0); - --secondary-foreground: oklch(0.205 0 0); - --muted: oklch(0.97 0 0); - --muted-foreground: oklch(0.45 0 0); - --accent: oklch(0.95 0 0); - --accent-foreground: oklch(0.205 0 0); - --destructive: oklch(0.6 0.2 24.45); - --warn: oklch(0.54 0.12 82.58); - --border: oklch(0.9 0 0); - --input: oklch(0.9 0 0); - --ring: oklch(0.7 0.16 262.61); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); - --sidebar: var(--card); - --sidebar-foreground: oklch(0.145 0 0); - --sidebar-primary: var(--primary); - --sidebar-primary-foreground: var(--primary-foreground); - --sidebar-accent: oklch(0.975 0 0); - --sidebar-accent-foreground: oklch(0.205 0 0); - --sidebar-border: oklch(0.902 0 0); - --sidebar-ring: oklch(0.708 0 0); -} - -.dark { - --background: oklch(0.1 0 0); - --foreground: oklch(0.98 0 0); - --card: oklch(0.18 0 0); - --card-foreground: oklch(0.98 0 0); - --popover: oklch(0.18 0 0); - --popover-foreground: oklch(0.98 0 0); - --primary: oklch(0.51 0.16 262.61); - --primary-foreground: oklch(0.98 0 0); - --secondary: oklch(0.24 0.01 240); - --secondary-foreground: oklch(0.98 0.005 240); - --muted: oklch(0.22 0 0); - --muted-foreground: oklch(0.7 0 0); - --accent: oklch(0.28 0 0); - --destructive: oklch(0.62 0.2 25.35); - --warn: oklch(0.76 0.18 81.84); - --border: oklch(0.28 0 0); - --input: oklch(0.28 0 0); - --ring: oklch(0.51 0.16 262.61); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); - --sidebar: var(--card); - --sidebar-foreground: oklch(0.98 0 0); - --sidebar-primary: var(--primary); - --sidebar-primary-foreground: var(--primary-foreground); - --sidebar-accent: oklch(0.22 0 0); - --sidebar-accent-foreground: oklch(0.98 0 0); - --sidebar-border: oklch(0.269 0 0); - --sidebar-ring: oklch(0.51 0.16 262.61); -} - -:root { - --radius: 0.625rem; -} - -@theme inline { - --color-background: var(--background); - --color-foreground: var(--foreground); - --color-card: var(--card); - --color-card-foreground: var(--card-foreground); - --color-popover: var(--popover); - --color-popover-foreground: var(--popover-foreground); - --color-primary: var(--primary); - --color-primary-foreground: var(--primary-foreground); - --color-secondary: var(--secondary); - --color-secondary-foreground: var(--secondary-foreground); - --color-muted: var(--muted); - --color-muted-foreground: var(--muted-foreground); - --color-accent: var(--accent); - --color-accent-foreground: var(--accent-foreground); - --color-destructive: var(--destructive); - --color-warn: var(--warn); - --color-border: var(--border); - --color-input: var(--input); - --color-ring: var(--ring); - --color-chart-1: var(--chart-1); - --color-chart-2: var(--chart-2); - --color-chart-3: var(--chart-3); - --color-chart-4: var(--chart-4); - --color-chart-5: var(--chart-5); - --radius-sm: calc(var(--radius) - 4px); - --radius-md: calc(var(--radius) - 2px); - --radius-lg: var(--radius); - --radius-xl: calc(var(--radius) + 4px); - --color-sidebar: var(--sidebar); - --color-sidebar-foreground: var(--sidebar-foreground); - --color-sidebar-primary: var(--sidebar-primary); - --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); - --color-sidebar-accent: var(--sidebar-accent); - --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); - --color-sidebar-border: var(--sidebar-border); - --color-sidebar-ring: var(--sidebar-ring); -} - -@layer base { - * { - @apply border-border outline-ring/50; - } - body { - @apply bg-background text-foreground; - } -} diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx deleted file mode 100644 index 8ed5dbaf5..000000000 --- a/apps/web/src/app/layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import './global.css'; - -export default async function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return children; -} diff --git a/apps/web/src/app/not-found.tsx b/apps/web/src/app/not-found.tsx deleted file mode 100644 index 8181572e4..000000000 --- a/apps/web/src/app/not-found.tsx +++ /dev/null @@ -1,13 +0,0 @@ -'use client'; - -import Error from 'next/error'; - -export default function NotFound() { - return ( - - - - - - ); -} diff --git a/apps/web/src/locales/@vitnode/blog/pl.json b/apps/web/src/locales/@vitnode/blog/pl.json deleted file mode 100644 index 65f92dfff..000000000 --- a/apps/web/src/locales/@vitnode/blog/pl.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "@vitnode/blog": { - "title": "Blog", - "admin": { - "nav": { - "posts": "Posts", - "categories": "Categories" - }, - "categories": { - "desc": "Manage categories for blog posts.", - "table": { - "title": "Title", - "updated_at": "Updated At" - }, - "delete": { - "title": "Delete Category", - "desc": "Are you sure you want to delete category? This action cannot be undone.", - "confirm": "Yes, delete this category", - "success": "Category has been deleted successfully." - }, - "create": { - "title": "Create Category", - "desc": "A new category for your blog posts.", - "form": { - "title": { - "label": "Title", - "already_exists": "This category title already exists." - } - }, - "submit": "Create" - }, - "edit": { - "title": "Edit Category", - "submit": "Save Changes" - } - }, - "posts": { - "desc": "Write and manage your blog posts.", - "table": { - "title": "Title", - "category": "Category", - "updated_at": "Updated At" - }, - "create": { - "title": "Create Post", - "desc": "Write a new article for your blog.", - "form": { - "title": { - "label": "Title", - "already_exists": "This post title already exists." - }, - "content": "Content", - "category": "Category" - }, - "submit": "Create Post" - }, - "edit": { - "title": "Edit Post", - "submit": "Save Changes" - }, - "delete": { - "title": "Delete Post", - "desc": "Are you sure you want to delete post? This action cannot be undone.", - "confirm": "Yes, delete this post", - "success": "Post has been deleted successfully." - } - } - } - } -} diff --git a/apps/web/src/locales/@vitnode/core/pl.json b/apps/web/src/locales/@vitnode/core/pl.json deleted file mode 100644 index b89001b73..000000000 --- a/apps/web/src/locales/@vitnode/core/pl.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "core": { - "global": { - "no_results": { - "title": "No results found", - "desc": "Try adjusting your search or filter criteria." - }, - "are_you_sure_want_to_leave_form": { - "title": "Are you sure you want to leave this form?", - "desc": "Your changes will not be saved.", - "cancel": "Cancel", - "confirm": "Yes, leave" - }, - "search_placeholder": "Search...", - "results_not_found": "No results found", - "date": "{date, date}", - "date_medium": "{date, date, medium}", - "date_short": "{date, date, short}", - "register": "Register", - "login": "Login", - "save": "Save", - "submit": "Submit", - "cancel": "Cancel", - "optional": "Optional", - "loading": "Loading...", - "or": "or", - "back_home": "Back to home", - "go_back": "Go back", - "select_option": "Select an option", - "select_options": "Select options", - "go_to_prev_page": "Go to previous page", - "go_to_next_page": "Go to next page", - "errors": { - "title": "Oops! Something went wrong.", - "internal_server_error": "Internal server error.", - "field_required": "This field is required.", - "field_min_length": "This field must be at least {min} characters.", - "404": { - "title": "Page Not Found", - "desc": "Oops! The page you're looking for doesn't exist." - }, - "500": { - "title": "Internal Server Error", - "desc": "Sorry, we're experiencing technical difficulties on our server." - }, - "400": { - "title": "Bad Request", - "desc": "The request couldn't be processed due to invalid parameters." - }, - "403": { - "title": "Forbidden", - "desc": "You don't have permission to access this resource." - } - }, - "user_bar": { - "log_out": "Log out", - "admin_cp": "Admin CP" - } - }, - "auth": { - "sso": { - "or": "Or continue With", - "access_denied": "You have denied access to the application or the request has expired. Please try again." - }, - "sign_up": { - "desc": "Hello there! Create your account to get started.", - "already_have_account": "You already have an account? Sign in.", - "submit": "Register", - "username": { - "label": "Username", - "min_length": "Username must be at least 3 characters long.", - "max_length": "Username must be at most 32 characters long.", - "exists": "Username already exists.", - "your_user_code": "Your user code: " - }, - "email": { - "label": "Email", - "invalid": "Invalid email address.", - "exists": "Email already exists." - }, - "password": { - "label": "Password", - "invalid": "Password is too weak.", - "requirements": { - "label": "Password should contain:", - "min_length": "At least 8 characters", - "uppercase": "At least one uppercase letter", - "number": "At least one number", - "special_char": "At least one special character" - } - }, - "terms": { - "label": "Accept terms and conditions", - "required": "You must accept the terms and conditions.", - "desc": "You agree to our Legal documents & Policies." - }, - "newsletter": { - "label": "Newsletter", - "desc": "Receive the latest news and updates." - }, - "email_confirmation": { - "title": "Check your email", - "desc": "We've sent a confirmation link to your email address", - "check_spam": "If you don't see the email in your inbox, please check your spam folder." - } - }, - "sign_in": { - "desc": "Welcome back! Sign in to your account.", - "do_not_have_account": "Don't have an account? Sign up.", - "email": { - "label": "Email", - "invalid": "Invalid email address." - }, - "password": { - "label": "Password", - "required": "Password is required." - }, - "errors": { - "access_denied": { - "title": "Invalid credentials", - "desc": "The email address or password was incorrect. Please try again (make sure your caps lock is off)." - } - }, - "submit": "Login" - } - } - }, - "admin": { - "dashboard": { - "dev_mode": "Development Mode", - "version": "Version: {version}" - }, - "global": { - "nav": { - "core": "Core", - "dashboard": "Dashboard", - "users": { - "title": "Users", - "list": "User List" - }, - "user_bar": { - "home_page": "Home Page" - } - } - }, - "user": { - "list": { - "desc": "Manage users of your application.", - "user": "User", - "createdAt": "Created At", - "emailNotVerified": "Email Not Verified" - } - } - } -} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json deleted file mode 100644 index 13dc93961..000000000 --- a/apps/web/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "@vitnode/eslint-config/tsconfig", - "compilerOptions": { - "target": "ESNext", - "module": "esnext", - "moduleResolution": "bundler", - "noEmit": true, - "baseUrl": ".", - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/create-vitnode-app/src/questions.ts b/packages/create-vitnode-app/src/questions.ts index 2c680f36d..f15155aad 100644 --- a/packages/create-vitnode-app/src/questions.ts +++ b/packages/create-vitnode-app/src/questions.ts @@ -56,7 +56,7 @@ export const createQuestionsCli = async ( if (optionsFromProgram.docker === undefined) { options.docker = await confirm({ - message: `Would you like to use ${color.blue('Docker')}?`, + message: `Would you like to use ${color.blue('Docker Container')}?`, }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1499878cb..ed476a466 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,12 +32,27 @@ importers: apps/docs: dependencies: + '@hono/zod-openapi': + specifier: ^0.19.8 + version: 0.19.8(hono@4.8.3)(zod@3.25.67) + '@hono/zod-validator': + specifier: ^0.7.0 + version: 0.7.0(hono@4.8.3)(zod@3.25.67) + '@vitnode/blog': + specifier: workspace:* + version: link:../../plugins/blog '@vitnode/core': specifier: workspace:* version: link:../../packages/vitnode babel-plugin-react-compiler: specifier: 19.1.0-rc.2 version: 19.1.0-rc.2 + drizzle-kit: + specifier: ^0.31.3 + version: 0.31.3 + drizzle-orm: + specifier: ^0.44.2 + version: 0.44.2(@neondatabase/serverless@0.10.4)(@types/pg@8.11.10)(gel@2.1.0)(pg@8.13.1)(postgres@3.4.7) fumadocs-core: specifier: ^15.6.0 version: 15.6.0(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -47,6 +62,9 @@ importers: fumadocs-ui: specifier: ^15.6.0 version: 15.6.0(@types/react-dom@19.1.6(@types/react@19.1.8))(@types/react@19.1.8)(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(tailwindcss@4.1.11) + hono: + specifier: ^4.8.3 + version: 4.8.3 lucide-react: specifier: ^0.517.0 version: 0.517.0(react@19.1.0) @@ -56,16 +74,31 @@ importers: next: specifier: ^15.3.4 version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + next-intl: + specifier: ^4.3.1 + version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) react: specifier: ^19.1.0 version: 19.1.0 react-dom: specifier: ^19.1.0 version: 19.1.0(react@19.1.0) + react-hook-form: + specifier: ^7.58.1 + version: 7.58.1(react@19.1.0) react-use: specifier: ^17.6.0 version: 17.6.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + sonner: + specifier: ^2.0.5 + version: 2.0.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + zod: + specifier: ^3.25.67 + version: 3.25.67 devDependencies: + '@playwright/test': + specifier: ^1.53.1 + version: 1.53.1 '@tailwindcss/postcss': specifier: ^4.1.11 version: 4.1.11 @@ -81,12 +114,24 @@ importers: '@types/react-dom': specifier: ^19.1.6 version: 19.1.6(@types/react@19.1.8) + '@vitnode/eslint-config': + specifier: workspace:* + version: link:../../packages/eslint class-variance-authority: specifier: ^0.7.1 version: 0.7.1 + dotenv: + specifier: ^16.6.0 + version: 16.6.0 + eslint: + specifier: ^9.29.0 + version: 9.29.0(jiti@2.4.2) postcss: specifier: ^8.5.6 version: 8.5.6 + react-email: + specifier: ^4.0.17 + version: 4.0.17(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) shiki: specifier: ^3.7.0 version: 3.7.0 @@ -143,7 +188,7 @@ importers: version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next-intl: specifier: ^4.3.1 - version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) + version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) react: specifier: ^19.1.0 version: 19.1.0 @@ -477,7 +522,7 @@ importers: version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next-intl: specifier: ^4.3.1 - version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) + version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) react: specifier: ^19.1.0 version: 19.1.0 @@ -8967,7 +9012,7 @@ snapshots: '@types/cors@2.8.19': dependencies: - '@types/node': 24.0.4 + '@types/node': 24.0.7 '@types/debug@4.1.12': dependencies: @@ -9867,7 +9912,7 @@ snapshots: engine.io@6.6.4: dependencies: '@types/cors': 2.8.19 - '@types/node': 24.0.4 + '@types/node': 24.0.7 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.7.2 @@ -11788,7 +11833,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - next-intl@4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3): + next-intl@4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3): dependencies: '@formatjs/intl-localematcher': 0.5.10 negotiator: 1.0.0 From 8961db9e8001db29a063ad6c9777c39f700d21bb Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Wed, 2 Jul 2025 20:15:33 +0200 Subject: [PATCH 3/5] fix: Replace invalid path to apps/web to apps/docs --- .github/docs/tests_plan.md | 10 +- .../create-vitnode-app/src/prepare/prepare.ts | 2 +- packages/eslint/eslint.config.mjs | 6 - packages/vitnode/scripts/plugin.ts | 6 +- packages/vitnode/scripts/shared/file-utils.ts | 63 ++++++++++- pnpm-lock.yaml | 103 +----------------- scripts/files/file-copy-manager.ts | 2 +- 7 files changed, 70 insertions(+), 122 deletions(-) diff --git a/.github/docs/tests_plan.md b/.github/docs/tests_plan.md index c7189538a..c0ef8ae9b 100644 --- a/.github/docs/tests_plan.md +++ b/.github/docs/tests_plan.md @@ -2,7 +2,7 @@ ## 1. Introduction -This document outlines the testing strategy for the VitNode framework. The goal is to ensure the reliability, functionality, and performance of the core framework (`packages/vitnode`), the web application (`apps/web`), and associated plugins. We will utilize Vitest for unit and integration testing and Playwright for end-to-end testing. +This document outlines the testing strategy for the VitNode framework. The goal is to ensure the reliability, functionality, and performance of the core framework (`packages/vitnode`), the web application (`apps/docs`), and associated plugins. We will utilize Vitest for unit and integration testing and Playwright for end-to-end testing. ## 2. Goals @@ -24,13 +24,13 @@ This document outlines the testing strategy for the VitNode framework. The goal ### 4.1. Unit Tests (Vitest) **Scope:** Test individual functions, components, and utilities in isolation. -**Location:** Primarily within `packages/vitnode` and utility directories in `apps/web`. +**Location:** Primarily within `packages/vitnode` and utility directories in `apps/docs`. **Areas to Cover:** - **Core Utilities:** Functions in `packages/vitnode/src/lib`, helpers, etc. - **API Helpers:** Route building, validation logic using `@hono/zod-openapi`. -- **UI Components:** Basic rendering tests, prop validation for components in `packages/vitnode/src/components` and `apps/web/src/components`. +- **UI Components:** Basic rendering tests, prop validation for components in `packages/vitnode/src/components` and `apps/docs/src/components`. - **Configuration Loading:** Ensure `vitnode.config.ts` is loaded and parsed correctly. - **Internationalization (i18n):** Test translation loading and formatting utilities. @@ -42,7 +42,7 @@ This document outlines the testing strategy for the VitNode framework. The goal **Areas to Cover:** - **API Endpoints:** Test request handling, validation, middleware execution, and response generation for Hono.js routes defined in `packages/vitnode/src/api`. Example: [`testRoute`](packages/vitnode/src/api/modules/users/routes/test.route.ts). -- **Server Actions:** Test form submissions, data mutations, and interactions with the database within `apps/web`. +- **Server Actions:** Test form submissions, data mutations, and interactions with the database within `apps/docs`. - **Database Interactions:** Verify Drizzle ORM queries, schema interactions, and data integrity (using a test database). - **Authentication Logic:** Test credential verification, session creation/validation (including durations), email verification, password reset, and SSO provider interactions (Google, GitHub, Facebook). - **Plugin Integration:** Test how core systems interact with plugin-provided extensions (routes, hooks, etc.). @@ -50,7 +50,7 @@ This document outlines the testing strategy for the VitNode framework. The goal ### 4.3. End-to-End Tests (Playwright) **Scope:** Simulate real user scenarios by interacting with the application through a browser. -**Location:** A dedicated `e2e` or `tests` directory at the root or within `apps/web`. +**Location:** A dedicated `e2e` or `tests` directory at the root or within `apps/docs`. **Areas to Cover:** diff --git a/packages/create-vitnode-app/src/prepare/prepare.ts b/packages/create-vitnode-app/src/prepare/prepare.ts index b1be7f142..3b9c74ed8 100644 --- a/packages/create-vitnode-app/src/prepare/prepare.ts +++ b/packages/create-vitnode-app/src/prepare/prepare.ts @@ -7,7 +7,7 @@ const prepare = async () => { if (!existsSync(toRootPath)) { await mkdir(toRootPath); } - const fromRootPath = join(process.cwd(), '..', '..', 'apps', 'web'); + const fromRootPath = join(process.cwd(), '..', '..', 'apps', 'docs'); if (!existsSync(fromRootPath)) { console.error( `\x1b[31mThe path ${fromRootPath} does not exist. Please check the directory structure.\x1b[0m`, diff --git a/packages/eslint/eslint.config.mjs b/packages/eslint/eslint.config.mjs index f2f5e3036..286ffa840 100644 --- a/packages/eslint/eslint.config.mjs +++ b/packages/eslint/eslint.config.mjs @@ -12,12 +12,6 @@ export default [ { ignores: [ 'dist', - // 'apps/web/src/app/[locale]/(main)/(plugins)/**/*', - // 'apps/web/src/app/\\[locale\\]/(main)/(plugins)/**/*', - // 'apps/web/src/app/*/\\(main\\)/\\(plugins\\)/**/*', - // 'apps/web/src/app/[locale]/admin/(auth)/(main)/(plugins)/**/*', - // 'src/app/[locale]/(main)/(plugins)/**/*', - // 'src/app/[locale]/admin/(auth)/(main)/(plugins)/**/*', '**/\\(main\\)/\\(plugins\\)/**', '**/\\(auth\\)/\\(plugins\\)/**', '.prettierrc.mjs', diff --git a/packages/vitnode/scripts/plugin.ts b/packages/vitnode/scripts/plugin.ts index d9bfc5f8e..fdbc25e45 100644 --- a/packages/vitnode/scripts/plugin.ts +++ b/packages/vitnode/scripts/plugin.ts @@ -41,7 +41,7 @@ export const processPlugin = ({ initMessage }: { initMessage: string }) => { const mainDest = join( repoRoot, 'apps', - 'web', + 'docs', 'src', 'app', '[locale]', @@ -51,7 +51,7 @@ export const processPlugin = ({ initMessage }: { initMessage: string }) => { const adminDest = join( repoRoot, 'apps', - 'web', + 'docs', 'src', 'app', '[locale]', @@ -59,7 +59,7 @@ export const processPlugin = ({ initMessage }: { initMessage: string }) => { '(auth)', join('(plugins)', `(${pluginPathName})`), ); - const langDest = join(repoRoot, 'apps', 'web', 'src', 'locales', pluginName); + const langDest = join(repoRoot, 'apps', 'docs', 'src', 'locales', pluginName); // tell the copier about both trees const sources: SourceConfig[] = [ diff --git a/packages/vitnode/scripts/shared/file-utils.ts b/packages/vitnode/scripts/shared/file-utils.ts index 957583aa5..449522329 100644 --- a/packages/vitnode/scripts/shared/file-utils.ts +++ b/packages/vitnode/scripts/shared/file-utils.ts @@ -151,14 +151,65 @@ export function findLocaleRoot(repoRoot: string): string { return standalonePath; } - // Check for monorepo structure first (apps/web/src/app/[locale]) - const monorepoPath = join(repoRoot, 'apps', 'web', 'src', 'app', '[locale]'); - if (existsSync(monorepoPath)) { - return monorepoPath; + // Function to recursively search for [locale] directories + const findLocaleDirectories = (searchDir: string): string[] => { + const localeDirectories: string[] = []; + if (!existsSync(searchDir)) return localeDirectories; + + const visit = (currentDir: string, depth = 0) => { + // Limit search depth to avoid infinite recursion and performance issues + if (depth > 4) return; + + try { + const entries = readdirSync(currentDir, { withFileTypes: true }); + + for (const entry of entries) { + if (!entry.isDirectory()) continue; + + const fullPath = join(currentDir, entry.name); + + // Check if this is a [locale] directory with app structure + if (entry.name === '[locale]') { + // Verify it's inside an app directory structure + const parentPath = dirname(fullPath); + if (parentPath.endsWith(join('src', 'app'))) { + localeDirectories.push(fullPath); + continue; + } + } + + // Continue searching in subdirectories + visit(fullPath, depth + 1); + } + } catch (_error) { + // Skip directories we can't read + } + }; + + visit(searchDir); + + return localeDirectories; + }; + + // Search for any directory structure containing src/app/[locale] + const localeDirectories = findLocaleDirectories(repoRoot); + + if (localeDirectories.length > 0) { + // Return the first found locale directory + return localeDirectories[0]; } - // Default to monorepo structure if neither exists (for new projects) - return monorepoPath; + // Default to apps/docs structure if nothing is found (for new projects) + const defaultAppDir = join( + repoRoot, + 'apps', + 'docs', + 'src', + 'app', + '[locale]', + ); + + return defaultAppDir; } export const getAllFiles = (dir: string): string[] => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed476a466..2c8b54960 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,7 +76,7 @@ importers: version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next-intl: specifier: ^4.3.1 - version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) + version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) react: specifier: ^19.1.0 version: 19.1.0 @@ -145,103 +145,6 @@ importers: specifier: ^5.8.3 version: 5.8.3 - apps/web: - dependencies: - '@hono/zod-openapi': - specifier: ^0.19.8 - version: 0.19.8(hono@4.8.3)(zod@3.25.67) - '@hono/zod-validator': - specifier: ^0.7.0 - version: 0.7.0(hono@4.8.3)(zod@3.25.67) - '@hookform/resolvers': - specifier: ^5.1.1 - version: 5.1.1(react-hook-form@7.58.1(react@19.1.0)) - '@react-email/components': - specifier: ^0.1.1 - version: 0.1.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@vitnode/blog': - specifier: workspace:* - version: link:../../plugins/blog - '@vitnode/core': - specifier: workspace:* - version: link:../../packages/vitnode - babel-plugin-react-compiler: - specifier: 19.1.0-rc.2 - version: 19.1.0-rc.2 - dotenv: - specifier: ^16.6.0 - version: 16.6.0 - drizzle-kit: - specifier: ^0.31.3 - version: 0.31.3 - drizzle-orm: - specifier: ^0.44.2 - version: 0.44.2(@neondatabase/serverless@0.10.4)(@types/pg@8.11.10)(gel@2.1.0)(pg@8.13.1)(postgres@3.4.7) - hono: - specifier: ^4.8.3 - version: 4.8.3 - lucide-react: - specifier: ^0.523.0 - version: 0.523.0(react@19.1.0) - next: - specifier: ^15.3.4 - version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - next-intl: - specifier: ^4.3.1 - version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) - react: - specifier: ^19.1.0 - version: 19.1.0 - react-dom: - specifier: ^19.1.0 - version: 19.1.0(react@19.1.0) - react-hook-form: - specifier: ^7.58.1 - version: 7.58.1(react@19.1.0) - sonner: - specifier: ^2.0.5 - version: 2.0.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - zod: - specifier: ^3.25.67 - version: 3.25.67 - devDependencies: - '@playwright/test': - specifier: ^1.53.1 - version: 1.53.1 - '@tailwindcss/postcss': - specifier: ^4.1.11 - version: 4.1.11 - '@types/node': - specifier: ^24 - version: 24.0.4 - '@types/react': - specifier: ^19.1 - version: 19.1.8 - '@types/react-dom': - specifier: ^19.1 - version: 19.1.6(@types/react@19.1.8) - '@vitnode/eslint-config': - specifier: workspace:* - version: link:../../packages/eslint - eslint: - specifier: ^9.29.0 - version: 9.29.0(jiti@2.4.2) - prettier: - specifier: ^3.6.1 - version: 3.6.1 - react-email: - specifier: ^4.0.17 - version: 4.0.17(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - tailwindcss: - specifier: ^4.1.11 - version: 4.1.11 - tw-animate-css: - specifier: ^1.3.4 - version: 1.3.4 - typescript: - specifier: ^5.8.3 - version: 5.8.3 - packages/create-vitnode-app: dependencies: '@inquirer/prompts': @@ -522,7 +425,7 @@ importers: version: 15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) next-intl: specifier: ^4.3.1 - version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) + version: 4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3) react: specifier: ^19.1.0 version: 19.1.0 @@ -11833,7 +11736,7 @@ snapshots: optionalDependencies: typescript: 5.8.3 - next-intl@4.3.1(next@15.3.4(@playwright/test@1.53.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3): + next-intl@4.3.1(next@15.3.4(@playwright/test@1.53.1)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)(typescript@5.8.3): dependencies: '@formatjs/intl-localematcher': 0.5.10 negotiator: 1.0.0 diff --git a/scripts/files/file-copy-manager.ts b/scripts/files/file-copy-manager.ts index a2e6ccd98..5839790b0 100644 --- a/scripts/files/file-copy-manager.ts +++ b/scripts/files/file-copy-manager.ts @@ -7,7 +7,7 @@ export class FileCopyManager { constructor(private env: EnvironmentConfig) {} async init(): Promise { - const sourcePath = join(this.env.WORKSPACE, 'apps', 'web'); + const sourcePath = join(this.env.WORKSPACE, 'apps', 'docs'); const destPath = join( this.env.WORKSPACE, 'packages', From a5c98971edaa1ae889c55cca6be361a80c89d0cc Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Wed, 2 Jul 2025 20:19:28 +0200 Subject: [PATCH 4/5] =?UTF-8?q?fix(global.d.ts):=20=F0=9F=90=9B=20Update?= =?UTF-8?q?=20`Messages`=20type=20to=20include=20`blog`=20localization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/docs/global.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/global.d.ts b/apps/docs/global.d.ts index 599b27bef..604002bd0 100644 --- a/apps/docs/global.d.ts +++ b/apps/docs/global.d.ts @@ -1,9 +1,10 @@ /// import type core from './src/locales/@vitnode/core/en.json'; +import type blog from './src/locales/@vitnode/blog/en.json'; declare module 'next-intl' { interface AppConfig { - Messages: typeof core; + Messages: typeof core & typeof blog; } } From 11b0d29ecb44808bf02a338e8949adbe29f9a5be Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Wed, 2 Jul 2025 21:00:10 +0200 Subject: [PATCH 5/5] docs: Restore home page --- apps/docs/eslint.config.mjs | 7 +- apps/docs/layout.tsx | 31 - apps/docs/migrations/0000_rapid_nick_fury.sql | 211 +++ apps/docs/migrations/meta/0000_snapshot.json | 1446 +++++++++++++++++ apps/docs/migrations/meta/_journal.json | 13 + apps/docs/src/app/(home)/layout.tsx | 9 - .../src/app/[locale]/(docs)/docs/layout.tsx | 67 +- .../app/{ => [locale]/(main)}/(home)/page.tsx | 0 .../(main)}/(home)/sections/admin/admin.tsx | 0 .../(home)/sections/admin/debug_panel.png | Bin .../(home)/sections/call-to-action.tsx | 2 +- .../sections/powering-by/logos/drizzleorm.tsx | 0 .../sections/powering-by/logos/honojs.tsx | 0 .../sections/powering-by/logos/next-intl.tsx | 0 .../sections/powering-by/logos/nextjs.tsx | 0 .../sections/powering-by/logos/postgresql.tsx | 0 .../powering-by/logos/tailwindcss.tsx | 0 .../sections/powering-by/powering-by.tsx | 0 .../{ => [locale]/(main)}/layout.client.tsx | 6 +- .../{ => [locale]/(main)}/layout.config.tsx | 1 + apps/docs/src/app/[locale]/(main)/layout.tsx | 10 + apps/docs/src/app/[locale]/layout.tsx | 21 +- .../root/src/[locale]/(main)/layout.tsx | 15 + .../root/src}/[locale]/(main)/page.tsx | 0 .../root/src/[locale]/layout.tsx | 40 + .../vitnode/src/views/layouts/root-layout.tsx | 19 +- scripts/files/file-copy-manager.ts | 4 +- 27 files changed, 1801 insertions(+), 101 deletions(-) delete mode 100644 apps/docs/layout.tsx create mode 100644 apps/docs/migrations/0000_rapid_nick_fury.sql create mode 100644 apps/docs/migrations/meta/0000_snapshot.json create mode 100644 apps/docs/migrations/meta/_journal.json delete mode 100644 apps/docs/src/app/(home)/layout.tsx rename apps/docs/src/app/{ => [locale]/(main)}/(home)/page.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/admin/admin.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/admin/debug_panel.png (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/call-to-action.tsx (92%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/drizzleorm.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/honojs.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/next-intl.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/nextjs.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/postgresql.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/logos/tailwindcss.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/(home)/sections/powering-by/powering-by.tsx (100%) rename apps/docs/src/app/{ => [locale]/(main)}/layout.client.tsx (79%) rename apps/docs/src/app/{ => [locale]/(main)}/layout.config.tsx (96%) create mode 100644 packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/layout.tsx rename {apps/docs/src/app => packages/create-vitnode-app/copy-of-vitnode-app/root/src}/[locale]/(main)/page.tsx (100%) create mode 100644 packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/layout.tsx diff --git a/apps/docs/eslint.config.mjs b/apps/docs/eslint.config.mjs index 16c29ce23..f6c3de516 100644 --- a/apps/docs/eslint.config.mjs +++ b/apps/docs/eslint.config.mjs @@ -1,3 +1,8 @@ import eslintVitNode from '@vitnode/eslint-config/eslint'; -export default [...eslintVitNode]; +export default [ + ...eslintVitNode, + { + ignores: ['.source'], + }, +]; diff --git a/apps/docs/layout.tsx b/apps/docs/layout.tsx deleted file mode 100644 index cafd70161..000000000 --- a/apps/docs/layout.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import './global.css'; -import type { ReactNode } from 'react'; - -import { RootProvider } from 'fumadocs-ui/provider'; -import { Geist, Geist_Mono } from 'next/font/google'; - -import { Body } from './src/app/layout.client'; - -const geistSans = Geist({ - variable: '--font-geist-sans', - subsets: ['latin'], -}); - -const geistMono = Geist_Mono({ - variable: '--font-geist-mono', - subsets: ['latin'], -}); - -export default function Layout({ children }: { children: ReactNode }) { - return ( - - - {children} - - - ); -} diff --git a/apps/docs/migrations/0000_rapid_nick_fury.sql b/apps/docs/migrations/0000_rapid_nick_fury.sql new file mode 100644 index 000000000..af740ca0d --- /dev/null +++ b/apps/docs/migrations/0000_rapid_nick_fury.sql @@ -0,0 +1,211 @@ +CREATE TYPE "public"."coreLogsType" AS ENUM('warn', 'error', 'debug');--> statement-breakpoint +CREATE TABLE "core_admin_permissions" ( + "id" serial PRIMARY KEY NOT NULL, + "roleId" integer, + "userId" integer, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + "protected" boolean DEFAULT false NOT NULL +); +--> statement-breakpoint +ALTER TABLE "core_admin_permissions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_admin_sessions" ( + "id" serial PRIMARY KEY NOT NULL, + "token" varchar(255) NOT NULL, + "userId" integer NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "lastSeen" timestamp DEFAULT now() NOT NULL, + "expiresAt" timestamp NOT NULL, + "deviceId" integer NOT NULL, + CONSTRAINT "core_admin_sessions_token_unique" UNIQUE("token") +); +--> statement-breakpoint +ALTER TABLE "core_admin_sessions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_languages" ( + "id" serial PRIMARY KEY NOT NULL, + "code" varchar(32) NOT NULL, + "name" varchar(255) NOT NULL, + "timezone" varchar(255) DEFAULT 'UTC' NOT NULL, + "protected" boolean DEFAULT false NOT NULL, + "default" boolean DEFAULT false NOT NULL, + "enabled" boolean DEFAULT true NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + "time24" boolean DEFAULT false NOT NULL, + CONSTRAINT "core_languages_code_unique" UNIQUE("code") +); +--> statement-breakpoint +ALTER TABLE "core_languages" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_languages_words" ( + "id" serial PRIMARY KEY NOT NULL, + "languageCode" varchar NOT NULL, + "pluginCode" varchar(50) NOT NULL, + "itemId" integer NOT NULL, + "value" text NOT NULL, + "tableName" varchar(255) NOT NULL, + "variable" varchar(255) NOT NULL +); +--> statement-breakpoint +ALTER TABLE "core_languages_words" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_logs" ( + "id" serial PRIMARY KEY NOT NULL, + "pluginId" varchar(255) NOT NULL, + "type" "coreLogsType" NOT NULL, + "content" text NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "ipAddress" varchar(45) NOT NULL, + "method" varchar(10) DEFAULT 'GET' NOT NULL, + "path" text DEFAULT 'localhost' NOT NULL, + "userAgent" text, + "statusCode" integer DEFAULT 500 NOT NULL, + "userId" bigint +); +--> statement-breakpoint +ALTER TABLE "core_logs" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_moderators_permissions" ( + "id" serial PRIMARY KEY NOT NULL, + "roleId" integer, + "userId" integer, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + "protected" boolean DEFAULT false NOT NULL +); +--> statement-breakpoint +ALTER TABLE "core_moderators_permissions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_roles" ( + "id" serial PRIMARY KEY NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + "protected" boolean DEFAULT false NOT NULL, + "default" boolean DEFAULT false NOT NULL, + "root" boolean DEFAULT false NOT NULL, + "guest" boolean DEFAULT false NOT NULL, + "color" varchar(19) +); +--> statement-breakpoint +ALTER TABLE "core_roles" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_sessions" ( + "id" serial PRIMARY KEY NOT NULL, + "token" varchar(255) NOT NULL, + "userId" integer NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "expiresAt" timestamp NOT NULL, + "deviceId" integer NOT NULL, + CONSTRAINT "core_sessions_token_unique" UNIQUE("token") +); +--> statement-breakpoint +ALTER TABLE "core_sessions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_sessions_known_devices" ( + "id" serial PRIMARY KEY NOT NULL, + "publicId" varchar(32) NOT NULL, + "ipAddress" varchar(40) NOT NULL, + "userAgent" text NOT NULL, + "lastSeen" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "core_sessions_known_devices_publicId_unique" UNIQUE("publicId") +); +--> statement-breakpoint +ALTER TABLE "core_sessions_known_devices" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_users" ( + "id" serial PRIMARY KEY NOT NULL, + "nameCode" varchar(255) NOT NULL, + "name" varchar(255) NOT NULL, + "email" varchar(255) NOT NULL, + "password" varchar, + "createdAt" timestamp DEFAULT now() NOT NULL, + "newsletter" boolean DEFAULT false NOT NULL, + "avatarColor" varchar(6) NOT NULL, + "emailVerified" boolean DEFAULT false NOT NULL, + "roleId" integer NOT NULL, + "birthday" timestamp, + "ipAddress" varchar(40) NOT NULL, + "language" varchar(32) DEFAULT 'en' NOT NULL, + CONSTRAINT "core_users_nameCode_unique" UNIQUE("nameCode"), + CONSTRAINT "core_users_name_unique" UNIQUE("name"), + CONSTRAINT "core_users_email_unique" UNIQUE("email") +); +--> statement-breakpoint +ALTER TABLE "core_users" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_users_confirm_emails" ( + "id" serial PRIMARY KEY NOT NULL, + "userId" integer NOT NULL, + "token" varchar(100) NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "expires" timestamp NOT NULL, + CONSTRAINT "core_users_confirm_emails_token_unique" UNIQUE("token") +); +--> statement-breakpoint +ALTER TABLE "core_users_confirm_emails" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_users_forgot_password" ( + "id" serial PRIMARY KEY NOT NULL, + "userId" integer NOT NULL, + "token" varchar(100) NOT NULL, + "ip_address" varchar(40) NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "expiresAt" timestamp NOT NULL, + CONSTRAINT "core_users_forgot_password_userId_unique" UNIQUE("userId"), + CONSTRAINT "core_users_forgot_password_token_unique" UNIQUE("token") +); +--> statement-breakpoint +ALTER TABLE "core_users_forgot_password" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "core_users_sso" ( + "userId" integer NOT NULL, + "providerId" varchar(255) NOT NULL, + "providerAccountId" varchar(255) NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL +); +--> statement-breakpoint +ALTER TABLE "core_users_sso" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "blog_categories" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar(100) NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + "titleSeo" varchar(100) DEFAULT '' NOT NULL, + CONSTRAINT "blog_categories_titleSeo_unique" UNIQUE("titleSeo") +); +--> statement-breakpoint +ALTER TABLE "blog_categories" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "blog_posts" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar(255) NOT NULL, + "titleSeo" varchar(255) NOT NULL, + "content" text NOT NULL, + "categoryId" integer NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp NOT NULL, + CONSTRAINT "blog_posts_titleSeo_unique" UNIQUE("titleSeo") +); +--> statement-breakpoint +ALTER TABLE "blog_posts" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +ALTER TABLE "core_admin_permissions" ADD CONSTRAINT "core_admin_permissions_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_admin_permissions" ADD CONSTRAINT "core_admin_permissions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_admin_sessions" ADD CONSTRAINT "core_admin_sessions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_admin_sessions" ADD CONSTRAINT "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk" FOREIGN KEY ("deviceId") REFERENCES "public"."core_sessions_known_devices"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_languages_words" ADD CONSTRAINT "core_languages_words_languageCode_core_languages_code_fk" FOREIGN KEY ("languageCode") REFERENCES "public"."core_languages"("code") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_logs" ADD CONSTRAINT "core_logs_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint +ALTER TABLE "core_moderators_permissions" ADD CONSTRAINT "core_moderators_permissions_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_moderators_permissions" ADD CONSTRAINT "core_moderators_permissions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_sessions" ADD CONSTRAINT "core_sessions_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_sessions" ADD CONSTRAINT "core_sessions_deviceId_core_sessions_known_devices_id_fk" FOREIGN KEY ("deviceId") REFERENCES "public"."core_sessions_known_devices"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_users" ADD CONSTRAINT "core_users_roleId_core_roles_id_fk" FOREIGN KEY ("roleId") REFERENCES "public"."core_roles"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_users" ADD CONSTRAINT "core_users_language_core_languages_code_fk" FOREIGN KEY ("language") REFERENCES "public"."core_languages"("code") ON DELETE set default ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_users_confirm_emails" ADD CONSTRAINT "core_users_confirm_emails_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_users_forgot_password" ADD CONSTRAINT "core_users_forgot_password_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "core_users_sso" ADD CONSTRAINT "core_users_sso_userId_core_users_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."core_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "blog_posts" ADD CONSTRAINT "blog_posts_categoryId_blog_categories_id_fk" FOREIGN KEY ("categoryId") REFERENCES "public"."blog_categories"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "core_admin_permissions_role_id_idx" ON "core_admin_permissions" USING btree ("roleId");--> statement-breakpoint +CREATE INDEX "core_admin_permissions_user_id_idx" ON "core_admin_permissions" USING btree ("userId");--> statement-breakpoint +CREATE INDEX "core_admin_sessions_token_idx" ON "core_admin_sessions" USING btree ("token");--> statement-breakpoint +CREATE INDEX "core_admin_sessions_user_id_idx" ON "core_admin_sessions" USING btree ("userId");--> statement-breakpoint +CREATE INDEX "core_languages_code_idx" ON "core_languages" USING btree ("code");--> statement-breakpoint +CREATE INDEX "core_languages_name_idx" ON "core_languages" USING btree ("name");--> statement-breakpoint +CREATE INDEX "core_languages_words_lang_code_idx" ON "core_languages_words" USING btree ("languageCode");--> statement-breakpoint +CREATE INDEX "core_moderators_permissions_role_id_idx" ON "core_moderators_permissions" USING btree ("roleId");--> statement-breakpoint +CREATE INDEX "core_moderators_permissions_user_id_idx" ON "core_moderators_permissions" USING btree ("userId");--> statement-breakpoint +CREATE INDEX "core_sessions_user_id_idx" ON "core_sessions" USING btree ("userId");--> statement-breakpoint +CREATE INDEX "core_sessions_known_devices_ip_address_idx" ON "core_sessions_known_devices" USING btree ("ipAddress");--> statement-breakpoint +CREATE INDEX "core_users_name_code_idx" ON "core_users" USING btree ("nameCode");--> statement-breakpoint +CREATE INDEX "core_users_name_idx" ON "core_users" USING btree ("name");--> statement-breakpoint +CREATE INDEX "core_users_email_idx" ON "core_users" USING btree ("email");--> statement-breakpoint +CREATE INDEX "core_users_sso_user_id_idx" ON "core_users_sso" USING btree ("userId"); \ No newline at end of file diff --git a/apps/docs/migrations/meta/0000_snapshot.json b/apps/docs/migrations/meta/0000_snapshot.json new file mode 100644 index 000000000..e17742cde --- /dev/null +++ b/apps/docs/migrations/meta/0000_snapshot.json @@ -0,0 +1,1446 @@ +{ + "id": "77ac3265-847d-4978-a374-6d31424be57a", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.core_admin_permissions": { + "name": "core_admin_permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "roleId": { + "name": "roleId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "protected": { + "name": "protected", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "core_admin_permissions_role_id_idx": { + "name": "core_admin_permissions_role_id_idx", + "columns": [ + { + "expression": "roleId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_admin_permissions_user_id_idx": { + "name": "core_admin_permissions_user_id_idx", + "columns": [ + { + "expression": "userId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_admin_permissions_roleId_core_roles_id_fk": { + "name": "core_admin_permissions_roleId_core_roles_id_fk", + "tableFrom": "core_admin_permissions", + "tableTo": "core_roles", + "columnsFrom": [ + "roleId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "core_admin_permissions_userId_core_users_id_fk": { + "name": "core_admin_permissions_userId_core_users_id_fk", + "tableFrom": "core_admin_permissions", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_admin_sessions": { + "name": "core_admin_sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "lastSeen": { + "name": "lastSeen", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expiresAt": { + "name": "expiresAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "deviceId": { + "name": "deviceId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "core_admin_sessions_token_idx": { + "name": "core_admin_sessions_token_idx", + "columns": [ + { + "expression": "token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_admin_sessions_user_id_idx": { + "name": "core_admin_sessions_user_id_idx", + "columns": [ + { + "expression": "userId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_admin_sessions_userId_core_users_id_fk": { + "name": "core_admin_sessions_userId_core_users_id_fk", + "tableFrom": "core_admin_sessions", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk": { + "name": "core_admin_sessions_deviceId_core_sessions_known_devices_id_fk", + "tableFrom": "core_admin_sessions", + "tableTo": "core_sessions_known_devices", + "columnsFrom": [ + "deviceId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_admin_sessions_token_unique": { + "name": "core_admin_sessions_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_languages": { + "name": "core_languages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "code": { + "name": "code", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "timezone": { + "name": "timezone", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "'UTC'" + }, + "protected": { + "name": "protected", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "default": { + "name": "default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "time24": { + "name": "time24", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "core_languages_code_idx": { + "name": "core_languages_code_idx", + "columns": [ + { + "expression": "code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_languages_name_idx": { + "name": "core_languages_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_languages_code_unique": { + "name": "core_languages_code_unique", + "nullsNotDistinct": false, + "columns": [ + "code" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_languages_words": { + "name": "core_languages_words", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "languageCode": { + "name": "languageCode", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pluginCode": { + "name": "pluginCode", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "itemId": { + "name": "itemId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tableName": { + "name": "tableName", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "variable": { + "name": "variable", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "core_languages_words_lang_code_idx": { + "name": "core_languages_words_lang_code_idx", + "columns": [ + { + "expression": "languageCode", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_languages_words_languageCode_core_languages_code_fk": { + "name": "core_languages_words_languageCode_core_languages_code_fk", + "tableFrom": "core_languages_words", + "tableTo": "core_languages", + "columnsFrom": [ + "languageCode" + ], + "columnsTo": [ + "code" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_logs": { + "name": "core_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "pluginId": { + "name": "pluginId", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "coreLogsType", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "ipAddress": { + "name": "ipAddress", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "method": { + "name": "method", + "type": "varchar(10)", + "primaryKey": false, + "notNull": true, + "default": "'GET'" + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'localhost'" + }, + "userAgent": { + "name": "userAgent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "statusCode": { + "name": "statusCode", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 500 + }, + "userId": { + "name": "userId", + "type": "bigint", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "core_logs_userId_core_users_id_fk": { + "name": "core_logs_userId_core_users_id_fk", + "tableFrom": "core_logs", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_moderators_permissions": { + "name": "core_moderators_permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "roleId": { + "name": "roleId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "protected": { + "name": "protected", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "core_moderators_permissions_role_id_idx": { + "name": "core_moderators_permissions_role_id_idx", + "columns": [ + { + "expression": "roleId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_moderators_permissions_user_id_idx": { + "name": "core_moderators_permissions_user_id_idx", + "columns": [ + { + "expression": "userId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_moderators_permissions_roleId_core_roles_id_fk": { + "name": "core_moderators_permissions_roleId_core_roles_id_fk", + "tableFrom": "core_moderators_permissions", + "tableTo": "core_roles", + "columnsFrom": [ + "roleId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "core_moderators_permissions_userId_core_users_id_fk": { + "name": "core_moderators_permissions_userId_core_users_id_fk", + "tableFrom": "core_moderators_permissions", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_roles": { + "name": "core_roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "protected": { + "name": "protected", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "default": { + "name": "default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "root": { + "name": "root", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "guest": { + "name": "guest", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "color": { + "name": "color", + "type": "varchar(19)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_sessions": { + "name": "core_sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expiresAt": { + "name": "expiresAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "deviceId": { + "name": "deviceId", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "core_sessions_user_id_idx": { + "name": "core_sessions_user_id_idx", + "columns": [ + { + "expression": "userId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_sessions_userId_core_users_id_fk": { + "name": "core_sessions_userId_core_users_id_fk", + "tableFrom": "core_sessions", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "core_sessions_deviceId_core_sessions_known_devices_id_fk": { + "name": "core_sessions_deviceId_core_sessions_known_devices_id_fk", + "tableFrom": "core_sessions", + "tableTo": "core_sessions_known_devices", + "columnsFrom": [ + "deviceId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_sessions_token_unique": { + "name": "core_sessions_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_sessions_known_devices": { + "name": "core_sessions_known_devices", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "publicId": { + "name": "publicId", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true + }, + "ipAddress": { + "name": "ipAddress", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "userAgent": { + "name": "userAgent", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "lastSeen": { + "name": "lastSeen", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "core_sessions_known_devices_ip_address_idx": { + "name": "core_sessions_known_devices_ip_address_idx", + "columns": [ + { + "expression": "ipAddress", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_sessions_known_devices_publicId_unique": { + "name": "core_sessions_known_devices_publicId_unique", + "nullsNotDistinct": false, + "columns": [ + "publicId" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_users": { + "name": "core_users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "nameCode": { + "name": "nameCode", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "newsletter": { + "name": "newsletter", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "avatarColor": { + "name": "avatarColor", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true + }, + "emailVerified": { + "name": "emailVerified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "roleId": { + "name": "roleId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "birthday": { + "name": "birthday", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ipAddress": { + "name": "ipAddress", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "language": { + "name": "language", + "type": "varchar(32)", + "primaryKey": false, + "notNull": true, + "default": "'en'" + } + }, + "indexes": { + "core_users_name_code_idx": { + "name": "core_users_name_code_idx", + "columns": [ + { + "expression": "nameCode", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_users_name_idx": { + "name": "core_users_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "core_users_email_idx": { + "name": "core_users_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_users_roleId_core_roles_id_fk": { + "name": "core_users_roleId_core_roles_id_fk", + "tableFrom": "core_users", + "tableTo": "core_roles", + "columnsFrom": [ + "roleId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "core_users_language_core_languages_code_fk": { + "name": "core_users_language_core_languages_code_fk", + "tableFrom": "core_users", + "tableTo": "core_languages", + "columnsFrom": [ + "language" + ], + "columnsTo": [ + "code" + ], + "onDelete": "set default", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_users_nameCode_unique": { + "name": "core_users_nameCode_unique", + "nullsNotDistinct": false, + "columns": [ + "nameCode" + ] + }, + "core_users_name_unique": { + "name": "core_users_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + }, + "core_users_email_unique": { + "name": "core_users_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_users_confirm_emails": { + "name": "core_users_confirm_emails", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires": { + "name": "expires", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "core_users_confirm_emails_userId_core_users_id_fk": { + "name": "core_users_confirm_emails_userId_core_users_id_fk", + "tableFrom": "core_users_confirm_emails", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_users_confirm_emails_token_unique": { + "name": "core_users_confirm_emails_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_users_forgot_password": { + "name": "core_users_forgot_password", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expiresAt": { + "name": "expiresAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "core_users_forgot_password_userId_core_users_id_fk": { + "name": "core_users_forgot_password_userId_core_users_id_fk", + "tableFrom": "core_users_forgot_password", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "core_users_forgot_password_userId_unique": { + "name": "core_users_forgot_password_userId_unique", + "nullsNotDistinct": false, + "columns": [ + "userId" + ] + }, + "core_users_forgot_password_token_unique": { + "name": "core_users_forgot_password_token_unique", + "nullsNotDistinct": false, + "columns": [ + "token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.core_users_sso": { + "name": "core_users_sso", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "providerId": { + "name": "providerId", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "providerAccountId": { + "name": "providerAccountId", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "core_users_sso_user_id_idx": { + "name": "core_users_sso_user_id_idx", + "columns": [ + { + "expression": "userId", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "core_users_sso_userId_core_users_id_fk": { + "name": "core_users_sso_userId_core_users_id_fk", + "tableFrom": "core_users_sso", + "tableTo": "core_users", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.blog_categories": { + "name": "blog_categories", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "titleSeo": { + "name": "titleSeo", + "type": "varchar(100)", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "blog_categories_titleSeo_unique": { + "name": "blog_categories_titleSeo_unique", + "nullsNotDistinct": false, + "columns": [ + "titleSeo" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.blog_posts": { + "name": "blog_posts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "titleSeo": { + "name": "titleSeo", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "blog_posts_categoryId_blog_categories_id_fk": { + "name": "blog_posts_categoryId_blog_categories_id_fk", + "tableFrom": "blog_posts", + "tableTo": "blog_categories", + "columnsFrom": [ + "categoryId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "blog_posts_titleSeo_unique": { + "name": "blog_posts_titleSeo_unique", + "nullsNotDistinct": false, + "columns": [ + "titleSeo" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": true + } + }, + "enums": { + "public.coreLogsType": { + "name": "coreLogsType", + "schema": "public", + "values": [ + "warn", + "error", + "debug" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/docs/migrations/meta/_journal.json b/apps/docs/migrations/meta/_journal.json new file mode 100644 index 000000000..4112a7b82 --- /dev/null +++ b/apps/docs/migrations/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1751481853472, + "tag": "0000_rapid_nick_fury", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/apps/docs/src/app/(home)/layout.tsx b/apps/docs/src/app/(home)/layout.tsx deleted file mode 100644 index 93555ad3f..000000000 --- a/apps/docs/src/app/(home)/layout.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import type { ReactNode } from 'react'; - -import { HomeLayout } from 'fumadocs-ui/layouts/home'; - -import { baseOptions } from '@/app/layout.config'; - -export default function Layout({ children }: { children: ReactNode }) { - return {children}; -} diff --git a/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx b/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx index 64a455228..8382dba9e 100644 --- a/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx +++ b/apps/docs/src/app/[locale]/(docs)/docs/layout.tsx @@ -1,48 +1,45 @@ import type { ReactNode } from 'react'; import { DocsLayout } from 'fumadocs-ui/layouts/notebook'; -import { RootProvider } from 'fumadocs-ui/provider'; -import { baseOptions } from '@/app/layout.config'; +import { baseOptions } from '@/app/[locale]/(main)/layout.config'; import { source } from '@/lib/source'; export default function Layout({ children }: { children: ReactNode }) { return ( - - - {node.icon} -
- ), - }; - }, + return { + ...option, + icon: ( +
+ {node.icon} +
+ ), + }; }, - }} - tree={source.pageTree} - > - {children} - - + }, + }} + tree={source.pageTree} + > + {children} + ); } diff --git a/apps/docs/src/app/(home)/page.tsx b/apps/docs/src/app/[locale]/(main)/(home)/page.tsx similarity index 100% rename from apps/docs/src/app/(home)/page.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/page.tsx diff --git a/apps/docs/src/app/(home)/sections/admin/admin.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/admin/admin.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/admin/admin.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/admin/admin.tsx diff --git a/apps/docs/src/app/(home)/sections/admin/debug_panel.png b/apps/docs/src/app/[locale]/(main)/(home)/sections/admin/debug_panel.png similarity index 100% rename from apps/docs/src/app/(home)/sections/admin/debug_panel.png rename to apps/docs/src/app/[locale]/(main)/(home)/sections/admin/debug_panel.png diff --git a/apps/docs/src/app/(home)/sections/call-to-action.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/call-to-action.tsx similarity index 92% rename from apps/docs/src/app/(home)/sections/call-to-action.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/call-to-action.tsx index b983d8a49..f0bda8b68 100644 --- a/apps/docs/src/app/(home)/sections/call-to-action.tsx +++ b/apps/docs/src/app/[locale]/(main)/(home)/sections/call-to-action.tsx @@ -1,7 +1,7 @@ import { Card } from '@vitnode/core/components/ui/card'; import { cn } from '@vitnode/core/lib/utils'; -import { CodeBlock } from '../../../components/fumadocs/code-block'; +import { CodeBlock } from '../../../../../components/fumadocs/code-block'; export const CallToActionSection = () => { return ( diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/drizzleorm.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/drizzleorm.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/drizzleorm.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/honojs.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/honojs.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/honojs.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/honojs.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/next-intl.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/next-intl.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/next-intl.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/next-intl.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/nextjs.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/nextjs.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/nextjs.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/nextjs.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/postgresql.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/postgresql.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/postgresql.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/logos/tailwindcss.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/tailwindcss.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/logos/tailwindcss.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/logos/tailwindcss.tsx diff --git a/apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx b/apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/powering-by.tsx similarity index 100% rename from apps/docs/src/app/(home)/sections/powering-by/powering-by.tsx rename to apps/docs/src/app/[locale]/(main)/(home)/sections/powering-by/powering-by.tsx diff --git a/apps/docs/src/app/layout.client.tsx b/apps/docs/src/app/[locale]/(main)/layout.client.tsx similarity index 79% rename from apps/docs/src/app/layout.client.tsx rename to apps/docs/src/app/[locale]/(main)/layout.client.tsx index 474a007d7..711ebecd9 100644 --- a/apps/docs/src/app/layout.client.tsx +++ b/apps/docs/src/app/[locale]/(main)/layout.client.tsx @@ -11,12 +11,12 @@ export function useMode(): string | undefined { export function Body({ children, + className, }: { children: React.ReactNode; + className?: string; }): React.ReactElement { const mode = useMode(); - return ( - {children} - ); + return {children}; } diff --git a/apps/docs/src/app/layout.config.tsx b/apps/docs/src/app/[locale]/(main)/layout.config.tsx similarity index 96% rename from apps/docs/src/app/layout.config.tsx rename to apps/docs/src/app/[locale]/(main)/layout.config.tsx index c88059144..ceda38f48 100644 --- a/apps/docs/src/app/layout.config.tsx +++ b/apps/docs/src/app/[locale]/(main)/layout.config.tsx @@ -9,6 +9,7 @@ import { LogoVitNode } from '@/components/logo-vitnode'; * Home Layout: app/(home)/layout.tsx * Docs Layout: app/docs/layout.tsx */ +// TODO: Remove this export const baseOptions: BaseLayoutProps = { githubUrl: 'https://github.com/VitNode/vitnode', nav: { diff --git a/apps/docs/src/app/[locale]/(main)/layout.tsx b/apps/docs/src/app/[locale]/(main)/layout.tsx index 086bc3368..c8fdf9759 100644 --- a/apps/docs/src/app/[locale]/(main)/layout.tsx +++ b/apps/docs/src/app/[locale]/(main)/layout.tsx @@ -1,3 +1,13 @@ +// import type { ReactNode } from 'react'; + +// import { HomeLayout } from 'fumadocs-ui/layouts/home'; + +// import { baseOptions } from '@/app/layout.config'; + +// export default function Layout({ children }: { children: ReactNode }) { +// return {children}; +// } + import { LogoVitNode } from '@vitnode/core/components/logo-vitnode'; import { ThemeLayout } from '@vitnode/core/views/layouts/theme/layout'; diff --git a/apps/docs/src/app/[locale]/layout.tsx b/apps/docs/src/app/[locale]/layout.tsx index f830831ba..15df66531 100644 --- a/apps/docs/src/app/[locale]/layout.tsx +++ b/apps/docs/src/app/[locale]/layout.tsx @@ -5,10 +5,13 @@ import { generateMetadataRootLayout, RootLayout, } from '@vitnode/core/views/layouts/root-layout'; +import { RootProvider } from 'fumadocs-ui/provider'; import { Geist, Geist_Mono } from 'next/font/google'; import { vitNodeConfig } from '@/vitnode.config'; +import { Body } from './(main)/layout.client'; + const geistSans = Geist({ variable: '--font-geist-sans', subsets: ['latin'], @@ -25,12 +28,18 @@ export const generateMetadata = (): Metadata => export const generateStaticParams = () => vitNodeConfig.i18n.locales.map(locale => ({ locale: locale.code })); -export default function LocaleLayout(props: RootLayoutProps) { +export default async function LocaleLayout(props: RootLayoutProps) { + const { locale } = await props.params; + return ( - + + + + + + + ); } diff --git a/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/layout.tsx b/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/layout.tsx new file mode 100644 index 000000000..086bc3368 --- /dev/null +++ b/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/layout.tsx @@ -0,0 +1,15 @@ +import { LogoVitNode } from '@vitnode/core/components/logo-vitnode'; +import { ThemeLayout } from '@vitnode/core/views/layouts/theme/layout'; + +import { vitNodeConfig } from '../../../vitnode.config'; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + } + vitNodeConfig={vitNodeConfig} + > + {children} + + ); +} diff --git a/apps/docs/src/app/[locale]/(main)/page.tsx b/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/page.tsx similarity index 100% rename from apps/docs/src/app/[locale]/(main)/page.tsx rename to packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/(main)/page.tsx diff --git a/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/layout.tsx b/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/layout.tsx new file mode 100644 index 000000000..d17d102f1 --- /dev/null +++ b/packages/create-vitnode-app/copy-of-vitnode-app/root/src/[locale]/layout.tsx @@ -0,0 +1,40 @@ +import type { RootLayoutProps } from '@vitnode/core/views/layouts/root-layout'; +import type { Metadata } from 'next'; + +import { + generateMetadataRootLayout, + RootLayout, +} from '@vitnode/core/views/layouts/root-layout'; +import { Geist, Geist_Mono } from 'next/font/google'; + +import { vitNodeConfig } from '@/vitnode.config'; + +const geistSans = Geist({ + variable: '--font-geist-sans', + subsets: ['latin'], +}); + +const geistMono = Geist_Mono({ + variable: '--font-geist-mono', + subsets: ['latin'], +}); + +export const generateMetadata = (): Metadata => + generateMetadataRootLayout(vitNodeConfig); + +export const generateStaticParams = () => + vitNodeConfig.i18n.locales.map(locale => ({ locale: locale.code })); + +export default async function LocaleLayout(props: RootLayoutProps) { + const { locale } = await props.params; + + return ( + + + + + + ); +} diff --git a/packages/vitnode/src/views/layouts/root-layout.tsx b/packages/vitnode/src/views/layouts/root-layout.tsx index 472313315..8e209ea4b 100644 --- a/packages/vitnode/src/views/layouts/root-layout.tsx +++ b/packages/vitnode/src/views/layouts/root-layout.tsx @@ -30,28 +30,19 @@ export const generateMetadataRootLayout = ({ export const RootLayout = async ({ children, - className, params, - head, config, }: RootLayoutProps & { - className?: string; config: VitNodeConfig; - head?: React.ReactNode; }) => { const { locale } = await params; setRequestLocale(locale); return ( - - {head && {head}} - - - - {children} - - - - + + + {children} + + ); }; diff --git a/scripts/files/file-copy-manager.ts b/scripts/files/file-copy-manager.ts index 5839790b0..8284e51df 100644 --- a/scripts/files/file-copy-manager.ts +++ b/scripts/files/file-copy-manager.ts @@ -50,7 +50,9 @@ export class FileCopyManager { async copyFiles(sourcePath: string, destPath: string): Promise { // Define files and directories to copy (relative paths) const filesToCopy = [ - 'src/app/[locale]', + 'src/app/[locale]/(main)/[...rest]', + 'src/app/[locale]/(main)/not-found.tsx', + 'src/app/[locale]/(admin)', 'src/app/favicon.ico', 'src/app/global-error.tsx', 'src/app/global.css',