diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1d631f4a7dc2c..bba0b0d3e3af6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,8 +8,6 @@ /apps/studio/ @supabase/Dashboard -/apps/cms/ @supabase/marketing - /apps/www/ @supabase/marketing /apps/www/public/images/blog @supabase/marketing /apps/www/lib/redirects.js diff --git a/.prettierignore b/.prettierignore index b00f30d32e4a9..e65459c8c023e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -24,10 +24,5 @@ apps/ui-library/public/r apps/**/.contentlayer # invalid JSON file packages/ui/src/components/Form/examples/PhoneProvidersSchema.json -apps/cms/config/api.ts -# files auto-generated by payload cms -apps/cms/src/app/* -apps/cms/src/migrations/* -apps/cms/src/payload-types.ts # ignore because of

apps/www/_blog/2025-07-14-supabase-ui-platform-kit.mdx diff --git a/apps/cms/.env b/apps/cms/.env deleted file mode 100644 index 5972f7950940e..0000000000000 --- a/apps/cms/.env +++ /dev/null @@ -1,15 +0,0 @@ -# [LOCAL ENV] - NEVER USE PROD VALUES LOCALLY -# as editing PayloadCMS typescript config INSTANTLY CHANGES DB SCHEMA in dev mode -# The values set here are the default values provided when running `supabase start`. -# Do not add secrets here, this file is git-tracked. Use .env.local instead. -DATABASE_URI=postgresql://postgres:postgres@127.0.0.1:34322/postgres -PAYLOAD_SECRET=secret - -S3_BUCKET=cms -S3_ACCESS_KEY_ID=625729a08b95bf1b7ff351a663f3a23c -S3_SECRET_ACCESS_KEY=850181e4652dd023b7a98c58ae0d2d34bd487ee0cc3254aed6eda37307425907 -S3_REGION=local -S3_ENDPOINT=http://127.0.0.1:34321/storage/v1/s3 - -CRON_SECRET=secret -PREVIEW_SECRET=secret \ No newline at end of file diff --git a/apps/cms/.gitignore b/apps/cms/.gitignore deleted file mode 100644 index 954563c7fcb43..0000000000000 --- a/apps/cms/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -/.idea/* -!/.idea/runConfigurations - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -!.env -.env.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -/media diff --git a/apps/cms/.vercelignore b/apps/cms/.vercelignore deleted file mode 100644 index 3b3aaed4c819c..0000000000000 --- a/apps/cms/.vercelignore +++ /dev/null @@ -1,48 +0,0 @@ -# Dependencies -node_modules -**/node_modules - -# Build artifacts -.next/cache -.turbo -.eslintcache - -# Development files -*.log -.env.local -.env.*.local - -# Test files -**/*.test.* -**/*.spec.* -__tests__ -**/__tests__ -coverage - -# Documentation -README.md -*.md -docs - -# IDE files -.vscode -.idea -*.swp -*.swo - -# OS files -.DS_Store -Thumbs.db - -# Other apps (since we're only deploying CMS) -../studio -../www -../docs -../design-system -../ui-library -../../examples -../../tests -../../supabase -../../packages/ui-patterns -../../packages/ui -../../packages/shared-data \ No newline at end of file diff --git a/apps/cms/Dockerfile b/apps/cms/Dockerfile deleted file mode 100644 index 93465cfa57acc..0000000000000 --- a/apps/cms/Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -# To use this Dockerfile, you have to set `output: 'standalone'` in your next.config.mjs file. -# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile - -FROM node:22.12.0-alpine AS base - -# Install dependencies only when needed -FROM base AS deps -# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat -WORKDIR /app - -# Install dependencies based on the preferred package manager -COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ -RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi - - -# Rebuild the source code only when needed -FROM base AS builder -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules -COPY . . - -# Next.js collects completely anonymous telemetry data about general usage. -# Learn more here: https://nextjs.org/telemetry -# Uncomment the following line in case you want to disable telemetry during the build. -# ENV NEXT_TELEMETRY_DISABLED 1 - -RUN \ - if [ -f yarn.lock ]; then yarn run build; \ - elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ - else echo "Lockfile not found." && exit 1; \ - fi - -# Production image, copy all the files and run next -FROM base AS runner -WORKDIR /app - -ENV NODE_ENV production -# Uncomment the following line in case you want to disable telemetry during runtime. -# ENV NEXT_TELEMETRY_DISABLED 1 - -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs - -# Remove this line if you do not have this folder -COPY --from=builder /app/public ./public - -# Set the correct permission for prerender cache -RUN mkdir .next -RUN chown nextjs:nodejs .next - -# Automatically leverage output traces to reduce image size -# https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static - -USER nextjs - -EXPOSE 3000 - -ENV PORT 3000 - -# server.js is created by next build from the standalone output -# https://nextjs.org/docs/pages/api-reference/next-config-js/output -CMD HOSTNAME="0.0.0.0" node server.js diff --git a/apps/cms/README.md b/apps/cms/README.md deleted file mode 100644 index f910262ecbd71..0000000000000 --- a/apps/cms/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Payload CMS - -### Local Development - -1. run `cd apps/cms && supabase start` to start the local supabase project -2. run `cp .env.example .env` to copy the example environment variables and update the variables. You'll need to add the `S3_` variables to your `.env` to use Supabase Storage -3. `pnpm install && pnpm generate:importmap` to install dependencies and start the dev server -4. run `pnpm dev` in the apps/cms folder or `pnpm dev:cms` from the root -5. open `http://localhost:3030` to open the app in your browser - -Follow the on-screen instructions to login and create the first admin user. - -### Collections - -Collections are what data looks like in the Payload cms schema. The following are the collections currently configured in the app. - -- Authors -- Categories -- Events -- Media -- Posts -- Tags -- Users diff --git a/apps/cms/docker-compose.yml b/apps/cms/docker-compose.yml deleted file mode 100644 index a475be621b0b6..0000000000000 --- a/apps/cms/docker-compose.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3' - -services: - payload: - image: node:18-alpine - ports: - - '3030:3030' - volumes: - - .:/home/node/app - - node_modules:/home/node/app/node_modules - working_dir: /home/node/app/ - command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev" - depends_on: - - postgres - env_file: - - .env - - # Uncomment the following to use postgres - postgres: - restart: always - image: postgres:latest - volumes: - - pgdata:/var/lib/postgresql/data - ports: - - "5432:5432" - -volumes: - data: - # pgdata: - node_modules: diff --git a/apps/cms/eslint.config.cjs b/apps/cms/eslint.config.cjs deleted file mode 100644 index fec3ac9b3ab84..0000000000000 --- a/apps/cms/eslint.config.cjs +++ /dev/null @@ -1,4 +0,0 @@ -const { defineConfig } = require('eslint/config') -const supabaseConfig = require('eslint-config-supabase/next') - -module.exports = defineConfig([supabaseConfig]) diff --git a/apps/cms/next.config.mjs b/apps/cms/next.config.mjs deleted file mode 100644 index 092c737bfb8b1..0000000000000 --- a/apps/cms/next.config.mjs +++ /dev/null @@ -1,54 +0,0 @@ -import { withPayload } from '@payloadcms/next/withPayload' - -const redirects = async () => { - const internetExplorerRedirect = { - destination: '/ie-incompatible.html', - has: [ - { - type: 'header', - key: 'user-agent', - value: '(.*Trident.*)', // all ie browsers - }, - ], - permanent: false, - source: '/:path((?!ie-incompatible.html$).*)', // all pages except the incompatibility page - } - - const redirects = [internetExplorerRedirect] - - return redirects -} - -const WWW_SITE_ORIGIN = - process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' - ? 'https://supabase.com' - : process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL && - typeof process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL === 'string' - ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.replace('cms-git-', 'zone-www-dot-com-git-')}` - : 'http://localhost:3000' - -/** @type {import('next').NextConfig} */ -const nextConfig = { - images: { - remotePatterns: [ - ...[WWW_SITE_ORIGIN /* 'https://example.com' */].map((item) => { - const url = new URL(item) - - return { - hostname: url.hostname, - protocol: url.protocol?.replace(':', ''), - } - }), - ], - }, - reactStrictMode: true, - redirects, - eslint: { - // We are already running linting via GH action, this will skip linting during production build on Vercel - ignoreDuringBuilds: true, - }, - // Configure Sharp as an external package for server-side rendering - serverExternalPackages: ['sharp'], -} - -export default withPayload(nextConfig, { devBundleServerPackages: false }) diff --git a/apps/cms/package.json b/apps/cms/package.json deleted file mode 100644 index e6d0e43dc938d..0000000000000 --- a/apps/cms/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "cms", - "version": "1.0.0", - "description": "Payload CMS for Supabase", - "license": "MIT", - "scripts": { - "build": "cross-env NODE_OPTIONS=--no-deprecation next build --turbopack", - "ci": "pnpm migrate && pnpm build", - "clean": "rimraf node_modules .next", - "dev": "cross-env NODE_OPTIONS=--no-deprecation next dev --turbopack --port 3030", - "dev:prod": "cross-env NODE_OPTIONS=--no-deprecation rm -rf .next && pnpm build && pnpm start", - "devsafe": "rm -rf .next && cross-env NODE_OPTIONS=--no-deprecation next dev", - "generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", - "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", - "lint": "eslint .", - "migrate": "cross-env NODE_OPTIONS=--no-deprecation tsx scripts/migrate.ts", - "payload": "cross-env NODE_OPTIONS=--no-deprecation payload", - "start": "cross-env NODE_OPTIONS=--no-deprecation next start", - "vercel-build": "pnpm migrate && pnpm build", - "typecheck": "tsc --noEmit" - }, - "dependencies": { - "@payloadcms/admin-bar": "^3.52.0", - "@payloadcms/db-postgres": "^3.73.0", - "@payloadcms/live-preview-react": "^3.52.0", - "@payloadcms/next": "3.52.0", - "@payloadcms/payload-cloud": "3.60.0", - "@payloadcms/plugin-form-builder": "3.52.0", - "@payloadcms/plugin-nested-docs": "3.52.0", - "@payloadcms/plugin-seo": "3.52.0", - "@payloadcms/richtext-lexical": "3.52.0", - "@payloadcms/storage-s3": "3.52.0", - "@payloadcms/ui": "3.52.0", - "@radix-ui/react-checkbox": "^1.3.2", - "@radix-ui/react-label": "^2.1.7", - "@radix-ui/react-select": "^2.0.0", - "@radix-ui/react-slot": "^1.2.3", - "@types/node": "catalog:", - "@types/react": "catalog:", - "@types/react-dom": "catalog:", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "common": "workspace:*", - "config": "workspace:*", - "cross-env": "^7.0.3", - "eslint-config-supabase": "workspace:*", - "graphql": "^16.11.0", - "image-size": "2.0.2", - "lucide-react": "^0.511.0", - "next": "catalog:", - "payload": "3.52.0", - "pg": "^8.16.3", - "prism-react-renderer": "^2.3.1", - "react": "catalog:", - "react-dom": "catalog:", - "sharp": "~0.34.5", - "tailwind-merge": "^1.13.2", - "tsx": "catalog:", - "typescript": "catalog:" - }, - "externals": { - "sharp": "commonjs sharp" - } -} diff --git a/apps/cms/scripts/migrate.ts b/apps/cms/scripts/migrate.ts deleted file mode 100644 index f0b0d17c9d6f4..0000000000000 --- a/apps/cms/scripts/migrate.ts +++ /dev/null @@ -1,29 +0,0 @@ -import payload from 'payload' - -// Use a minimal config for migrations to avoid importing the full app graph during build -import payloadConfig from '../src/payload.migrate.config.ts' - -async function run() { - try { - await payload.init({ config: payloadConfig }) - - // Ensure non-interactive: remove any dev-mode migration sentinel rows - try { - await payload.delete({ - collection: 'payload-migrations', - where: { batch: { equals: -1 } }, - }) - } catch {} - - await payload.db.migrate() - // eslint-disable-next-line no-console - console.log('✅ Payload migrations complete') - process.exit(0) - } catch (err) { - // eslint-disable-next-line no-console - console.error('❌ Payload migrations failed:', err) - process.exit(1) - } -} - -run() diff --git a/apps/cms/src/access/isAdmin.ts b/apps/cms/src/access/isAdmin.ts deleted file mode 100644 index cb8123e95fb67..0000000000000 --- a/apps/cms/src/access/isAdmin.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { AccessArgs, FieldAccess } from 'payload' - -import type { User } from '../payload-types' - -type isAdmin = (args: AccessArgs) => boolean - -export const isAdmin: isAdmin = ({ req: { user } }) => { - // Return true or false based on if the user has an admin role - return Boolean(user?.roles?.includes('admin')) -} - -export const isAdminFieldLevel: FieldAccess<{ id: string }, User> = ({ req: { user } }) => { - // Return true or false based on if the user has an admin role - return Boolean(user?.roles?.includes('admin')) -} diff --git a/apps/cms/src/access/isAdminOrSelf.ts b/apps/cms/src/access/isAdminOrSelf.ts deleted file mode 100644 index ad0c05e8abb4d..0000000000000 --- a/apps/cms/src/access/isAdminOrSelf.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Access } from 'payload' - -export const isAdminOrSelf: Access = ({ req: { user } }) => { - // Need to be logged in - if (user) { - // If user has role of 'admin' - if (user.roles?.includes('admin')) { - return true - } - - // If any other type of user, only provide access to themselves - return { - id: { - equals: user.id, - }, - } - } - - // Reject everyone else - return false -} diff --git a/apps/cms/src/access/isAnyone.ts b/apps/cms/src/access/isAnyone.ts deleted file mode 100644 index beb086b46c3ee..0000000000000 --- a/apps/cms/src/access/isAnyone.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Access } from 'payload' - -export const isAnyone: Access = () => true diff --git a/apps/cms/src/access/isAuthenticated.ts b/apps/cms/src/access/isAuthenticated.ts deleted file mode 100644 index 62d467a63e9e0..0000000000000 --- a/apps/cms/src/access/isAuthenticated.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { AccessArgs } from 'payload' - -import type { User } from '../payload-types' - -type isAuthenticated = (args: AccessArgs) => boolean - -export const isAuthenticated: isAuthenticated = ({ req: { user } }) => { - return Boolean(user) -} diff --git a/apps/cms/src/app/(frontend)/layout.tsx b/apps/cms/src/app/(frontend)/layout.tsx deleted file mode 100644 index 8d03e9142969e..0000000000000 --- a/apps/cms/src/app/(frontend)/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react' -import './styles.css' - -export const metadata = { - description: 'Content Management System for the Supabase website', - title: 'Supabase CMS', -} - -export default async function RootLayout(props: { children: React.ReactNode }) { - const { children } = props - - return ( - - -
{children}
- - - ) -} diff --git a/apps/cms/src/app/(frontend)/page.tsx b/apps/cms/src/app/(frontend)/page.tsx deleted file mode 100644 index a136f82f8b193..0000000000000 --- a/apps/cms/src/app/(frontend)/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from 'next/navigation' - -export default async function HomePage() { - redirect('/admin') -} diff --git a/apps/cms/src/app/(frontend)/styles.css b/apps/cms/src/app/(frontend)/styles.css deleted file mode 100644 index d1fb9419d6f8c..0000000000000 --- a/apps/cms/src/app/(frontend)/styles.css +++ /dev/null @@ -1,164 +0,0 @@ -:root { - --font-mono: 'Roboto Mono', monospace; -} - -* { - box-sizing: border-box; -} - -html { - font-size: 18px; - line-height: 32px; - - background: rgb(0, 0, 0); - -webkit-font-smoothing: antialiased; -} - -html, -body, -#app { - height: 100%; -} - -body { - font-family: system-ui; - font-size: 18px; - line-height: 32px; - - margin: 0; - color: rgb(1000, 1000, 1000); - - @media (max-width: 1024px) { - font-size: 15px; - line-height: 24px; - } -} - -img { - max-width: 100%; - height: auto; - display: block; -} - -h1 { - margin: 40px 0; - font-size: 64px; - line-height: 70px; - font-weight: bold; - - @media (max-width: 1024px) { - margin: 24px 0; - font-size: 42px; - line-height: 42px; - } - - @media (max-width: 768px) { - font-size: 38px; - line-height: 38px; - } - - @media (max-width: 400px) { - font-size: 32px; - line-height: 32px; - } -} - -p { - margin: 24px 0; - - @media (max-width: 1024px) { - margin: calc(var(--base) * 0.75) 0; - } -} - -a { - color: currentColor; - - &:focus { - opacity: 0.8; - outline: none; - } - - &:active { - opacity: 0.7; - outline: none; - } -} - -svg { - vertical-align: middle; -} - -.home { - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - height: 100vh; - padding: 45px; - max-width: 1024px; - margin: 0 auto; - overflow: hidden; - - @media (max-width: 400px) { - padding: 24px; - } - - .content { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - flex-grow: 1; - - h1 { - text-align: center; - } - } - - .links { - display: flex; - align-items: center; - gap: 12px; - - a { - text-decoration: none; - padding: 0.25rem 0.5rem; - border-radius: 4px; - } - - .admin { - color: rgb(0, 0, 0); - background: rgb(1000, 1000, 1000); - border: 1px solid rgb(0, 0, 0); - } - - .docs { - color: rgb(1000, 1000, 1000); - background: rgb(0, 0, 0); - border: 1px solid rgb(1000, 1000, 1000); - } - } - - .footer { - display: flex; - align-items: center; - gap: 8px; - - @media (max-width: 1024px) { - flex-direction: column; - gap: 6px; - } - - p { - margin: 0; - } - - .codeLink { - text-decoration: none; - padding: 0 0.5rem; - background: rgb(60, 60, 60); - border-radius: 4px; - } - } -} diff --git a/apps/cms/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/apps/cms/src/app/(payload)/admin/[[...segments]]/not-found.tsx deleted file mode 100644 index 64108365fd93c..0000000000000 --- a/apps/cms/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ /dev/null @@ -1,24 +0,0 @@ -/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import type { Metadata } from 'next' - -import config from '@payload-config' -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' -import { importMap } from '../importMap' - -type Args = { - params: Promise<{ - segments: string[] - }> - searchParams: Promise<{ - [key: string]: string | string[] - }> -} - -export const generateMetadata = ({ params, searchParams }: Args): Promise => - generatePageMetadata({ config, params, searchParams }) - -const NotFound = ({ params, searchParams }: Args) => - NotFoundPage({ config, params, searchParams, importMap }) - -export default NotFound diff --git a/apps/cms/src/app/(payload)/admin/[[...segments]]/page.tsx b/apps/cms/src/app/(payload)/admin/[[...segments]]/page.tsx deleted file mode 100644 index 0de685cd62bc1..0000000000000 --- a/apps/cms/src/app/(payload)/admin/[[...segments]]/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import type { Metadata } from 'next' - -import config from '@payload-config' -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' -import { importMap } from '../importMap' - -type Args = { - params: Promise<{ - segments: string[] - }> - searchParams: Promise<{ - [key: string]: string | string[] - }> -} - -export const generateMetadata = ({ params, searchParams }: Args): Promise => - generatePageMetadata({ config, params, searchParams }) - -const Page = ({ params, searchParams }: Args) => - RootPage({ config, params, searchParams, importMap }) - -export default Page diff --git a/apps/cms/src/app/(payload)/admin/importMap.js b/apps/cms/src/app/(payload)/admin/importMap.js deleted file mode 100644 index ab697bf4c47ab..0000000000000 --- a/apps/cms/src/app/(payload)/admin/importMap.js +++ /dev/null @@ -1,43 +0,0 @@ -import { SlugComponent as SlugComponent_92cc057d0a2abb4f6cf0307edf59f986 } from '@/fields/slug/SlugComponent' -import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { LexicalDiffComponent as LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { HorizontalRuleFeatureClient as HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { FixedToolbarFeatureClient as FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { BlocksFeatureClient as BlocksFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { ParagraphFeatureClient as ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { LinkFeatureClient as LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { OverviewComponent as OverviewComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client' -import { MetaTitleComponent as MetaTitleComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client' -import { MetaImageComponent as MetaImageComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client' -import { MetaDescriptionComponent as MetaDescriptionComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client' -import { PreviewComponent as PreviewComponent_a8a977ebc872c5d5ea7ee689724c0860 } from '@payloadcms/plugin-seo/client' -import { S3ClientUploadHandler as S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 } from '@payloadcms/storage-s3/client' - -export const importMap = { - "@/fields/slug/SlugComponent#SlugComponent": SlugComponent_92cc057d0a2abb4f6cf0307edf59f986, - "@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/rsc#LexicalDiffComponent": LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/client#HorizontalRuleFeatureClient": HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#FixedToolbarFeatureClient": FixedToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#BlocksFeatureClient": BlocksFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ParagraphFeatureClient": ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#LinkFeatureClient": LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/plugin-seo/client#OverviewComponent": OverviewComponent_a8a977ebc872c5d5ea7ee689724c0860, - "@payloadcms/plugin-seo/client#MetaTitleComponent": MetaTitleComponent_a8a977ebc872c5d5ea7ee689724c0860, - "@payloadcms/plugin-seo/client#MetaImageComponent": MetaImageComponent_a8a977ebc872c5d5ea7ee689724c0860, - "@payloadcms/plugin-seo/client#MetaDescriptionComponent": MetaDescriptionComponent_a8a977ebc872c5d5ea7ee689724c0860, - "@payloadcms/plugin-seo/client#PreviewComponent": PreviewComponent_a8a977ebc872c5d5ea7ee689724c0860, - "@payloadcms/storage-s3/client#S3ClientUploadHandler": S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 -} diff --git a/apps/cms/src/app/(payload)/api/[...slug]/route.ts b/apps/cms/src/app/(payload)/api/[...slug]/route.ts deleted file mode 100644 index e58c50f50cade..0000000000000 --- a/apps/cms/src/app/(payload)/api/[...slug]/route.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import config from '@payload-config' -import '@payloadcms/next/css' -import { - REST_DELETE, - REST_GET, - REST_OPTIONS, - REST_PATCH, - REST_POST, - REST_PUT, -} from '@payloadcms/next/routes' - -export const GET = REST_GET(config) -export const POST = REST_POST(config) -export const DELETE = REST_DELETE(config) -export const PATCH = REST_PATCH(config) -export const PUT = REST_PUT(config) -export const OPTIONS = REST_OPTIONS(config) diff --git a/apps/cms/src/app/(payload)/custom.scss b/apps/cms/src/app/(payload)/custom.scss deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/apps/cms/src/app/(payload)/layout.tsx b/apps/cms/src/app/(payload)/layout.tsx deleted file mode 100644 index 8df141aeb2b24..0000000000000 --- a/apps/cms/src/app/(payload)/layout.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import config from '@payload-config' -import '@payloadcms/next/css' -import type { ServerFunctionClient } from 'payload' -import { handleServerFunctions, RootLayout } from '@payloadcms/next/layouts' -import React from 'react' - -import { importMap } from './admin/importMap.js' -import './custom.scss' - -type Args = { - children: React.ReactNode -} - -const serverFunction: ServerFunctionClient = async function (args) { - 'use server' - return handleServerFunctions({ - ...args, - config, - importMap, - }) -} - -const Layout = ({ children }: Args) => ( - - {children} - -) - -export default Layout diff --git a/apps/cms/src/app/my-route/route.ts b/apps/cms/src/app/my-route/route.ts deleted file mode 100644 index a6422f3733485..0000000000000 --- a/apps/cms/src/app/my-route/route.ts +++ /dev/null @@ -1,14 +0,0 @@ -import configPromise from '@payload-config' -import { getPayload } from 'payload' - -export const GET = async () => { - const payload = await getPayload({ - config: configPromise, - }) - - const data = await payload.find({ - collection: 'users', - }) - - return Response.json(data) -} diff --git a/apps/cms/src/blocks/Banner/Component.tsx b/apps/cms/src/blocks/Banner/Component.tsx deleted file mode 100644 index ec5fd59dcac3c..0000000000000 --- a/apps/cms/src/blocks/Banner/Component.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react' - -import RichText from '@/components/RichText' -import type { BannerBlock as BannerBlockProps } from '@/payload-types' -import { cn } from '@/utilities/ui' - -type Props = { - className?: string -} & BannerBlockProps - -export const BannerBlock: React.FC = ({ className, content, style }) => { - return ( -
-
- -
-
- ) -} diff --git a/apps/cms/src/blocks/Banner/config.ts b/apps/cms/src/blocks/Banner/config.ts deleted file mode 100644 index 5bfdc1aa1a371..0000000000000 --- a/apps/cms/src/blocks/Banner/config.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - FixedToolbarFeature, - InlineToolbarFeature, - lexicalEditor, -} from '@payloadcms/richtext-lexical' -import type { Block } from 'payload' - -export const Banner: Block = { - slug: 'banner', - fields: [ - { - name: 'style', - type: 'select', - defaultValue: 'info', - options: [ - { label: 'Info', value: 'info' }, - { label: 'Warning', value: 'warning' }, - { label: 'Error', value: 'error' }, - { label: 'Success', value: 'success' }, - ], - required: true, - }, - { - name: 'content', - type: 'richText', - editor: lexicalEditor({ - features: ({ rootFeatures }) => { - return [...rootFeatures, FixedToolbarFeature(), InlineToolbarFeature()] - }, - }), - label: false, - required: true, - }, - ], - interfaceName: 'BannerBlock', -} diff --git a/apps/cms/src/blocks/Code/Component.client.tsx b/apps/cms/src/blocks/Code/Component.client.tsx deleted file mode 100644 index 93901f5220614..0000000000000 --- a/apps/cms/src/blocks/Code/Component.client.tsx +++ /dev/null @@ -1,35 +0,0 @@ -'use client' - -import { Highlight, themes } from 'prism-react-renderer' -import React from 'react' - -import { CopyButton } from './CopyButton' - -type Props = { - code: string - language?: string -} - -export const Code: React.FC = ({ code, language = '' }) => { - if (!code) return null - - return ( - - {({ getLineProps, getTokenProps, tokens }) => ( -
-          {tokens.map((line, i) => (
-            
- {i + 1} - - {line.map((token, key) => ( - - ))} - -
- ))} - -
- )} -
- ) -} diff --git a/apps/cms/src/blocks/Code/Component.tsx b/apps/cms/src/blocks/Code/Component.tsx deleted file mode 100644 index 7f776d74de339..0000000000000 --- a/apps/cms/src/blocks/Code/Component.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react' - -import { Code } from './Component.client' - -export type CodeBlockProps = { - code: string - language?: string - blockType: 'code' -} - -type Props = CodeBlockProps & { - className?: string -} - -export const CodeBlock: React.FC = ({ className, code, language }) => { - return ( -
- -
- ) -} diff --git a/apps/cms/src/blocks/Code/CopyButton.tsx b/apps/cms/src/blocks/Code/CopyButton.tsx deleted file mode 100644 index 3af833cb68dfe..0000000000000 --- a/apps/cms/src/blocks/Code/CopyButton.tsx +++ /dev/null @@ -1,35 +0,0 @@ -'use client' - -import { CopyIcon } from '@payloadcms/ui/icons/Copy' -import { useState } from 'react' - -import { Button } from '@/components/ui/button' - -export function CopyButton({ code }: { code: string }) { - const [text, setText] = useState('Copy') - - function updateCopyStatus() { - if (text === 'Copy') { - setText(() => 'Copied!') - setTimeout(() => { - setText(() => 'Copy') - }, 1000) - } - } - - return ( -
- -
- ) -} diff --git a/apps/cms/src/blocks/Code/config.ts b/apps/cms/src/blocks/Code/config.ts deleted file mode 100644 index 98a81114197b8..0000000000000 --- a/apps/cms/src/blocks/Code/config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { Block } from 'payload' - -export const Code: Block = { - slug: 'code', - interfaceName: 'CodeBlock', - fields: [ - { - name: 'language', - type: 'select', - defaultValue: 'typescript', - options: [ - { - label: 'SQL', - value: 'sql', - }, - { - label: 'JSON', - value: 'json', - }, - { - label: 'bash', - value: 'bash', - }, - { - label: 'Javascript', - value: 'js', - }, - { - label: 'Typescript', - value: 'ts', - }, - { - label: 'tsx', - value: 'tsx', - }, - { - label: 'Python', - value: 'py', - }, - { - label: 'kotlin', - value: 'kotlin', - }, - { - label: 'yaml', - value: 'yaml', - }, - ], - }, - { - name: 'code', - type: 'code', - label: false, - required: true, - }, - ], -} diff --git a/apps/cms/src/blocks/MediaBlock/Component.tsx b/apps/cms/src/blocks/MediaBlock/Component.tsx deleted file mode 100644 index 21ed856bd2dfd..0000000000000 --- a/apps/cms/src/blocks/MediaBlock/Component.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import type { StaticImageData } from 'next/image' -import React from 'react' - -import { Media } from '../../components/Media' -import RichText from '@/components/RichText' -import type { MediaBlock as MediaBlockProps } from '@/payload-types' -import { cn } from '@/utilities/ui' - -type Props = MediaBlockProps & { - breakout?: boolean - captionClassName?: string - className?: string - enableGutter?: boolean - imgClassName?: string - staticImage?: StaticImageData - disableInnerContainer?: boolean -} - -export const MediaBlock: React.FC = (props) => { - const { - captionClassName, - className, - enableGutter = true, - imgClassName, - media, - staticImage, - disableInnerContainer, - } = props - - let caption - if (media && typeof media === 'object') caption = media.caption - - return ( -
- {(media || staticImage) && ( - - )} - {caption && ( -
- -
- )} -
- ) -} diff --git a/apps/cms/src/blocks/MediaBlock/config.ts b/apps/cms/src/blocks/MediaBlock/config.ts deleted file mode 100644 index 7beb79b7eeb7b..0000000000000 --- a/apps/cms/src/blocks/MediaBlock/config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Block } from 'payload' - -export const MediaBlock: Block = { - slug: 'mediaBlock', - interfaceName: 'MediaBlock', - fields: [ - { - name: 'media', - type: 'upload', - relationTo: 'media', - required: true, - }, - ], -} diff --git a/apps/cms/src/blocks/Quote/Component.tsx b/apps/cms/src/blocks/Quote/Component.tsx deleted file mode 100644 index 0bf925e951814..0000000000000 --- a/apps/cms/src/blocks/Quote/Component.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react' - -import type { QuoteBlock as QuoteBlockProps } from '@/payload-types' - -type Props = { - className?: string -} & QuoteBlockProps - -export const QuoteBlock: React.FC = ({ className, img, caption, text }) => { - return ` - -{${text}} - - -` -} diff --git a/apps/cms/src/blocks/Quote/config.ts b/apps/cms/src/blocks/Quote/config.ts deleted file mode 100644 index e3495fe190d48..0000000000000 --- a/apps/cms/src/blocks/Quote/config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { Block } from 'payload' - -export const Quote: Block = { - slug: 'quote', - fields: [ - { - name: 'img', - type: 'upload', - relationTo: 'media', - label: 'Avatar', - required: false, - }, - { - name: 'caption', - type: 'text', - label: 'Caption', - required: false, - }, - { - name: 'text', - type: 'textarea', - label: 'Quote Text', - required: true, - }, - ], - interfaceName: 'QuoteBlock', -} diff --git a/apps/cms/src/blocks/YouTube/Component.tsx b/apps/cms/src/blocks/YouTube/Component.tsx deleted file mode 100644 index f0c389bc39d27..0000000000000 --- a/apps/cms/src/blocks/YouTube/Component.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react' - -import type { YouTubeBlock as YouTubeBlockProps } from '@/payload-types' -import { cn } from '@/utilities/ui' - -type Props = { - className?: string -} & YouTubeBlockProps - -export const YouTubeBlock: React.FC = ({ className, youtubeId }) => { - return ( -
-