Typed repository classes for collections and globals over the Payload Local API
Field Factories
Type-safe factory functions that build Payload field configs with less boilerplate
Installation
pnpm add payload-field-factories About
Field Factories is a set of helper functions for writing Payload field configurations in TypeScript. Each field type has its own factory, so a text, relationship, rich text or array field takes a name and a few arguments instead of a full config object. Overrides are typed from the underlying field type, so the editor suggests valid options as you type.
The helpers also cover layout fields such as rows, tabs, collapsibles and groups, and they can nest child fields the same way. The result is a collection config that reads more like a plain list of fields and is easier to review.
Package info
- Package name
payload-field-factories- Latest version
1.2.4- Unpacked size
- 27 kB
- License
- MIT
- Weekly downloads
- 17
- Last publish
- Jul 22, 2026
More from bhofstaetter
View profileHelpers for extracting IDs, resolving documents and composing field validators
Spins up a throwaway Payload instance on a test database container for integration tests
Similar tools
More in Dev workflowStateful test emulator of the Payload collection REST API with seeded data
Editor support for Payload component paths, with import checks and autocomplete
Governance checks and ESLint rules for Payload project structure, access code and hooks
Manifest, linter and Payload block generator for a design system's components
Automated code transforms that move a Payload project past breaking changes
Idempotent seed runner that fills a Payload database with ordered, cross-referenced content