VexClientConfigInput
Defined in: packages/core/src/config/types.ts:324
User-facing, client-safe configuration input passed to defineConfig().
Every property here is safe to import directly into a browser bundle: no
server SDKs, no environment variables, no class instances. Auth
collections reach this input as plain data — built by the auth package’s
own client-safe builder (e.g. betterAuthCollections() from
@vexcms/better-auth/client) — never as the live auth adapter, which
requires the full server-side auth options object.
Example
Section titled “Example”// Register a collectiondefineConfig({ collections: [ defineCollection({ slug: "posts", fields: { title: text() } }), ],});
// Register collections and customise the admin paneldefineConfig({ admin: { sidebar: { side: "right" } }, collections: [posts, authors],});- VexClientConfig for the resolved return type
- VexServerConfigInput for the server-only half layered on by
defineServerConfig() - defineConfig for the config function
Properties
Section titled “Properties”access?
Section titled “access?”
optionalaccess?:VexAccessConfig<Record<string,SubjectEntry>, readonlyAccessResource[],string,string|undefined,Partial<Record<string,CustomActionsInput>>>
Defined in: packages/core/src/config/types.ts:336
admin?
Section titled “admin?”
optionaladmin?:AdminConfigInput
Defined in: packages/core/src/config/types.ts:335
Admin panel configuration. All properties are optional — omitted values fall back to defaults.
Defaults applied by defineConfig():
{ sidebar: { side: "left" } }AdminConfigInput for all available options
authCollections?
Section titled “authCollections?”
optionalauthCollections?:AuthCollectionConfig[]
Defined in: packages/core/src/config/types.ts:366
Auth collections the project’s auth package derived from its auth schema
— e.g. betterAuthCollections(authSchema) from
@vexcms/better-auth/client. defineConfig() treats a missing value as
[], which is the correct shape for a project with no auth.
Authoring these by hand is possible but pointless: they are merged with
collections exactly as the live adapter merges them, and
defineServerConfig() throws when they disagree with the registered
adapter.
- AuthCollectionConfig for the shape
- mergeAuthCollections for the merge logic
basePath?
Section titled “basePath?”
optionalbasePath?:string
Defined in: packages/core/src/config/types.ts:373
URL prefix for all admin panel routes.
Default: "/admin". Override when mounting the admin UI at a custom path
(e.g. "/cms" or "/dashboard/admin").
collections?
Section titled “collections?”
optionalcollections?:CollectionConfig<{ }, { },string,Record<string,AdminField>,ComponentHKT,boolean,boolean,string>[]
Defined in: packages/core/src/config/types.ts:338
Content collections to register with the CMS. Defaults to [] if omitted.
editor?
Section titled “editor?”
optionaleditor?:VexEditorAdapter<ComponentHKT>
Defined in: packages/core/src/config/types.ts:437
Root rich-text editor adapter, used by every richtext() field in every
collection — there is exactly one editor per project (ADR-013), set once
here rather than per-field.
Type-erased to ComponentHKT at this level, the same way
collections: CollectionConfig[] already erases each collection’s own
TComponent binding — a concrete adapter (e.g. plateEditor() from
@vexcms/richtext-plate, typed VexEditorAdapter<ReactHKT>) is still
assignable here because its component slots resolve to a real component
type, and any real type is assignable into this slot’s erased unknown.
Omitted entirely for a project with no rich-text fields. A collection
that declares a richtext() field while this is absent renders a
configuration error in the admin Input instead of crashing or falling
back to a plain textarea (Step 3).
- VexEditorAdapter for the adapter shape
- RelationshipFieldAdminInput.components.preview for the same
ComponentHKTerasure pattern on a per-field (rather than root) slot
fields?
Section titled “fields?”
optionalfields?:VexFieldsConfigInput
Defined in: packages/core/src/config/types.ts:448
Project-wide field behavior defaults.
Defaults applied by defineConfig():
{ inputMasks: {} }VexFieldsConfigInput for all available options
globals?
Section titled “globals?”
optionalglobals?:GlobalConfig<{ }, { },string,Record<string,AdminField<{ }>>,ComponentHKT,boolean>[]
Defined in: packages/core/src/config/types.ts:340
Singleton global documents. Each produced by defineGlobal(). Slugs must be unique.
mediaCollections?
Section titled “mediaCollections?”
optionalmediaCollections?:MediaCollectionConfig[]
Defined in: packages/core/src/config/types.ts:351
Media collections declared directly on the client config. Each entry
is the output of a storage package’s defineMediaCollection()
(e.g. file-storage-convex/src!defineMediaCollection from
@vexcms/file-storage-convex/client), which is itself client-safe.
defineServerConfig() checks that every entry’s meta.storageAdapter
names a registered adapter.
MediaCollectionConfig for the resolved shape
routes?
Section titled “routes?”
optionalroutes?:VexRoutesConfig
Defined in: packages/core/src/config/types.ts:385
Maps documents to the public paths that render them. Omit for a project with no public pages, or whose public pages read no CMS documents.
Cache revalidation is its first consumer — a save purges the paths map
returns — but the same answer also drives admin “View page” links, sitemap
URLs, and preview links, so it is named for what it describes rather than
for one user of it.
VexRoutesConfig for all available options
schema?
Section titled “schema?”
optionalschema?:SchemaConfigInput
Defined in: packages/core/src/config/types.ts:409
Schema generation configuration — output path and auto-migration flags. All properties are optional; omitted values fall back to defaults.
Read only by the CLI (packages/cli/src/lib/generateSchema.ts), never by
the browser — but it lives here rather than on the server config because
it is a plain settings object that breaks nothing in a client bundle, and
vex.config.ts is the one file the developer edits for settings.
SchemaConfigInput for all available options
storage?
Section titled “storage?”
optionalstorage?:object
Defined in: packages/core/src/config/types.ts:395
Client-side upload functions, keyed by storage adapter slug.
These are the only storage-adapter-shaped values allowed on the client
config — plain functions, never the adapter class instance.
useStorageAdapterMap() reads this map directly.
clientUploads?
Section titled “clientUploads?”
optionalclientUploads?:ClientUploadMap
ClientUploadMap for the value shape
types?
Section titled “types?”
optionaltypes?:TypesConfigInput
Defined in: packages/core/src/config/types.ts:415
Type generation configuration — where vex.types.ts is written.
TypesConfigInput for all available options