DEV Community

Alex Spinov
Alex Spinov

Posted on

Payload CMS Has a Free Headless CMS — TypeScript-First with Code-Defined Schemas

Payload CMS is a TypeScript-first headless CMS — define your schema in code, get REST + GraphQL APIs, admin panel, and authentication.

What You Get for Free

  • Code-defined schemas — TypeScript config, not UI clicks
  • REST + GraphQL — both APIs auto-generated
  • Admin panel — beautiful, customizable admin UI
  • Authentication — built-in auth with access control
  • File uploads — image resizing, S3/local storage
  • Hooks — beforeChange, afterRead, custom logic per collection
  • Versions & drafts — content versioning built-in
  • Localization — multi-language content
  • Self-hosted — runs on your server, you own your data

Quick Start

npx create-payload-app@latest
Enter fullscreen mode Exit fullscreen mode
// collections/Posts.ts
import { CollectionConfig } from 'payload/types'

export const Posts: CollectionConfig = {
  slug: 'posts',
  fields: [
    { name: 'title', type: 'text', required: true },
    { name: 'content', type: 'richText' },
    { name: 'author', type: 'relationship', relationTo: 'users' },
    { name: 'publishedAt', type: 'date' },
  ],
}
// REST: GET /api/posts | GraphQL: query { Posts { docs { title } } }
Enter fullscreen mode Exit fullscreen mode

Why Developers Switch from Strapi

Strapi defines schemas in the UI, making version control painful:

  • Code-first — schemas in TypeScript, Git-friendly
  • Type-safe — full TypeScript inference on queries
  • Better auth — built-in, not a plugin
  • Next.js integration — embed Payload inside Next.js app

A team's Strapi schema changes required manual migration scripts. After Payload: schemas in code, git diff shows exactly what changed, deploy = git push.

Need Custom Data Solutions?

I build production-grade scrapers and data pipelines for startups, agencies, and research teams.

Browse 88+ ready-made scrapers on Apify → — Reddit, HN, LinkedIn, Google, Amazon, and more.

Custom project? Email me: spinov001@gmail.com — fast turnaround, fair pricing.

Top comments (0)