English for Payload CMS Developers
Master the English vocabulary for Payload CMS: collections, fields, access control, and hooks, explained for developers building headless content platforms.
Payload CMS is code-first — schemas, permissions, and business logic all live in TypeScript rather than a visual admin builder — which means discussing it well requires precise terms for collections, fields, and hooks. Vague language like “the content thing” or “the permission stuff” slows down code review on a Payload codebase. This guide covers the vocabulary developers need.
Key Vocabulary
Collection — a Payload construct defining a content type (like Posts or Users), configured as a TypeScript object with fields, access control, and hooks.
“We need a new field on the Products collection to store the SKU, not a whole new collection.”
Field — a single piece of data within a collection, with a type (text, relationship, richText, array) and its own validation rules.
“The relationship field on Posts links to the Authors collection so we can populate the author’s name at query time.”
Access control function — a function attached to a collection or field that returns true or false to determine whether a given user can read, create, update, or delete a document.
“The access control function checks req.user.role and only allows editors to publish, not just save a draft.”
Hook — a function that runs at a specific point in a document’s lifecycle (beforeChange, afterChange, beforeRead), used for side effects like sending notifications or transforming data.
“We added an afterChange hook that triggers a Slack notification whenever a post’s status changes to published.”
Local API — Payload’s server-side API for querying and mutating data directly in Node.js code, bypassing HTTP, used in scripts, hooks, and server components. “Instead of calling our own REST endpoint from the server, we use the local API directly — it’s faster and skips the network round trip.”
Live Preview — a Payload feature that renders a draft document in an iframe in real time as an editor types, without requiring a publish first. “Live Preview lets the marketing team see exactly how the landing page will look before they hit publish.”
Common Phrases
- “Should this be a new field on the existing collection, or does it need its own collection?”
- “Is the access control function scoped per-field, or does it apply to the whole collection?”
- “Which hook should run this —
beforeChangeso we can still modify the data, orafterChangesince it’s just a side effect?” - “Are we calling this through the REST API or the local API? That changes the auth context.”
- “Does Live Preview need a special route to render the draft correctly?”
Example Sentences
Explaining a schema decision in a design review:
“We modeled Testimonials as its own collection instead of an array field on Pages, because we want testimonials to be reusable across multiple pages, not duplicated per page.”
Reporting a bug:
“The afterChange hook is firing twice on save — it looks like it’s also triggering on the autosave draft, not just the final publish.”
Discussing permissions with a teammate:
“The access control function is returning true for all authenticated users right now, but we actually want to restrict delete access to admins only — let’s scope that down before this ships.”
Professional Tips
- Say “collection” and “field” precisely, matching Payload’s own terminology, rather than generic CMS words like “content type” or “attribute” — it keeps code review comments unambiguous.
- When describing a bug in lifecycle logic, name the specific hook (
beforeChange,afterChange,beforeValidate) rather than saying “the save logic,” since each hook runs at a different point. - Distinguish the local API from the REST API when explaining performance — the local API skips HTTP entirely and is the right choice inside hooks and scripts.
- Clarify whether an access rule is a collection-level or field-level access control function, since they can be layered and the more restrictive one wins.
Practice Exercise
- Explain in two sentences why an access control function is more flexible than a static role list.
- Write a one-sentence bug report about a hook firing at the wrong point in a document’s lifecycle.
- Describe, in your own words, when you’d use the local API instead of the REST API in a Payload project.
Navigating Nuance: Beyond Literal Translation
As a developer working with Payload’s flexible architecture, you’ll quickly realize that technical communication goes far beyond simply translating terms from your native language. The goal is to convey intent, constraints, and solutions clearly and concisely – something often lost in direct translation. Non-native English speakers especially can benefit from understanding the subtle differences in phrasing used within a professional development context, particularly when it comes to expressing feedback or outlining requirements. It’s not just about knowing “collection” means “group of documents”; it’s about articulating why you need that grouping, and how its structure impacts the broader system.
Consider a scenario: You’re reviewing a Pull Request (PR) submitted by a colleague. The PR description simply states, “Add new field.” While technically correct, this lacks crucial context. A more effective approach would be something like: “Please add a title field to the ‘Articles’ collection with a validation rule ensuring it’s not empty. This will improve data consistency and allow us to properly populate our analytics dashboard.” Notice the added detail – the specific field name, the validation requirement, and the rationale behind it. This level of specificity is crucial for reducing ambiguity and ensuring everyone understands the intended outcome. Similarly, Slack conversations often involve nuanced requests: “Can you investigate why users aren’t seeing the updated content?” A clearer response might be: “Let’s examine the caching layer to determine if the changes are propagating correctly after deployment.” The difference isn’t just in the vocabulary but in the precision of expression.
Furthermore, Payload heavily relies on hooks – small pieces of code that run at specific points in the system lifecycle. Describing their purpose requires careful phrasing. Instead of saying “Implement a hook,” you’d say: “Implement a ‘pre-save’ hook for the ‘Articles’ collection to sanitize user input and prevent XSS vulnerabilities.” This immediately communicates both the action and the reason behind it – security best practice. Understanding these subtleties will dramatically improve your ability to collaborate effectively with other developers, contribute meaningfully to documentation, and ultimately build robust and maintainable Payload CMS applications.
Here’s an example of how you might use payload-cli to manage a collection:
payload collections create articles --schema "title: string, content: text"
This command demonstrates the structured way we describe our needs when interacting with Payload’s tooling – it isn’t just about running the command, but defining what that command does. Paying attention to this level of detail will serve you well as you delve deeper into the world of Payload CMS development.