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 seller store.
Goal
Allow users to become sellers on the marketplace.
Context
Seller onboarding.
Emitted Events
•
`marketplace.store.created` (v1.0.0)
Source Definition
import { defineCommand } from '@lssm-tech/lib.contracts-spec/operations';
import { CreateStoreInputModel, StoreModel } from './store.schema';
export const CreateStoreContract = defineCommand({
meta: {
key: 'marketplace.store.create',
version: '1.0.0',
stability: 'stable',
owners: ['@example.marketplace'],
tags: ['marketplace', 'store', 'create'],
description: 'Create a new seller store.',
goal: 'Allow users to become sellers on the marketplace.',
context: 'Seller onboarding.',
},
io: { input: CreateStoreInputModel, output: StoreModel },
policy: { auth: 'user' },
sideEffects: {
emits: [
{
key: 'marketplace.store.created',
version: '1.0.0',
when: 'Store is created',
payload: StoreModel,
},
],
audit: ['marketplace.store.created'],
},
acceptance: {
scenarios: [
{
key: 'create-store-happy-path',
given: ['User is authenticated'],
when: ['User creates a new store'],
then: ['Store is created', 'StoreCreated event is emitted'],
},
],
examples: [
{
key: 'create-fashion-store',
input: { name: 'Fashion Boutique', category: 'clothing' },
output: { id: 'store-123', status: 'active' },
},
],
},
});