@multisystemsuite/studio-core
v3.0.0
Published
Core schema engine, logic engine, validation, and types for MultiSystemSuite Studio
Readme
@multisystemsuite/studio-core
The foundation of MultiSystem Studio — everything else builds on this package.
What is it?
studio-core defines how apps are stored and validated:
- JSON schema — pages, components, themes, and metadata
- Validation — required fields, email, min/max, custom rules
- Logic engine — show/hide fields, calculations, conditional actions
- Types — TypeScript definitions shared across all packages
Think of it as the “brain” that understands your app structure. It does not render UI — that’s studio-renderer.
When to use it
- Building a custom integration that reads/writes Studio JSON
- Adding validation or logic without the visual builder
- Registering new component types in the platform
- Server-side schema validation
Install
pnpm add @multisystemsuite/studio-coreQuick example
import {
createSchema,
createComponent,
addComponentToPage,
exportSchema,
importSchema,
} from '@multisystemsuite/studio-core';
// Create a blank app
const schema = createSchema({ name: 'Contact Form' });
// Add a text field to the first page
const pageId = schema.pages[0].id;
const field = createComponent('text-input', { label: 'Full Name' });
const updated = addComponentToPage(schema, pageId, field);
// Save as JSON string
const json = exportSchema(updated);
// Load back later
const loaded = importSchema(json);Main exports
| Area | Examples |
|------|----------|
| Schema | createSchema, addComponentToPage, exportSchema, importSchema |
| Components | createComponent, findComponent, duplicateComponent |
| Validation | Rule types, validators (via validation module) |
| Logic | Conditions and actions (via logic module) |
| Plugins | registerPlugin, registerComponent |
Related packages
- studio-renderer — renders schemas as React UI
- studio-builder — visual editor that uses this schema format
- studio-forms / studio-survey — component libraries registered on top of core types
License
MIT
