Modern, powerful and super fun CMS experience! ๐
Hello world! ๐ This is a super powerful boilerplate built with Payload CMS 3.0 and Next.js 15! Everything is ready to get started right away! โจ
- ๐จ Modern UI/UX - Beautiful design with Tailwind CSS and Radix UI
- ๐ Secure Authentication - Login/Register system ready
- ๐ฑ Responsive Design - Mobile, tablet and desktop compatible
- ๐ Dark/Light Mode - Theme switcher for night/day mode
- ๐ Rich Text Editor - Powerful text editor with Lexical
- ๐ผ๏ธ Media Management - File upload and image management
- ๐ SEO Optimized - Optimized for search engines
- ๐ GraphQL API - Modern API structure
- ๐ณ Docker Ready - Easy to deploy
- โก Live Preview - Real-time preview
Technology | Version | Description |
---|---|---|
๐ Next.js | 15.3.3 | React framework |
๐ฆ Payload CMS | 3.43.0 | Headless CMS |
๐จ Tailwind CSS | 4.1.10 | CSS framework |
๐๏ธ PostgreSQL | - | Database |
๐ง TypeScript | 5.7.3 | Type safety |
๐ญ React | 19.1.0 | UI library |
git clone https://github.com/Xjectro/payload-cms-boilerplate.git
cd payload-cms-boilerplate
pnpm install
# or
npm install
# or
yarn install
Create a .env.local
file and add the required variables:
# Database Configuration
DATABASE_URI=postgres://postgres:B100dy50.waf!@127.0.0.1:5432/this-is-my-test-db
# Application Secrets
PAYLOAD_SECRET=YOUR_SECRET_HERE
PREVIEW_SECRET=your_preview_secret_here
# Site
SITE_URL=http://localhost:3000
SITE_NAME=Your Site Name
# Environment Variables for Next.js
NEXT_PUBLIC_SITE_URL=${SITE_URL}
NEXT_PUBLIC_SITE_NAME=${SITE_NAME}
# Start PostgreSQL (with Docker)
docker-compose up -d
# Migrate the database
pnpm payload migrate
pnpm dev
Go to http://localhost:3000
in your browser! ๐ฏ
๐ฆ payload-cms-boilerplate
โโโ ๐จ src/
โ โโโ ๐ app/ # Next.js App Router
โ โ โโโ (api)/ # API routes
โ โ โ โโโ health/ # Health check
โ โ โ โ โโโ route.ts # Health endpoint
โ โ โ โโโ next/ # Next.js integration
โ โ โ โโโ exit-preview/ # Preview exit
โ โ โ โ โโโ route.ts
โ โ โ โโโ preview/ # Preview mode
โ โ โ โโโ route.ts
โ โ โโโ (frontend)/ # Frontend application
โ โ โ โโโ layout.tsx # Frontend main layout
โ โ โ โโโ (auth)/ # Authentication pages
โ โ โ โ โโโ layout.tsx # Auth layout
โ โ โ โ โโโ login/ # Login page
โ โ โ โ โ โโโ page.tsx
โ โ โ โ โโโ register/ # Register page
โ โ โ โ โโโ page.tsx
โ โ โ โโโ (protected)/ # Protected area
โ โ โ โ โโโ layout.tsx # Protected layout
โ โ โ โ โโโ dashboard/ # Dashboard page
โ โ โ โ โโโ page.tsx
โ โ โ โโโ (public)/ # Public area
โ โ โ โโโ layout.tsx # Public layout
โ โ โ โโโ page.tsx # Home page
โ โ โ โโโ [slug]/ # Dynamic pages
โ โ โ โโโ page.tsx # Slug page
โ โ โโโ (payload)/ # Payload admin
โ โ โโโ layout.tsx # Payload layout
โ โ โโโ custom.scss # Admin custom styles
โ โ โโโ admin/ # Admin panel
โ โ โ โโโ importMap.js # Import map
โ โ โ โโโ [[...segments]]/
โ โ โ โโโ not-found.tsx
โ โ โ โโโ page.tsx
โ โ โโโ api/ # Payload API routes
โ โ โโโ [...slug]/ # Dynamic API
โ โ โ โโโ route.ts
โ โ โโโ graphql/ # GraphQL endpoint
โ โ โโโ graphql-playground/
โ โโโ ๐๏ธ collections/ # Payload collections
โ โ โโโ Media/ # Media collection
โ โ โ โโโ index.ts
โ โ โโโ Pages/ # Pages collection
โ โ โ โโโ hooks.ts # Page hooks
โ โ โ โโโ index.ts
โ โ โโโ Users/ # Users collection
โ โ โโโ index.ts
โ โโโ ๐งฉ components/ # React components
โ โ โโโ common/ # Common components
โ โ โ โโโ footer.tsx # Footer
โ โ โ โโโ header.tsx # Header
โ โ โโโ features/ # Feature components
โ โ โ โโโ auth/ # Authentication components
โ โ โ โโโ buttons/ # Auth buttons
โ โ โ โโโ forms/ # Auth forms
โ โ โโโ payload/ # Payload components
โ โ โ โโโ rich-text.tsx # Rich text renderer
โ โ โ โโโ blocks/ # Content blocks
โ โ โ โ โโโ render-blocks.tsx # Block renderer
โ โ โ โ โโโ banner-block/ # Banner block
โ โ โ โ โโโ code-block/ # Code block
โ โ โ โ โโโ content-block/ # Content block
โ โ โ โ โโโ cta-block/ # CTA block
โ โ โ โ โโโ media-block/ # Media block
โ โ โ โโโ fields/ # Custom field components
โ โ โ โ โโโ link/ # Link field
โ โ โ โ โโโ media/ # Media field
โ โ โ โโโ heroes/ # Hero components
โ โ โ โ โโโ config.ts # Hero configuration
โ โ โ โ โโโ high-impact.tsx # High impact hero
โ โ โ โ โโโ low-impact.tsx # Low impact hero
โ โ โ โ โโโ medium-impact.tsx # Medium impact hero
โ โ โ โ โโโ render-hero.tsx # Hero renderer
โ โ โ โโโ plugins/ # Plugin components
โ โ โ โโโ live-preview-listener.tsx
โ โ โโโ providers/ # Provider components
โ โ โ โโโ theme/ # Theme components
โ โ โ โโโ theme-provider.tsx # Theme provider
โ โ โ โโโ theme-toggle.tsx # Theme switcher
โ โ โโโ ui/ # UI components
โ โ โโโ design-system.tsx # Design system
โ โ โโโ forms/ # Form components
โ โ โ โโโ form-box.tsx # Form box
โ โ โ โโโ submit-button.tsx # Submit button
โ โ โโโ primitives/ # UI primitives
โ โ โโโ alert.tsx # Alert component
โ โ โโโ badge.tsx # Badge component
โ โ โโโ button.tsx # Button component
โ โ โโโ checkbox.tsx # Checkbox component
โ โ โโโ form.tsx # Form component
โ โ โโโ input.tsx # Input component
โ โ โโโ label.tsx # Label component
โ โโโ ๐ fields/ # Payload field types
โ โ โโโ link-group.ts # Link group field
โ โ โโโ link.ts # Link field
โ โ โโโ slug/ # Slug field
โ โ โโโ format-slug.ts # Slug format
โ โ โโโ index.scss # Slug styles
โ โ โโโ index.ts # Slug field
โ โ โโโ slug-component.tsx # Slug component
โ โโโ ๐ง lib/ # Helper libraries
โ โ โโโ auth.ts # Authentication
โ โ โโโ utils.ts # General helpers
โ โโโ ๐ migrations/ # Database migrations
โ โโโ ๐จ styles/ # Global styles
โ โ โโโ globals.css # Global CSS
โ โโโ ๐ ๏ธ utils/ # Utility functions
โ โ โโโ plugins.ts # Plugin configuration
โ โ โโโ helpers/ # Helper functions
โ โ โ โโโ generate-preview-path.ts
โ โ โโโ meta/ # Meta data
โ โ โ โโโ generate-meta.ts # Meta generator
โ โ โ โโโ open-graph.ts # OpenGraph utilities
โ โ โโโ payload-hooks/ # Payload hooks
โ โ โ โโโ access.ts # Access controls
โ โ โ โโโ revalidate-redirects.ts
โ โ โโโ validations/ # Validation schemas
โ โ โโโ auth.ts # Auth validations
โ โโโ payload-types.ts # Payload type definitions
โ โโโ payload.config.ts # Payload configuration
โโโ ๐ผ๏ธ public/ # Static files
โ โโโ favicon.ico # Site icon
โ โโโ opengraph-image.webp # OpenGraph image
โ โโโ media/ # Media files
โโโ โ๏ธ Config Files
โ โโโ .env # Environment variables
โ โโโ .prettierrc.json # Prettier settings
โ โโโ components.json # Shadcn/ui config
โ โโโ docker-compose.yml # Docker Compose
โ โโโ Dockerfile # Docker build
โ โโโ eslint.config.mjs # ESLint settings
โ โโโ next.config.mjs # Next.js configuration
โ โโโ package.json # Project dependencies
โ โโโ tailwind.config.ts # Tailwind configuration
โ โโโ tsconfig.json # TypeScript settings
Command | Description |
---|---|
pnpm dev |
๐ Start development server |
pnpm build |
๐ฆ Build for production |
pnpm start |
|
pnpm lint |
๐ Check code quality |
pnpm format |
โจ Format code |
pnpm payload |
โก Payload CLI commands |
This boilerplate includes many pre-built block types:
- ๐ฏ Banner Block - Eye-catching banners
- ๐ Content Block - Rich content areas
- ๐ผ๏ธ Media Block - Image/video blocks
- ๐ป Code Block - Code display
- ๐ช CTA Block - Call-to-action buttons
- โ User registration and login
- ๐ Protected page redirects
- ๐ค User profile management
- ๐ช Secure logout
Endpoint | Description |
---|---|
/api/graphql |
๐ GraphQL API |
/api/graphql-playground |
๐ฎ GraphQL Playground |
/admin |
๐ง Payload Admin Panel |
# Start all services
docker-compose up -d
# Start only the database
docker-compose up -d postgres
# With Vercel CLI
vercel deploy
# or push to GitHub, auto deploy! ๐
# Build image
docker build -t payload-cms-app .
# Run
docker run -p 3000:3000 payload-cms-app
- ๐ด Fork it
- ๐ฟ Create feature branch (
git checkout -b feature/amazing-feature
) - ๐พ Commit your changes (
git commit -m 'Add amazing feature'
) - ๐ค Push to the branch (
git push origin feature/amazing-feature
) - ๐ฏ Create a Pull Request
Got any issues? ๐ค
- ๐ง Website: https://xjectro.com
- ๐ฌ GitHub Issues: Issues page
- ๐ Documentation: Payload CMS Docs
This project is licensed under the MIT License. See the LICENSE
file for details! ๐