CodeVetter · Repo Unpack · Extension points
payloadcms/payload
Configuration transformation is the primary extension mechanism. Runtime factories bind database, storage, authentication, and email implementations to a Payload instance. Endpoint tables and CLI command definitions expose additional behavior without replacing the core operation pipeline. Admin components, lifecycle hooks, jobs, and rich-text features provide more targeted customization surfaces.
- Plugins are ordered config-to-config transformations: buildConfig sorts by plugin.order with zero as the default and awaits each result before sanitization.
- Storage adapters belong in config.storage and must expose init; s3Storage returns a named adapter with collection membership and an init function that binds cloud-storage behavior.
- createDatabaseAdapter supplies default batching, copy, migration, and null transaction implementations that adapter arguments can override; postgresAdapter also accepts schema lifecycle hooks and query operator handlers.
- Root, collection, and global endpoint arrays are dispatched by method plus path-to-regexp matching; route parameters receive the resolved collection/global slug, and endpoints:false disables that endpoint surface.
- Custom auth strategies are collected from auth-enabled collections before API-key/local JWT behavior; executeAuthStrategies invokes them in order, merges response headers, logs thrown errors, and returns on the first user.
- config.cli.commands overrides built-ins and accepts disabled entries or dynamically imported command definitions; loading resolves paths relative to configDir and validates name/alias conflicts.
- Admin customization types expose providers, navigation, sidebar tabs, user-menu settings, named/custom views, dashboard widgets, dependencies, and import-map generators.
- Collection hooks can transform create data before validation/change and results after read/change; jobs tasks/workflows enable internal queue collections, while Lexical exposes replaceable feature composition.