A headless content management system built with Next.js 15 and PayloadCMS 3.0, deployed on Cloudflare Workers with D1 database and R2 storage.
- Node.js:
^18.20.2or>=20.9.0 - pnpm:
^9or^10
-
Clone the repository
git clone <repository-url> cd sy-devs-cms
-
Install dependencies
pnpm install
-
Set up environment
cp .env.example .env
Edit
.envand setPAYLOAD_SECRETto a string of at least 32 characters:PAYLOAD_SECRET=your-secret-key-here-at-least-32-chars -
Start development server
pnpm dev
-
Access the admin panel
Open http://localhost:3000/admin and follow the on-screen instructions to create your first admin user.
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm devsafe |
Clean start (removes .next cache first) |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm test |
Run all tests |
pnpm test:int |
Run integration tests (Vitest) |
pnpm test:e2e |
Run E2E tests (Playwright) |
pnpm generate:types |
Generate TypeScript types from Payload schema |
pnpm generate:importmap |
Generate import map for admin components |
pnpm payload migrate |
Run database migrations |
pnpm deploy:prod |
Deploy to production (migrations + app) |
For local development, only PAYLOAD_SECRET is required. The application automatically uses:
- Local SQLite database
- Local file storage (no Cloudflare credentials needed)
- Ethereal Email for testing (captures outbound emails)
See .env.example for the full list of available environment variables and their validation requirements.
src/
├── app/
│ ├── (frontend)/ # Public Next.js pages
│ └── (payload)/ # Payload admin & API routes
├── collections/ # Payload CMS collections
│ ├── access/ # Managers, Clients
│ ├── content/ # Pages, Meditations, Songs, etc.
│ ├── resources/ # Authors, Narrators, Images
│ └── tags/ # MeditationTags, SongTags
├── components/ # React components
├── globals/ # Global configurations
├── lib/ # Utilities and helpers
└── migrations/ # Database migrations
tests/
├── int/ # Integration tests
├── e2e/ # E2E tests (Playwright)
└── utils/ # Test helpers
This project uses symlinks (CLAUDE.md → AGENTS.md) for AI coding agent compatibility.
Windows users need to enable symlink support:
- Enable Developer Mode: Settings → Privacy & Security → For developers
- Configure Git:
git config --global core.symlinks true - Re-clone the repository (existing clones won't have symlinks)
If symlinks don't work, AI agents will still function via the @import syntax.
- DEPLOYMENT.md - Cloudflare deployment configuration and troubleshooting
- AGENTS.md - Detailed architecture, patterns, and development guidelines (also accessible via
CLAUDE.mdsymlink)