OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Create a new client.
Goal
Onboard clients.
Context
CRM.
Source Definition
import { defineCommand } from '@lssm-tech/lib.contracts-spec';
import { ClientModel, CreateClientInputModel } from './client.schema';
export const CreateClientContract = defineCommand({
meta: {
key: 'service.client.create',
version: '1.0.0',
stability: 'stable',
owners: ['@examples.service-business-os'],
tags: ['service-business-os', 'client', 'create'],
description: 'Create a new client.',
goal: 'Onboard clients.',
context: 'CRM.',
},
io: {
input: CreateClientInputModel,
output: ClientModel,
},
policy: { auth: 'user' },
acceptance: {
scenarios: [
{
key: 'create-client-happy-path',
given: ['User is authenticated'],
when: ['User creates a new client'],
then: ['Client is created'],
},
],
examples: [
{
key: 'create-basic',
input: {
name: 'Acme Corp',
email: 'contact@acme.com',
phone: '555-0123',
},
output: { id: 'client-123', name: 'Acme Corp' },
},
],
},
});