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.

saas-boilerplate

SaaS application foundation with projects, billing, and settings

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @saas-team
  • Tags: saas, projects, billing
  • File: packages/examples/saas-boilerplate/src/saas-boilerplate.feature.ts
  • field.key.label
    saas-boilerplate
    field.version.label
    1.0.0
    field.type.label
    feature
    field.title.label
    saas-boilerplate
    field.description.label

    SaaS application foundation with projects, billing, and settings

  • Type: feature
  • Version: 1.0.0
  • Stability: experimental
  • Owners: @saas-team
  • Tags: saas, projects, billing
  • File: packages/examples/saas-boilerplate/src/saas-boilerplate.feature.ts
  • field.tags.label
    saas,projects,billing
    field.owners.label
    @saas-team
    field.stability.label
    experimental

    SaaS application foundation with projects, billing, and settings

    Operations (9)

    `saas.project.create` (v1.0.0)

    `saas.project.get` (v1.0.0)

    `saas.project.update` (v1.0.0)

    `saas.project.delete` (v1.0.0)

    `saas.project.list` (v1.0.0)

    `saas.billing.subscription.get` (v1.0.0)

    `saas.billing.usage.record` (v1.0.0)

    `saas.billing.usage.summary` (v1.0.0)

    `saas.billing.feature.check` (v1.0.0)

    Events (7)

    `project.created` (v1.0.0)

    `project.updated` (v1.0.0)

    `project.deleted` (v1.0.0)

    `project.archived` (v1.0.0)

    `billing.usage.recorded` (v1.0.0)

    `billing.subscription.changed` (v1.0.0)

    `billing.limit.reached` (v1.0.0)

    Presentations (6)

    `saas.dashboard` (v1.0.0)

    `saas.project.list` (v1.0.0)

    `saas.project.detail` (v1.0.0)

    `saas.billing.subscription` (v1.0.0)

    `saas.billing.usage` (v1.0.0)

    `saas.settings` (v1.0.0)

    Source Definition

    /**
     * SaaS Boilerplate Feature Module Specification
     *
     * Defines the feature module for the SaaS application foundation.
     */
    import { defineFeature } from '@lssm-tech/lib.contracts-spec';
    import { SaasVisualizationRefs } from './visualizations';
    
    /**
     * SaaS Boilerplate feature module that bundles project management,
     * billing, and settings operations into an installable feature.
     */
    export const SaasBoilerplateFeature = defineFeature({
    	meta: {
    		key: 'saas-boilerplate',
    		title: 'SaaS Boilerplate',
    		description:
    			'SaaS application foundation with projects, billing, and settings',
    		domain: 'saas',
    		owners: ['@saas-team'],
    		tags: ['saas', 'projects', 'billing'],
    		stability: 'experimental',
    		version: '1.0.0',
    	},
    
    	// All contract operations included in this feature
    	operations: [
    		// Project operations
    		{ key: 'saas.project.create', version: '1.0.0' },
    		{ key: 'saas.project.get', version: '1.0.0' },
    		{ key: 'saas.project.update', version: '1.0.0' },
    		{ key: 'saas.project.delete', version: '1.0.0' },
    		{ key: 'saas.project.list', version: '1.0.0' },
    
    		// Billing operations
    		{ key: 'saas.billing.subscription.get', version: '1.0.0' },
    		{ key: 'saas.billing.usage.record', version: '1.0.0' },
    		{ key: 'saas.billing.usage.summary', version: '1.0.0' },
    		{ key: 'saas.billing.feature.check', version: '1.0.0' },
    	],
    
    	// Events emitted by this feature
    	events: [
    		// Project events
    		{ key: 'project.created', version: '1.0.0' },
    		{ key: 'project.updated', version: '1.0.0' },
    		{ key: 'project.deleted', version: '1.0.0' },
    		{ key: 'project.archived', version: '1.0.0' },
    
    		// Billing events
    		{ key: 'billing.usage.recorded', version: '1.0.0' },
    		{ key: 'billing.subscription.changed', version: '1.0.0' },
    		{ key: 'billing.limit.reached', version: '1.0.0' },
    	],
    
    	// Presentations associated with this feature
    	presentations: [
    		{ key: 'saas.dashboard', version: '1.0.0' },
    		{ key: 'saas.project.list', version: '1.0.0' },
    		{ key: 'saas.project.detail', version: '1.0.0' },
    		{ key: 'saas.billing.subscription', version: '1.0.0' },
    		{ key: 'saas.billing.usage', version: '1.0.0' },
    		{ key: 'saas.settings', version: '1.0.0' },
    	],
    
    	// Link operations to their primary presentations
    	opToPresentation: [
    		{
    			op: { key: 'saas.project.list', version: '1.0.0' },
    			pres: { key: 'saas.project.list', version: '1.0.0' },
    		},
    		{
    			op: { key: 'saas.project.get', version: '1.0.0' },
    			pres: { key: 'saas.project.detail', version: '1.0.0' },
    		},
    		{
    			op: { key: 'saas.billing.subscription.get', version: '1.0.0' },
    			pres: { key: 'saas.billing.subscription', version: '1.0.0' },
    		},
    		{
    			op: { key: 'saas.billing.usage.summary', version: '1.0.0' },
    			pres: { key: 'saas.billing.usage', version: '1.0.0' },
    		},
    	],
    
    	// Target requirements for multi-surface rendering
    	presentationsTargets: [
    		{ key: 'saas.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },
    		{
    			key: 'saas.project.list',
    			version: '1.0.0',
    			targets: ['react', 'markdown', 'application/json'],
    		},
    		{
    			key: 'saas.billing.subscription',
    			version: '1.0.0',
    			targets: ['react', 'markdown'],
    		},
    		{
    			key: 'saas.billing.usage',
    			version: '1.0.0',
    			targets: ['react', 'markdown'],
    		},
    	],
    
    	visualizations: SaasVisualizationRefs,
    
    	// Capability requirements
    	capabilities: {
    		requires: [
    			{ key: 'identity', version: '1.0.0' },
    			{ key: 'audit-trail', version: '1.0.0' },
    			{ key: 'notifications', version: '1.0.0' },
    		],
    	},
    
    	telemetry: [{ key: 'saas-boilerplate.telemetry', version: '1.0.0' }],
    
    	jobs: [{ key: 'saas-boilerplate.job.usage-recording', version: '1.0.0' }],
    
    	docs: [
    		'docs.examples.saas-boilerplate.goal',
    		'docs.examples.saas-boilerplate.usage',
    		'docs.examples.saas-boilerplate.reference',
    		'docs.examples.saas-boilerplate.constraints',
    	],
    });