---
title: Dev Plugin
description: Dev Plugin protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

# 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)

<Callout type="info">
**Source:** `packages/spec/src/kernel/dev-plugin.zod.ts`
</Callout>

## TypeScript Usage

```typescript
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

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **enabled** | `boolean` | ✅ | Load fixture data on startup |
| **paths** | `string[]` | optional | Glob patterns for fixture files |
| **resetBeforeLoad** | `boolean` | ✅ | Clear existing data before loading fixtures |
| **envFilter** | `string[]` | optional | Only load fixtures matching these environment tags |


---

## DevPluginConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **preset** | `Enum<'minimal' \| 'standard' \| 'full'>` | ✅ | Base configuration preset |
| **services** | `Record<string, Object>` | optional | Per-service dev overrides keyed by service name |
| **fixtures** | `Object` | optional | Fixture data loading configuration |
| **tools** | `Object` | optional | Developer tooling settings |
| **port** | `integer` | ✅ | Port for the dev-tools dashboard |
| **open** | `boolean` | ✅ | Auto-open dev dashboard in browser |
| **seedAdminUser** | `boolean` | ✅ | Create a default admin user for development |
| **simulatedLatency** | `integer` | ✅ | Artificial latency (ms) added to service calls |


---

## DevPluginPreset

Predefined dev configuration profile

### Allowed Values

* `minimal`
* `standard`
* `full`


---

## DevServiceOverride

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **service** | `string` | ✅ | Target service identifier |
| **enabled** | `boolean` | ✅ | Enable or disable this service |
| **strategy** | `Enum<'mock' \| 'memory' \| 'stub' \| 'passthrough'>` | ✅ | Implementation strategy for development |
| **config** | `Record<string, any>` | optional | Strategy-specific configuration for this service override |


---

## DevToolsConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **hotReload** | `boolean` | ✅ | Enable HMR / live-reload |
| **requestInspector** | `boolean` | ✅ | Enable request inspector |
| **dbExplorer** | `boolean` | ✅ | Enable database explorer UI |
| **verboseLogging** | `boolean` | ✅ | Enable verbose logging |
| **apiDocs** | `boolean` | ✅ | Serve OpenAPI docs at /_dev/docs |
| **mailCatcher** | `boolean` | ✅ | Capture outbound emails in dev |


---

