mi-proyecto-2026

Blank Payload 3 starter on Next.js 16 with Turso SQLite storage and Cloudflare R2 media uploads

mi-proyecto-2026 preview

Overview

Summary generated from the README

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.

Features

  • Turso libSQL database through the Payload SQLite adapter
  • Cloudflare R2 media storage using the S3-compatible storage plugin
  • Users collection with built-in authentication and a Media upload collection
  • Lexical rich text editor and auto-generated REST and GraphQL APIs
  • Multi-stage Docker build and GitHub Actions CI
  • Vitest integration tests and Playwright end-to-end tests

Good for

  • Starting a new Payload project that runs on an edge SQLite database
  • Building a headless CMS backend with S3-compatible media storage and no egress fees
  • Bootstrapping a Next.js 16 project deployed to Vercel or Docker hosts

From the author

A blank template to get started with Payload 3.0

Get started

This repository is a GitHub template: create your own copy of it in one click.

Create a repository from this template

README

Built with Gentle-AI

🚀 Use This Template

Click the "Use this template" button on GitHub (not git clone) to create your own repository instantly:

  1. Go to github.com/Lostovayne/Payload-CMS-3-Nextjs16-Turso-Cloudflare-R2
  2. Click "Use this template" → "Create a new repository"
  3. Name your project and click Create
  4. Clone your new repo and start coding:
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

⚡ Quick Start

# 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.

Environment Variables

VariableDescriptionHow to get
PAYLOAD_SECRETEncryption key (min 32 chars)openssl rand -base64 32
TURSO_DATABASE_URLTurso database URLturso db show <db> --url
TURSO_AUTH_TOKENTurso auth tokenturso db tokens create <db>
R2_BUCKET_NAMECloudflare R2 bucket nameCloudflare Dashboard > R2
R2_ACCESS_KEY_IDR2 API access keyManage R2 API Tokens
R2_SECRET_ACCESS_KEYR2 API secret keyShown once on creation
R2_ENDPOINTR2 endpoint URLhttps://<account-id>.r2.cloudflarestorage.com

See docs/QUICKSTART.md for step-by-step setup with Turso CLI and Cloudflare Dashboard.


✨ Features

  • Payload CMS 3.80.0 — Headless CMS with full admin panel
  • Next.js 16 App Router — React 19 with server components
  • Turso — Edge SQLite database with global replication
  • Cloudflare R2 — S3-compatible storage (zero egress fees)
  • Lexical Editor — Rich text editing
  • JWT Authentication — Built-in user management
  • REST + GraphQL — Auto-generated API endpoints
  • TypeScript — End-to-end type safety
  • Docker — Multi-stage optimized build
  • CI/CD — GitHub Actions, auto-format, security audit
  • Testing — Vitest (integration) + Playwright (E2E)

🛠 Tech Stack

TechnologyVersionPurpose
Payload CMS3.80.0Headless CMS
Next.js16.2React framework
React19.2.3UI library
TypeScript5.9.3Type safety
Turso / libSQL0.15.15Edge database
Cloudflare R2—File storage
Drizzle Kit0.31.10Database migrations

💻 Development

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

Project Structure

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

🚀 Deployment

PlatformGuide
Vercel (recommended)docs/VERCEL.md
Dockerdocker-compose up -d
Railway / Render / Fly.iodocs/DOCKER.md

See docs/DOCKER.md for detailed deployment guides.


📚 Documentation

GuideDescription
QUICKSTART.mdGet running in 5 minutes
DEVELOPMENT.mdCreate collections, fields, customize
ARCHITECTURE.mdTechnical architecture
COMMANDS.mdComplete command reference
CI_CD.mdGitHub Actions and automation

🤝 Contributing

Contributions are welcome! Read CONTRIBUTING.md first.

  1. Fork the repository
  2. Create a branch (git checkout -b feature/my-feature)
  3. Commit (git commit -m 'feat: add my feature')
  4. Push (git push origin feature/my-feature)
  5. Open a Pull Request

🔒 Security

Report vulnerabilities via SECURITY.md.


📄 License

MIT

More Starters & boilerplates templates

Blank Tanstack screenshot

Blank Tanstack

Official

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

v4
TanStack Start
Updated Today
With Cloudflare D1 screenshot

With Cloudflare D1

Official

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

v3
Next.js
Updated Today
With Postgres screenshot

With Postgres

Official

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

v3
Next.js
Updated Today