A minimal, production-ready blog starter built with Next.js 16, Payload CMS 3, and Tailwind CSS 4. Get a beautiful, fast blog up and running in minutes.
Content Management
- Rich text editor with Lexical
- Draft versioning with autosave
- Live preview as you edit
- SEO fields on every post
Modern Stack
- Next.js 16 App Router
- Payload CMS 3.65
- PostgreSQL + Vercel Blob Storage
- Tailwind CSS 4 + shadcn/ui
- Dark/light mode
Production Ready
- Automatic sitemap generation
- SEO-optimized meta tags
- Responsive design
- Type-safe with TypeScript
# Clone and install
git clone https://github.com/brijr/payload-blog.git
cd payload-blog
pnpm install
# Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URI and PAYLOAD_SECRET
# Start developing
pnpm devOpen localhost:3000/admin to create your first post.
| Variable | Required | Description |
|---|---|---|
DATABASE_URI |
Yes | PostgreSQL connection string |
PAYLOAD_SECRET |
Yes | Secret key for Payload CMS |
NEXT_PUBLIC_SITE_URL |
Yes | Your site URL (for sitemap/SEO) |
BLOB_READ_WRITE_TOKEN |
Yes | Vercel Blob storage token |
RESEND_API_KEY |
No | For email notifications |
EMAIL_FROM |
No | Sender email address |
src/
├── app/
│ ├── (frontend)/(site)/ # Public routes
│ │ ├── page.tsx # Homepage
│ │ └── posts/ # Blog posts
│ └── (payload)/ # Admin panel
├── collections/
│ ├── Posts.ts # Blog posts
│ ├── Media.ts # File uploads
│ └── Users.ts # Admin users
└── components/
├── ds.tsx # Design system
├── posts/ # Post components
└── ui/ # shadcn/ui
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm generate:types |
Regenerate Payload types |
pnpm lint |
Run ESLint |
pnpm devsafe |
Clear cache and start dev |
| Route | Description |
|---|---|
/ |
Homepage |
/posts |
All posts |
/posts/[slug] |
Single post |
/admin |
CMS admin panel |
/sitemap.xml |
Auto-generated sitemap |
Add a new collection:
- Create
/src/collections/YourCollection.ts - Add to
collectionsarray in/src/payload.config.ts - Run
pnpm generate:types
Add a new page:
- Create
/src/app/(frontend)/(site)/your-page/page.tsx - Use the design system components from
/src/components/ds.tsx
Or deploy manually:
- Set up a PostgreSQL database (Neon, Supabase, etc.)
- Configure environment variables
- Deploy to Vercel, Railway, or any Node.js host
MIT
Built by brijr