From decbc0fb28818bcb3d150993a9e0e082693eb00f Mon Sep 17 00:00:00 2001
From: cryptohardcore <133330042+cryptohardcore@users.noreply.github.com>
Date: Mon, 1 Jun 2026 21:17:40 +0700
Subject: [PATCH] Add Konstantin attribution to README
---
README.md | 4 +
next.config.ts | 2 +
package.json | 5 +-
src/app/(frontend)/page.tsx | 156 ++++++++++++++------
src/app/(frontend)/styles.css | 268 ++++++++++++++++++----------------
src/payload.config.ts | 5 +-
6 files changed, 264 insertions(+), 176 deletions(-)
diff --git a/README.md b/README.md
index a58e16b..0daf744 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,8 @@ pnpm run deploy
This will spin up Wrangler in `production` mode, run any created migrations, build the app and then deploy the bundle up to Cloudflare.
+If you move these steps into your CI pipeline, make sure the deploy step activates the new Worker version. For an immediate production release, use `pnpm run deploy` or `npx wrangler deploy`. Do not use `npx wrangler versions upload` by itself for production deploys: that command only uploads an inactive Worker version, so live traffic will keep serving the previous homepage until the uploaded version is deployed with `wrangler versions deploy` or through the Cloudflare dashboard.
+
That's it! You can if you wish move these steps into your CI pipeline as well.
## Enabling logs
@@ -117,3 +119,5 @@ This also applies to your own code, in the case of importing a lot of libraries
## Questions
If you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).
+
+by Konstantin
diff --git a/next.config.ts b/next.config.ts
index 8dd8bfe..d6b9fd3 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -13,6 +13,8 @@ const nextConfig = {
},
],
},
+ output: 'standalone',
+
// Packages with Cloudflare Workers (workerd) specific code
// Read more: https://opennext.js.org/cloudflare/howtos/workerd
serverExternalPackages: ['jose', 'pg-cloudflare'],
diff --git a/package.json b/package.json
index 1a1dc48..55bf209 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"license": "MIT",
"type": "module",
"scripts": {
- "build": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=8000\" next build",
+ "build": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=8000\" next build && npm run build:worker",
"deploy": "pnpm run deploy:database && pnpm run deploy:app",
"deploy:app": "opennextjs-cloudflare build --env=$CLOUDFLARE_ENV && opennextjs-cloudflare deploy --env=$CLOUDFLARE_ENV",
"deploy:database": "cross-env NODE_ENV=production PAYLOAD_SECRET=ignore payload migrate && wrangler d1 execute D1 --command 'PRAGMA optimize' --env=$CLOUDFLARE_ENV --remote",
@@ -22,7 +22,8 @@
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
"test": "pnpm run test:int && pnpm run test:e2e",
"test:e2e": "cross-env NODE_OPTIONS=\"--no-deprecation --import=tsx/esm\" playwright test --config=playwright.config.ts",
- "test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts"
+ "test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts",
+ "build:worker": "opennextjs-cloudflare build --skipNextBuild"
},
"dependencies": {
"@opennextjs/cloudflare": "^1.11.0",
diff --git a/src/app/(frontend)/page.tsx b/src/app/(frontend)/page.tsx
index d0e8d64..88b5f78 100644
--- a/src/app/(frontend)/page.tsx
+++ b/src/app/(frontend)/page.tsx
@@ -1,59 +1,119 @@
-import { headers as getHeaders } from 'next/headers.js'
-import Image from 'next/image'
-import { getPayload } from 'payload'
import React from 'react'
-import { fileURLToPath } from 'url'
-import config from '@/payload.config'
import './styles.css'
-export default async function HomePage() {
- const headers = await getHeaders()
- const payloadConfig = await config
- const payload = await getPayload({ config: payloadConfig })
- const { user } = await payload.auth({ headers })
+export const dynamic = 'force-dynamic'
+export const revalidate = 0
- const fileURL = `vscode://file/${fileURLToPath(import.meta.url)}`
+const events = [
+ { date: 'May 30', title: 'Old Town Night Market', location: 'Phuket Town' },
+ { date: 'Jun 2', title: 'Sunset Beach Yoga', location: 'Kata Beach' },
+ { date: 'Jun 5', title: 'Andaman Seafood Festival', location: 'Rawai Pier' },
+]
+const featuredArticles = [
+ '7 hidden beaches locals still love in low season',
+ 'How to island-hop from Phuket in one weekend',
+ 'Best family-friendly cafés with ocean views',
+]
+
+export default function HomePage() {
return (
-