Payload CMS V3 Website Template
One-click deploy on Railway!
Need help?
Step by step guide and instructions
A powerful, flexible, and production-ready Payload CMS V3 website builder with PostgreSQL database.
This repo powers the RaidGuild Portal: a CMS-backed surface for briefs, projects, threads, activity, sessions, profiles, recognition, contribution requests, modules, notifications, and contributor workflows.
Start with:
The Portal should make real community activity visible and help people find a useful next step. It should not become a project management system, Discord replacement, course platform, handbook dump, or generic AI content feed.
This project started from a Payload CMS website boilerplate and still uses
Payload, Next.js, and PostgreSQL as its foundation. Some lower sections of this
README retain setup notes from the original template, but product direction now
lives in docs/.
- Payload CMS:
3.82.1 - Next.js:
16.2.5 - Node.js:
^18.20.2 || >=20.9.0
- Authentication: Robust user authentication system
- Access Control: Role-based access control for admins and users
- Premium Content: Gated content for authenticated users
- Comments: User commenting system with admin approval
- Layout Builder: Flexible content creation with pre-configured blocks
- Draft Preview: Preview unpublished content before going live
- SEO: Built-in SEO optimization tools
- Redirects: Easy management of URL redirects
- PostgreSQL Support: Configured for both local and production use
Use one-click deploy template:
- Clone proejct: (recommeded) Laucnh on Railway and ejct watch how. Alternatively clone this repo or fork it.
- Copy
.env.exampleto.env(fill in your own values..) - Start PostgreSQL:
docker compose up -d postgres - Install dependencies:
pnpm installornpm install - Run development mode:
pnpm devornpm run devor - Build the project:
pnpm buildornpm run build - Start the server:
pnpm startornpm run start
To reset a non-Docker local PostgreSQL database, set DATABASE_URI to a local
host database in .env, then run:
corepack pnpm db:reset:local
corepack pnpm payload migrateThe reset script refuses non-local database hosts and prompts for confirmation
before dropping the database. Use corepack pnpm db:reset:local:migrate to
reset and immediately run migrations.
To seed local starter content for browser testing, run:
corepack pnpm db:seed:localThis upserts the portal starter content and ensures a local admin account exists:
- email:
local-admin@example.com - password:
password
It also creates a local-admin profile and two sessions hosted by that profile:
Local Artifact Upload Test - Past SessionLocal Host Planning Session - Future Session
Use corepack pnpm db:reset:local:seed for a fresh local reset, migration, and
seed in one command. The seed script also refuses non-local database hosts.
Pass -- --skip-admin to avoid creating the local admin account, or -- --full
to run the older destructive full demo seed.
Payload email delivery is optional in local development. Without SENDGRID_API_KEY, Payload writes email output to the server console.
Set these variables to enable SendGrid SMTP delivery for password resets, welcome emails, account email verification, and legacy profile claim verification:
SENDGRID_API_KEYEMAIL_FROM_ADDRESSEMAIL_FROM_NAME
The public reset flow is available at /forgot-password and /reset-password?token=....
Logged-in users can verify their account email from /me; self-serve signups start as unverified and become contributor after verification.
Legacy profile claims are requested from /me; matching unclaimed profiles send a verification link to the legacy claimEmail before the profile is attached to the logged-in user and the account is promoted to member.
The Playwright suite boots a fresh PostgreSQL container, builds the app from scratch, creates the first admin user through the onboarding UI, upserts the portal starter content, submits a public comment, approves it in the admin UI, and verifies it appears on the public post page.
Before the first run, make sure Docker Desktop is running. The suite starts a fresh PostgreSQL container automatically.
The admin dashboard seed action is for local/dev setup. It is hidden and blocked on hosted Railway/Vercel environments unless ENABLE_ADMIN_SEED_ACTION=true is explicitly set. Locally, it is non-destructive: it upserts the portal starter records by stable slugs or titles and does not clear existing CMS content. It may update existing starter records with the same identifiers.
The older full reset seed remains in code for local reset workflows only; do not wire it to hosted production without an explicit database reset intent.
- Install everything required for e2e:
corepack pnpm e2e:install - Run the suite headlessly:
corepack pnpm test:e2e - Run the suite with a visible browser:
corepack pnpm test:e2e:headed - Run the suite slowly and keep the browser open for manual review:
corepack pnpm test:e2e:manual
What e2e:install does:
- Installs project dependencies
- Rebuilds native dependencies used by the app on Windows, including
sharpandesbuild - Downloads the Chromium browser used by Playwright
If you prefer npm, you can run:
npm run e2e:installnpm run test:e2enpm run test:e2e:headednpm run test:e2e:manual
test:e2e:manual runs the suite in headed mode with a visible slowdown between actions and pauses only at the end of the happy path. While paused, the browser stays open so you can click around and manually inspect seeded content, the admin area, and public pages. When you are done, resume or stop the Playwright session from the inspector/terminal.
- Database: PostgreSQL
- Node.js: Compatible version as specified in
package.json