fix(web): remove payload admin routes + withPayload (stabilize prod)
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Payload CMS integration crashes the entire production app — the
withPayload wrapper + admin routes break when DB tables don't
exist and the layout conflicts with i18n routing.

Keeping: payload.config.ts, blog/changelog pages with graceful
DB fallback, static blog post page. Payload admin will be added
back once properly integrated with a dedicated route group that
doesn't inherit the main app layout.

The blog post at /blog/peer-messaging-claude-code is static TSX
and works without Payload runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-06 01:48:25 +01:00
parent a14b6c28dd
commit 96cae38196
4 changed files with 1 additions and 32 deletions

View File

@@ -1,5 +1,4 @@
import type { NextConfig } from "next";
import { withPayload } from "@payloadcms/next/withPayload";
import env from "./env.config";
@@ -116,4 +115,4 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: env.ANALYZE,
});
export default withPayload(withBundleAnalyzer(config));
export default withBundleAnalyzer(config);

View File

@@ -1,14 +0,0 @@
/* eslint-disable */
// @ts-nocheck — Payload generates these types at build time
import { RootPage, generatePageMetadata } from "@payloadcms/next/views";
import { importMap } from "../importMap";
import config from "@payload-config";
type Args = { params: Promise<{ segments: string[] }> };
export const generateMetadata = ({ params }: Args) =>
generatePageMetadata({ config, params });
export default function Page({ params }: Args) {
return <RootPage config={config} params={params} importMap={importMap} />;
}

View File

@@ -1,2 +0,0 @@
// Auto-generated by Payload — placeholder until first build
export const importMap = {};

View File

@@ -1,14 +0,0 @@
import "@payloadcms/next/css";
import type { ReactNode } from "react";
export const metadata = {
title: "Admin — claudemesh",
};
export default function PayloadLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}