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.
Get a project by ID.
Goal
Retrieve project details.
Context
Project detail page, API calls.
Source Definition
import {
defineCommand,
defineQuery,
} from '@lssm-tech/lib.contracts-spec/operations';
import {
CreateProjectInputModel,
DeleteProjectInputModel,
DeleteProjectOutputModel,
GetProjectInputModel,
ListProjectsInputModel,
ListProjectsOutputModel,
ProjectDeletedPayloadModel,
ProjectModel,
UpdateProjectInputModel,
} from './project.schema';
export const GetProjectContract = defineQuery({
meta: {
key: 'saas.project.get',
version: '1.0.0',
stability: 'stable',
owners: ['example.saas-boilerplate'],
tags: ['saas', 'project', 'get'],
description: 'Get a project by ID.',
goal: 'Retrieve project details.',
context: 'Project detail page, API calls.',
},
io: {
input: GetProjectInputModel,
output: ProjectModel,
errors: {
NOT_FOUND: {
description: 'Project not found',
http: 404,
gqlCode: 'NOT_FOUND',
when: 'Project ID is invalid or user lacks access',
},
},
},
policy: {
auth: 'user',
},
acceptance: {
scenarios: [
{
key: 'get-project-happy-path',
given: ['Project exists'],
when: ['User requests project'],
then: ['Project details are returned'],
},
],
examples: [
{
key: 'get-existing',
input: { projectId: 'proj-123' },
output: { id: 'proj-123', name: 'Website Redesign' },
},
],
},
});