npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

payload-next-starter

v1.0.8

Published

PayloadCMS starter for Next.js - install into any Next.js app

Readme

Payload Next.js Starter

A block-based page builder powered by PayloadCMS for Next.js. Install this package into any Next.js project to add a full CMS with dynamic page content that can be shared across multiple applications.

Features

  • Block-Based Page Builder — Hero, Content, Contact Form, Features, Pricing, Testimonials, CTA, Team, FAQ, Image Gallery
  • Multi-App Support — Share one PostgreSQL database across multiple Next.js apps
  • Admin Panel — Visual editor for managing pages and content
  • Dynamic Routes — Automatic page rendering at /[slug]
  • SEO Fields — Meta titles, descriptions, images per page
  • Draft Mode — Preview changes before publishing
  • TypeScript — Full type safety with generated types

Installation

Run the setup command in your Next.js project:

npx payload-next-starter

Or install globally:

npm install -g payload-next-starter
payload-next-starter

What it does

The setup script will:

  1. Copy Payload admin routes to src/app/(payload)/
  2. Copy API routes to src/app/api/[...payload]/
  3. Copy collections (Users, Media, Pages) to src/collections/
  4. Copy block components to src/components/blocks/
  5. Copy BlockRenderer and RichTextContent components
  6. Copy dynamic [slug] page renderer to src/app/(frontend)/[slug]/
  7. Copy seed script to src/scripts/seedPages.ts
  8. Install required dependencies
  9. Update next.config.ts with Payload plugin
  10. Add scripts to package.json
  11. Create .env.example with required variables

After Installation

  1. Copy .env.example to .env and fill in your values:

    DATABASE_URL_TEST=postgresql://user:password@host:5432/database?sslmode=require
    PAYLOAD_SECRET=your-secret-key-min-16-chars
    NEXT_PUBLIC_SERVER_URL=http://localhost:3000
  2. Generate Payload import maps:

    npm run generate:importmap
  3. Generate TypeScript types:

    npm run generate:types
  4. Start your dev server:

    npm run dev
  5. Visit http://localhost:3000/admin to create your first admin user

  6. Seed sample pages (optional):

    npm run seed:pages

Using in Another Next.js App

This package is designed to be installed in multiple Next.js apps that share the same database. See CONSUMER_GUIDE.md for detailed instructions on:

  • Installing the package in a consumer app
  • Configuring the shared database connection
  • Rendering dynamic pages with BlockRenderer
  • Using individual block components
  • Managing content across multiple apps

Collections Included

  • Users — Authentication-enabled collection with admin access
  • Media — Uploads collection with image handling
  • Pages — Block-based page builder with SEO fields

Available Blocks

| Block | Description | |-------|-------------| | HeroBlock | Hero section with title, subtitle, CTA | | ContentBlock | Rich text content with heading | | ContactFormBlock | Contact form with info display | | FeaturesBlock | Feature grid with icons | | PricingBlock | Pricing plans table | | TestimonialsBlock | Customer testimonials | | CTABlock | Call-to-action banner | | TeamBlock | Team member cards | | FAQBlock | Accordion FAQ section | | ImageGalleryBlock | Image grid gallery |

Sample Pages

After running npm run seed:pages, the following sample pages are created:

| Route | Content | |-------|---------| | /home | Hero → Features → Testimonials → CTA | | /about-us | Hero → Story → Values → Team → CTA | | /contact-us | Hero → Contact Form → FAQ | | /services | Hero → Services → How We Work → CTA | | /pricing | Hero → Pricing → FAQ → CTA | | /faq | Hero → General FAQ → Technical FAQ → CTA | | /share | Hero → Share Ways → Referral → Testimonials → CTA |

Requirements

  • Next.js 13+ with App Router
  • Node.js 18.20+ or 20.9+
  • PostgreSQL database (Neon, Supabase, or any managed Postgres)

Deploying

Deploy to Vercel, Railway, or any platform supporting Next.js:

npm run build

Ensure these environment variables are set in production:

  • DATABASE_URL_TEST
  • PAYLOAD_SECRET
  • NEXT_PUBLIC_SERVER_URL

Customization

Edit src/payload.config.ts to add:

  • More collections
  • Globals
  • Hooks
  • Access control
  • Custom block types

Edit block components in src/components/blocks/ to customize styling and behavior.

License

MIT

Support