π― A modern, headless CMS built with Payload, Next.js, and Docker. Perfect for content management that doesn't get in your way!
- π¨ Modern Admin Interface - Beautiful, intuitive content management
- π Authentication Ready - User management out of the box
- π Rich Text Editor - Powered by Lexical for amazing content creation
- π³ Docker Compose - One-command development environment
- ποΈ MongoDB - Flexible, scalable database with admin interface
- π Secure by Default - Environment variables and proper authentication
- β‘ TypeScript - Full type safety throughout
- π― API First - REST and GraphQL endpoints ready to go
Technology | Purpose | Version |
---|---|---|
π― Payload CMS | Headless CMS | 3.40.0 |
β‘ Next.js | React Framework | 15.3.3 |
π³ Docker | Containerization | Latest |
π MongoDB | Database | 7.0 |
π TypeScript | Type Safety | 5.6.3 |
βοΈ React | UI Library | 19.0.0 |
- π³ Docker & Docker Compose
- π¦ Node.js 18+ (for local development)
# 1οΈβ£ Clone and navigate
git clone <your-repo-url>
cd my-payload-app
# 2οΈβ£ Fire up the engines! π
npm run docker:up
# 3οΈβ£ Open your browser and enjoy! π
# http://localhost:3000
That's it! π Your CMS is ready to rock!
Service | URL | Description |
---|---|---|
π― Main App | http://localhost:3000 | Your beautiful frontend |
π€ Admin Panel | http://localhost:3000/admin | Content management magic |
ποΈ Database Admin | http://localhost:8081 | MongoDB management |
π API Endpoint | http://localhost:3000/api | REST & GraphQL APIs |
# π Start everything (recommended)
npm run docker:up
# ποΈ Rebuild and start
npm run docker:up:build
# π Stop all services
npm run docker:down
# π View logs
npm run docker:logs
# π Generate types (when config changes)
npm run generate:types
# π§Ή Lint your code
npm run lint
my-payload-app/
βββ π― payload.config.ts # Payload configuration
βββ π§ next.config.mjs # Next.js setup
βββ π³ docker-compose.yml # Docker services
βββ π¦ package.json # Dependencies & scripts
βββ π .env # Environment variables
βββ π payload-types.ts # Generated types
βββ π src/
βββ π app/
βββ π layout.tsx # Root layout
βββ π page.tsx # Home page
βββ π api/ # API routes
βββ π€ (payload)/ # Admin interface
- π Authentication enabled
- π§ Email-based login
- π‘οΈ Role-based permissions
- π Rich text content with Lexical editor
- π·οΈ Title and content fields
- π― Perfect for websites and blogs
Create your .env
file (check .env.example
for reference):
# ποΈ Database
DATABASE_URI=mongodb://mongodb:27017/payload-app
# π Security
PAYLOAD_SECRET=your-super-secret-key
# π App
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
Service | Purpose | Port |
---|---|---|
π― app | Next.js + Payload | 3000 |
π mongodb | Database | 27017 |
π₯οΈ mongo-express | DB Admin UI | 8081 |
- π Edit
payload.config.ts
- π Run
npm run generate:types
- π Restart with
npm run docker:up:build
Check out the Payload documentation for:
- π¨ Custom field types
- π§© Custom components
- π£ Hooks and lifecycle events
- π Plugin development
Admin panel shows config error?
# Try rebuilding
npm run docker:down
npm run docker:up:build
Database connection issues?
# Check if MongoDB is running
docker ps
# Restart services
npm run docker:down && npm run docker:up
Port conflicts?
- π― App: Change port 3000 in docker-compose.yml
- π MongoDB: Change port 27017
- π₯οΈ Mongo Express: Change port 8081
# See available updates
npm outdated
# Check specific Payload packages
npm outdated payload @payloadcms/next @payloadcms/db-mongodb
# Update all Payload packages
npm update payload @payloadcms/next @payloadcms/db-mongodb @payloadcms/richtext-lexical
# Update to latest stable
npm install payload@latest
# After updates, always regenerate types!
npm run generate:types
npm run docker:up:build
- β Star Payload on GitHub for release notifications
- π Follow the Payload Blog for major updates
- π¬ Join Discord Community for discussions
- π¦ Follow @payloadcms on Twitter
# 1. Create update branch
git checkout -b update-payload
# 2. Update and test
npm update payload
npm run docker:up:build
# 3. Test admin panel & API endpoints
# 4. If all good, merge
git checkout main && git merge update-payload
π‘ Pro Tip: Always read release notes for breaking changes before major updates!
- π΄ Fork the repo
- π Create your feature branch
- β¨ Make your changes
- π§ͺ Test everything works
- π Submit a pull request
- π Payload CMS Docs
- β‘ Next.js Documentation
- π³ Docker Documentation
- π MongoDB Documentation
MIT License - feel free to use this for your awesome projects! π
Made with β€οΈ and lots of β
Happy coding! π