Skip to content

rpuls/payload-3-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payload CMS logo Railway logo

Payload CMS V3 Website Template
One-click deploy on Railway!

A powerful, flexible, and production-ready Payload CMS V3 website builder with PostgreSQL database.

PRs welcome! Discord Chat

About this boilerplate

This boilerplate is a pre-configured, ready-to-deploy solution for Payload CMS as a website builder. It includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website. This template is optimized for seamless deployment on Railway, and uses PostgreSQL for both local development and production environments.

Version Info

  • Payload CMS: 3.82.1
  • Next.js: 16.2.3
  • Node.js: ^18.20.2 || >=20.9.0

Preconfigured Features & Integrations

  • 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

Railway Setup

Use one-click deploy template:

Deploy on Railway

Local Setup

  1. Clone proejct: (recommeded) Laucnh on Railway and ejct watch how. Alternatively clone this repo or fork it.
  2. Copy .env.example to .env (fill in your own values..)
  3. Start PostgreSQL: docker compose up -d postgres
  4. Install dependencies: pnpm install or npm install
  5. Run development mode: pnpm dev or npm run dev or
  6. Build the project: pnpm build or npm run build
  7. Start the server: pnpm start or npm run start

End-to-End Testing

The Playwright suite boots a fresh PostgreSQL container, builds the app from scratch, creates the first admin user through the onboarding UI, seeds the demo 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. For test determinism, the e2e harness uses bundled local seed images only during the test run. Normal seeding continues to use the hosted seed images.

  1. Install everything required for e2e: corepack pnpm e2e:install
  2. Run the suite headlessly: corepack pnpm test:e2e
  3. Run the suite with a visible browser: corepack pnpm test:e2e:headed
  4. 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 sharp and esbuild
  • Downloads the Chromium browser used by Playwright

If you prefer npm, you can run:

  1. npm run e2e:install
  2. npm run test:e2e
  3. npm run test:e2e:headed
  4. npm 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.

Requirements

  • Database: PostgreSQL
  • Node.js: Compatible version as specified in package.json

Useful Resources

A template by,

FUNKYTON logo

About

Payload CMS V3 Boilerplate for Railway, by FUNKYTON

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors