Skip to Content
SchemaSchema Configuration

Schema Configuration

Use defineConfig() to register one project or multiple projects.

Single Project

React
import { defineConfig } from '@flexkit/studio';
import { products } from './schema/products';
import { categories } from './schema/categories';
 
export default defineConfig({
  title: 'Commerce',
  projectId: 'commerce123',
  basePath: '/studio',
  menuGroups: [
    { title: 'Catalog', name: 'catalog' },
    { title: 'Operations', name: 'operations' },
  ],
  scopes: [
    { name: 'default', label: 'Default', isDefault: true },
    { name: 'es', label: 'Spain' },
    { name: 'fr', label: 'France' },
  ],
  schema: [products, categories],
});

Multiple Projects

React
import { defineConfig } from '@flexkit/studio';
import { crmDeals } from './schema/crm/deals';
import { crmContacts } from './schema/crm/contacts';
import { erpSuppliers } from './schema/erp/suppliers';
 
export default defineConfig([
  {
    title: 'CRM',
    projectId: 'crm123',
    basePath: '/studio',
    schema: [crmDeals, crmContacts],
  },
  {
    title: 'ERP',
    projectId: 'erp123',
    basePath: '/studio',
    schema: [erpSuppliers],
  },
]);

Config Fields

  • title?: string project label shown in UI.
  • projectId: string unique project identifier.
  • basePath?: string studio route path.
  • schema: Entity[] list of entities created with defineEntity.
  • menuGroups?: { title: string; name: string }[] group names used by entity.menu.group.
  • scopes?: { name: string; label: string; isDefault?: boolean; sortOrder?: number }[]
  • plugins?: PluginOptions[] plugin system for apps, commands, custom fields, previews, and navbar overrides.

Plugin Extension Points (Summary)

Plugins can contribute:

  • apps
  • formFields (custom inputType UI)
  • previewFields
  • commands
  • navbar overrides (logo, projectSelector, search)

Use plugins when you need custom form behavior or additional Studio modules beyond schema modeling.

Last updated on

© 2026