Skip to content

Payloadkit/payloadkit

Repository files navigation

PayloadKit

IKEA for Web Development - Build PayloadCMS applications faster with reusable components and templates.

PayloadKit is an open source framework that provides a collection of reusable components, blocks, and templates for PayloadCMS. Following the shadcn/ui philosophy, components are copied directly into your project, giving you full control and customization.

✨ Features

  • πŸš€ Lightning Fast - Get your PayloadCMS project up and running in minutes
  • πŸ“¦ Copy & Paste - Components are copied into your project for full control
  • 🎨 Modern Design - Built with TypeScript, TailwindCSS, and shadcn/ui
  • πŸ—οΈ Production Ready - Battle-tested components and configurations
  • πŸ”§ Customizable - Modify components to fit your exact needs
  • 🏠 IKEA Philosophy - Templates as minimal shells, registry as reusable intelligence
  • πŸ—„οΈ Smart Database - PostgreSQL by default, MongoDB optional with auto-detection
  • ☁️ Deploy Anywhere - Auto-detection Vercel vs VPS with DATABASE_BUILD_URI support
  • 🐳 Docker Ready - Complete development environment with one command

πŸš€ Quick Start

Prerequisites

# Install bun (recommended package manager)
curl -fsSL https://bun.sh/install | bash
# or visit https://bun.sh/docs/installation for other methods

Create a new project

# Create with default (blank) template
bunx create-payloadkit@latest my-app

# Create with specific template
bunx create-payloadkit@latest my-blog --template blog

# With custom options
bunx create-payloadkit@latest my-business \
  --template business \
  --package-manager bun \
  --no-git

Setup and Development

cd my-app

# 1. Copy environment file
cp .env.example .env

# 2. Generate a secure secret key
openssl rand -hex 32
# Copy the output and replace PAYLOAD_SECRET in .env

# 3. Start PostgreSQL database with Docker
bun run docker:dev

# 4. Run development server
bun dev

# 5. Open admin panel
# http://localhost:3000/admin

Add to existing project

# Initialize PayloadKit in your existing PayloadCMS project
bunx payloadkit@latest init

# Add components
bunx payloadkit@latest add call-to-action
bunx payloadkit@latest add hero-block

🐳 Docker Development

PayloadKit comes with a complete Docker Compose setup for instant development:

# In your project directory
cd my-app

# Start PostgreSQL database only
bun run docker:dev

# Or start full stack (PostgreSQL + Redis + MailHog + pgAdmin)
bun run docker:dev:full

# View running containers
docker-compose ps

# Stop all services
bun run docker:stop

# Reset database (clean start)
bun run docker:reset

What's included:

  • PostgreSQL 17 - Pre-configured with your .env settings
  • pgAdmin (full mode) - Database management UI at http://localhost:5050
  • MailHog (full mode) - Email testing at http://localhost:8025
  • Redis (full mode) - Caching and sessions

Useful Docker commands:

# View database logs
bun run docker:logs

# Connect to database CLI
bun run docker:db

# View all services status
docker-compose ps

πŸ“š Documentation

Visit our documentation site for:

  • Installation guides
  • Component library
  • CLI usage
  • Examples and templates
  • Best practices

New in v0.2.0

🧩 Registry Components

πŸ“¦ Blocks (PayloadCMS)

  • Hero Block - Flexible hero sections with title, subtitle, and CTA buttons
  • Call to Action - Versatile CTA sections with rich text and buttons
  • FAQ Block - Frequently asked questions with shadcn/ui Accordion
  • Banner Block - Notification and announcement banners
  • Content Block - Rich text content sections
  • Feature Block - Feature showcase with cards and icons
  • Logo Cloud - Partner/client logo displays
  • Quote Block - Testimonials and quote sections
  • Statistics - Number displays with descriptions

βš›οΈ Components (React)

  • RichText - PayloadCMS rich text renderer with Lexical
  • CMSLink - Smart link component for internal/external navigation

πŸ“ Collections (PayloadCMS)

  • Users - Authentication and user management
  • Media - File and image management
  • Pages - Content page management

