
Blank Tanstack
Minimal Payload starter built on TanStack Start with MongoDB, a Users collection and a Media collection
Blank Payload 3 starter on Next.js 16 with Turso SQLite storage and Cloudflare R2 media uploads

A minimal Payload CMS 3 starter built on the Next.js App Router that uses Turso (libSQL) as its database and Cloudflare R2 for media storage through the S3 adapter. It includes Users and Media collections, the Lexical rich text editor, and a health check endpoint. Setup requires a Turso database and an R2 bucket configured through environment variables. Docker files and a GitHub Actions workflow are included for deployment.
A blank template to get started with Payload 3.0
This repository is a GitHub template: create your own copy of it in one click.
Create a repository from this template
Click the "Use this template" button on GitHub (not git clone) to create your own repository instantly:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO.git
cd YOUR-REPO
pnpm install
Prefer cloning? Run these commands instead:
git clone https://github.com/Lostovayne/Payload-CMS-3-Nextjs16-Turso-Cloudflare-R2.git cd Payload-CMS-3-Nextjs16-Turso-Cloudflare-R2 git remote set-url origin https://github.com/YOUR-USERNAME/YOUR-REPO.git pnpm install
# 1. Configure environment
cp .env.example .env
# Edit .env with your credentials
# 2. Start development
pnpm dev
Open http://localhost:3000/admin — create your admin user on first visit.
| Variable | Description | How to get |
|---|---|---|
PAYLOAD_SECRET | Encryption key (min 32 chars) | openssl rand -base64 32 |
TURSO_DATABASE_URL | Turso database URL | turso db show <db> --url |
TURSO_AUTH_TOKEN | Turso auth token | turso db tokens create <db> |
R2_BUCKET_NAME | Cloudflare R2 bucket name | Cloudflare Dashboard > R2 |
R2_ACCESS_KEY_ID | R2 API access key | Manage R2 API Tokens |
R2_SECRET_ACCESS_KEY | R2 API secret key | Shown once on creation |
R2_ENDPOINT | R2 endpoint URL | https://<account-id>.r2.cloudflarestorage.com |
See docs/QUICKSTART.md for step-by-step setup with Turso CLI and Cloudflare Dashboard.
| Technology | Version | Purpose |
|---|---|---|
| Payload CMS | 3.80.0 | Headless CMS |
| Next.js | 16.2 | React framework |
| React | 19.2.3 | UI library |
| TypeScript | 5.9.3 | Type safety |
| Turso / libSQL | 0.15.15 | Edge database |
| Cloudflare R2 | — | File storage |
| Drizzle Kit | 0.31.10 | Database migrations |
pnpm dev # Start dev server (http://localhost:3000)
pnpm devsafe # Start dev server (clean cache)
pnpm build # Build for production
pnpm lint # Run ESLint
pnpm format # Format with Prettier
pnpm test # Run all tests
pnpm generate:types # Regenerate TypeScript types
src/
├── app/
│ ├── (frontend)/ # Public frontend
│ ├── (payload)/ # Admin panel
│ ├── api/health/ # Health check endpoint
│ └── my-route/ # Example custom API route
├── collections/
│ ├── Users.ts # User collection with auth
│ └── Media.ts # File uploads (stored in R2)
├── payload.config.ts # Central Payload configuration
└── payload-types.ts # Auto-generated TypeScript types
| Platform | Guide |
|---|---|
| Vercel (recommended) | docs/VERCEL.md |
| Docker | docker-compose up -d |
| Railway / Render / Fly.io | docs/DOCKER.md |
See docs/DOCKER.md for detailed deployment guides.
| Guide | Description |
|---|---|
| QUICKSTART.md | Get running in 5 minutes |
| DEVELOPMENT.md | Create collections, fields, customize |
| ARCHITECTURE.md | Technical architecture |
| COMMANDS.md | Complete command reference |
| CI_CD.md | GitHub Actions and automation |
Contributions are welcome! Read CONTRIBUTING.md first.
git checkout -b feature/my-feature)git commit -m 'feat: add my feature')git push origin feature/my-feature)Report vulnerabilities via SECURITY.md.

Minimal Payload starter built on TanStack Start with MongoDB, a Users collection and a Media collection

Blank Payload starter for Cloudflare Workers with a D1 SQLite database and R2 media storage

Blank Payload starter on Next.js using the Postgres database adapter and local disk storage