ObjectStackObjectStack

Dev Plugin

Dev Plugin protocol schemas

Dev Mode Plugin Protocol

Defines the schema for a development-mode plugin that automatically enables

all platform services for local simulation. When loaded as a devPlugin,

the kernel bootstraps every subsystem (data, UI, API, auth, events, jobs, …)

using in-memory or stub implementations so that developers can exercise the

full stack without external dependencies.

Design goals:

  • Zero-config by default: devPlugins: ['@objectstack/plugin-dev']

  • Every service can be overridden or disabled individually

  • Preset profiles (minimal / standard / full) for common scenarios

Inspired by:

  • Spring Boot DevTools (auto-configuration)

  • Next.js Dev Server (HMR + mock APIs)

  • Vite Plugin Dev Mode (instant startup)

Source: packages/spec/src/kernel/dev-plugin.zod.ts

TypeScript Usage

import { DevFixtureConfig, DevPluginConfig, DevPluginPreset, DevServiceOverride, DevToolsConfig } from '@objectstack/spec/kernel';
import type { DevFixtureConfig, DevPluginConfig, DevPluginPreset, DevServiceOverride, DevToolsConfig } from '@objectstack/spec/kernel';

// Validate data
const result = DevFixtureConfig.parse(data);

DevFixtureConfig

Properties

PropertyTypeRequiredDescription
enabledbooleanLoad fixture data on startup
pathsstring[]optionalGlob patterns for fixture files
resetBeforeLoadbooleanClear existing data before loading fixtures
envFilterstring[]optionalOnly load fixtures matching these environment tags

DevPluginConfig

Properties

PropertyTypeRequiredDescription
presetEnum<'minimal' | 'standard' | 'full'>Base configuration preset
servicesRecord<string, Object>optionalPer-service dev overrides keyed by service name
fixturesObjectoptionalFixture data loading configuration
toolsObjectoptionalDeveloper tooling settings
portintegerPort for the dev-tools dashboard
openbooleanAuto-open dev dashboard in browser
seedAdminUserbooleanCreate a default admin user for development
simulatedLatencyintegerArtificial latency (ms) added to service calls

DevPluginPreset

Predefined dev configuration profile

Allowed Values

  • minimal
  • standard
  • full

DevServiceOverride

Properties

PropertyTypeRequiredDescription
servicestringTarget service identifier
enabledbooleanEnable or disable this service
strategyEnum<'mock' | 'memory' | 'stub' | 'passthrough'>Implementation strategy for development
configRecord<string, any>optionalStrategy-specific configuration for this service override

DevToolsConfig

Properties

PropertyTypeRequiredDescription
hotReloadbooleanEnable HMR / live-reload
requestInspectorbooleanEnable request inspector
dbExplorerbooleanEnable database explorer UI
verboseLoggingbooleanEnable verbose logging
apiDocsbooleanServe OpenAPI docs at /_dev/docs
mailCatcherbooleanCapture outbound emails in dev

On this page