πŸ—οΈ Templates

  • Blank - Minimal foundation with modular config, Docker setup, and shadcn/ui
  • Blog - Blog-focused setup with posts and categories (coming soon)
  • Business - Marketing website template (coming soon)
  • E-commerce - Online store template (coming soon)

βš™οΈ Configuration (New!)

  • db-config - Smart database with PostgreSQL/MongoDB + VPS support
  • collections-config - Modular collections management
  • plugins-config - Essential PayloadCMS plugins
  • email-config - SMTP/development email setup
  • jobs-config - Background tasks with security

🐳 Docker (New!)

  • dockerfile-dev - Multi-stage Dockerfile with bun optimization
  • docker-compose-dev - Complete development environment
  • dockerignore - Optimized .dockerignore for PayloadCMS

πŸ› οΈ CLI Commands

create-payloadkit (Project Creation)

# Create new project with blank template
bunx create-payloadkit@latest my-app

# Create with specific template
bunx create-payloadkit@latest my-blog --template blog

# Create with custom package manager
bunx create-payloadkit@latest my-app --package-manager bun

# Skip installation and git initialization
bunx create-payloadkit@latest my-app --no-install --no-git

payloadkit (Component Management)

# Initialize in existing PayloadCMS project
bunx payloadkit@latest init

# List available registry components
bunx payloadkit@latest list

# Add specific components
bunx payloadkit@latest add hero-block call-to-action
bunx payloadkit@latest add Users Media
bunx payloadkit@latest add RichText CMSLink

# Add configuration modules (New!)
bunx payloadkit@latest add db-config
bunx payloadkit@latest add docker dockerfile-dev docker-compose-dev

πŸ—οΈ Development

This project uses bun workspaces:

# Install dependencies
bun install

# Build all packages
bun run build

# Start documentation site
bun run dev:docs

# Start CLI development
bun run dev

# Docker development (New!)
bun run docker:dev          # Basic environment (PostgreSQL)
bun run docker:dev:full     # Full stack with Redis, MailHog, pgAdmin

πŸ“ Project Structure

payloadkit/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/                  # Shared types and utilities
β”‚   β”œβ”€β”€ payloadkit/            # Main CLI for component management
β”‚   └── create-payloadkit/     # Project creation CLI
β”‚       └── templates/         # Project templates (blank, blog, etc.)
β”œβ”€β”€ apps/
β”‚   └── docs/                 # Documentation website
β”œβ”€β”€ docs/                     # Documentation files (New!)
β”‚   β”œβ”€β”€ MODULAR-CONFIG.md     # Configuration modulaire guide
β”‚   └── DOCKER-SETUP.md       # Docker development guide
└── registry/
    β”œβ”€β”€ index.json            # Registry metadata
    β”œβ”€β”€ blocks/               # PayloadCMS blocks
    β”‚   β”œβ”€β”€ hero-block/
    β”‚   β”œβ”€β”€ call-to-action/
    β”‚   β”œβ”€β”€ faq/
    β”‚   └── ...
    β”œβ”€β”€ components/           # React components
    β”‚   β”œβ”€β”€ RichText/
    β”‚   β”œβ”€β”€ CMSLink/
    β”‚   └── ...
    β”œβ”€β”€ collections/          # PayloadCMS collections
    β”‚   β”œβ”€β”€ Users/
    β”‚   β”œβ”€β”€ Media/
    β”‚   β”œβ”€β”€ Pages/
    β”‚   └── ...
    β”œβ”€β”€ config/               # Configuration modules (New!)
    β”‚   β”œβ”€β”€ db-config/        # Smart database setup
    β”‚   β”œβ”€β”€ collections-config/
    β”‚   β”œβ”€β”€ plugins-config/
    β”‚   └── ...
    └── docker/               # Docker setup (New!)
        β”œβ”€β”€ dockerfile-dev/   # Multi-stage Dockerfile
        β”œβ”€β”€ docker-compose-dev/
        └── dockerignore/

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m "Add amazing feature")
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • PayloadCMS - The headless CMS that powers everything
  • shadcn/ui - Inspiration for the copy-paste approach
  • Next.js - Framework powering our documentation
  • TailwindCSS - Utility-first CSS framework

πŸ”— Links


Built with ❀️ for the PayloadCMS community

About

Payloadkit Documentation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •