Skip to main content

Item Types Reference

Cascadia PLM manages engineering data through item types -- typed records that represent the artifacts of product development. Every item in the system is an instance of a registered item type, and all items share common base fields while carrying type-specific data in a companion table.

This document covers every core item type: its purpose, database schema, lifecycle, relationships, API surface, and UI pages.


The Two-Table Pattern

All item types in Cascadia follow a two-table pattern:

  1. items table -- holds fields shared by every item (identity, versioning, audit trail, SysML metadata).
  2. Type-specific table (e.g., parts, documents, change_orders) -- holds fields unique to that type, joined via item_id foreign key.

ItemService manages both tables transparently. When you create a Part, it inserts one row into items and one into parts. The itemType discriminator column on items tells the system which companion table to join.

Base Item Fields (all types)

ColumnTypeDescription
idUUID (PK)Unique row identifier
master_idUUIDStable identity across revisions (all revisions of the same item share this)
item_numbervarchar(100)Human-readable identifier (e.g., PN-000001)
revisionvarchar(10)Revision letter/number (assigned on ECO merge for driven types)
item_typevarchar(50)Discriminator: Part, Document, ChangeOrder, etc.
namevarchar(500)Display name
statevarchar(50)Current lifecycle state (e.g., Draft, Released)
is_currentbooleanWhether this is the current version
design_idUUID (FK)Which design this item belongs to
commit_idUUID (FK)Which commit introduced this version
in_design_structurebooleanWhether part appears as root in BOM tree
attributesJSONBExtensible key-value attributes
metamodelvarchar(50)cascadia, sysml2, or kerml
sysml_typevarchar(100)SysML v2 type mapping
usage_ofUUIDIf set, this item is a "usage" referencing a definition item (SysML v2 pattern)
is_deletedbooleanSoft delete flag
locked_by / locked_atUUID / timestampPessimistic lock for checkout
created_at / created_bytimestamp / UUIDAudit: creation
modified_at / modified_bytimestamp / UUIDAudit: last modification

Item Numbering

Each item type has a default numbering scheme defined in src/lib/items/numbering/schemes.ts:

Item TypePrefixExample
PartPNPN-000001
DocumentDOCDOC-000001
ChangeOrderECOECO-000001
RequirementREQREQ-000001
TaskTSKTSK-000001
TestPlanTPTP-000001
TestCaseTCTC-000001
IssueISSISS-000001
WorkInstructionWIWI-000001

Most types allow manual entry of item numbers. Change Orders are always auto-numbered. Parts support family variant numbering (e.g., PN-000001-001).

Lifecycle Categories

Item types use one of three lifecycle categories:

  • Driven -- state transitions are controlled by ECOs. Cannot be modified on main directly. (Part, Document, Requirement)
  • Driving -- the ECO itself, which controls Driven lifecycles. (ChangeOrder)
  • Free -- self-controlled, no ECO required. Can transition states independently. (Task, TestPlan, TestCase, WorkInstruction, Issue)

1. Part

Purpose: Represents a physical or logical component in the product structure. Parts are the primary building blocks of BOMs (Bills of Materials) and are the most common item type in any PLM system.

Lifecycle: Driven (controlled by ECOs)

Default State: Draft

Numbering: PN-000001 (family variants: PN-000001-001)

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
descriptiontextDetailed part description
part_typevarchar(20)Manufacture, Purchase, Phantom, or Software
materialvarchar(100)Material specification (e.g., Aluminum 6061)
weightdecimal(10,3)Part weight
weight_unitvarchar(10)Unit of weight (default: kg)
costdecimal(10,2)Unit cost
cost_currencyvarchar(3)Currency code (default: USD)
lead_time_daysintegerProcurement/manufacturing lead time
quantity_on_handintegerCurrent inventory count
reorder_pointintegerInventory reorder threshold
locationtextStorage location
last_inventory_checktimestampLast physical inventory date

Part Types

Part TypeDescription
ManufactureFabricated in-house from raw materials or sub-assemblies
PurchaseProcured from external suppliers (COTS components)
PhantomLogical grouping that does not exist as a physical unit (used for BOM structure)
SoftwareSoftware component or firmware

Lifecycle States

Draft -> In Review -> Approved -> Released -> Obsolete

Relationships

RelationshipTarget TypeDescription
BOMPartBill of Materials (parent-child assembly structure)
DocumentDocumentAttached drawings, specs, datasheets
ChangeChangeOrderECOs affecting this part

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=PartSearch/list parts
GET/api/items/$idGet part by ID (with optional ?branch=, ?commit=, ?tag= context)
POST/api/items/$idCreate part
PUT/api/items/$idUpdate part
DELETE/api/items/$idDelete part
GET/api/parts/$idPart-specific detail endpoint
GET/api/parts/$id/validating-testsGet test cases that validate this part
GET/api/items/$id/historyVersion history
POST/api/items/$id/checkinCheck in after editing
POST/api/items/$id/cancel-checkoutCancel checkout
GET/api/items/$id/lock-statusCheck lock status
POST/api/items/$id/unlockForce unlock
POST/api/items/$itemId/files/uploadUpload file attachment (CAD model, drawing)
GET/api/items/$itemId/filesList attached files
GET/api/items/$itemId/files/primaryGet primary CAD model
GET/api/items/$id/thumbnailGet thumbnail image

UI Pages

PathComponentDescription
/partsParts indexList/search all parts
/parts/newPartFormCreate new part
/parts/$idPart detailView part details, BOM, files, history

Key Files

  • Schema: src/lib/db/schema/items.ts (parts table)
  • Types: src/lib/items/types/part.ts
  • Form: src/components/parts/PartForm.tsx

2. Document

Purpose: Version-controlled file containers for engineering documents -- drawings, specifications, datasheets, test reports, and any other files that need formal revision control.

Lifecycle: Driven (controlled by ECOs)

Default State: Draft

Numbering: DOC-000001

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
descriptiontextDocument description
file_idUUIDReference to file in vault storage
file_namevarchar(500)Original file name
file_sizeintegerFile size in bytes
mime_typevarchar(100)MIME type (e.g., application/pdf)
storage_pathtextPath in vault storage

Lifecycle States

Draft -> In Review -> Approved -> Released -> Obsolete

Relationships

RelationshipTarget TypeDescription
PartPartParts this document describes or specifies
ChangeChangeOrderECOs affecting this document

File Management

Documents integrate with the vault file system for version-controlled file storage. Files support:

  • Check-out/check-in workflow via /api/files/$fileId/checkout and /api/files/$fileId/checkin
  • Version history via /api/files/$fileId/versions
  • Download via /api/files/$fileId/versions/$version/download
  • CAD conversion via /api/files/$fileId/convert (STEP/IGES to STL/GLB)
  • Metadata via /api/files/$fileId/metadata

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=DocumentSearch/list documents
GET/api/items/$idGet document by ID
POST/api/items/$idCreate document
PUT/api/items/$idUpdate document
DELETE/api/items/$idDelete document
GET/api/documents/$idDocument-specific detail endpoint
POST/api/filesUpload a new file
GET/api/files/$fileIdGet file metadata
POST/api/files/$fileId/checkoutCheck out file for editing
POST/api/files/$fileId/checkinCheck in edited file
GET/api/files/$fileId/versionsList file versions
GET/api/files/$fileId/versions/$version/downloadDownload specific version
POST/api/files/$fileId/convertConvert CAD file (STEP to STL/GLB)

UI Pages

PathComponentDescription
/documentsDocuments indexList/search all documents
/documents/newDocumentFormCreate new document with file upload
/documents/$idDocument detailView document, download files, version history

Key Files

  • Schema: src/lib/db/schema/items.ts (documents table)
  • Types: src/lib/items/types/document.ts
  • Form: src/components/documents/DocumentForm.tsx
  • Vault schema: src/lib/db/schema/vault.ts

3. Change Order

Purpose: Formalizes engineering changes through a structured approval workflow. Change Orders are the "driving" mechanism of Cascadia's ECO-as-Branch model -- creating an ECO creates an isolated branch where engineers can make changes without affecting the released baseline on main.

Lifecycle: Driving (controls Driven lifecycles for Parts, Documents, Requirements)

Default State: Draft

Numbering: ECO-000001 (always auto-numbered)

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
change_typevarchar(20)ECO, ECN, Deviation, MCO, or XCO
priorityvarchar(20)low, medium, high, or critical
reason_for_changetextWhy the change is needed
impact_descriptiontextWhat areas are affected
implementation_datetimestampTarget implementation date
submitted_attimestampWhen the ECO was submitted for review
approved_attimestampWhen the ECO was approved
approved_byUUID (FK to users)Who approved the ECO
implemented_attimestampWhen changes were implemented
closed_attimestampWhen the ECO was closed
impact_assessment_statusvarchar(20)pending, in_progress, completed, failed
risk_levelvarchar(20)low, medium, high, critical
is_baselinebooleanWhether to create a baseline on release
baseline_namevarchar(100)Name for the baseline

Change Order Types

TypeFull NameDescription
ECOEngineering Change OrderStandard engineering change (most common)
ECNEngineering Change NoticeNotification of a change (informational)
MCOManufacturing Change OrderManufacturing process change
DeviationDeviationTemporary departure from released configuration
XCOCross-Functional Change OrderChanges spanning multiple functional areas

Change Actions

Each affected item on an ECO has a change action:

ActionDescription
releaseRelease a new item for the first time
reviseCreate a new revision of an existing item
obsoleteMark an item as obsolete
addAdd a new item to the design
removeRemove an item from the design
promotePromote an item to a new lifecycle state

Lifecycle States

Draft -> Submitted -> Impact Assessment -> Review -> Approved -> Implementation -> Implemented -> Closed

Also: Rejected (from Review)

The Change Order has several supporting tables beyond the main change_orders table:

TableDescription
change_order_affected_itemsItems directly affected by this ECO, with change action and working copies
change_order_impacted_itemsItems discovered by impact analysis (where-used, BOM children, etc.)
change_order_risksRisk assessments (inventory, production, cost, schedule, compliance, quality, cross-design)
change_order_impact_reportsSummary reports of impact analysis runs
change_order_designsDesigns affected by this ECO, with branch/merge status

ECO-as-Branch Workflow

  1. Create ECO -- An ECO item is created, and a branch record is established in change_order_designs for each affected design.
  2. Add affected items -- Items are added with change actions (revise, add, obsolete, etc.).
  3. Checkout -- Items are checked out to the ECO branch via CheckoutService. Working copies are created on the branch for revise actions.
  4. Edit -- Engineers modify working copies on the branch. Changes are isolated from main.
  5. Impact assessment -- ImpactAssessmentService discovers downstream impacts (where-used, BOM children, document references).
  6. Submit and review -- ECO transitions through workflow states. Approvers review changes.
  7. Approve and release -- On final approval, EcoReleaseService merges the branch to main, assigns revision letters (A, B, C...), and updates lifecycle states.

Relationships

RelationshipTarget TypeDescription
AffectsPart, Document, ChangeOrderItems affected by this change
DocumentDocumentSupporting documentation

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=ChangeOrderSearch/list change orders
GET/api/change-orders/$idGet change order with full details
POST/api/items/$idCreate change order
PUT/api/items/$idUpdate change order
GET/api/change-orders/$id/affected-itemsList affected items
POST/api/change-orders/$id/affected-itemsAdd affected item
POST/api/change-orders/$id/checkoutCheckout items to ECO branch
GET/api/change-orders/$id/designsList designs affected by ECO
GET/api/change-orders/$id/designs/$designId/structureView BOM structure on ECO branch
POST/api/change-orders/$id/impact-assessmentRun impact assessment
GET/api/change-orders/$id/risksList risk assessments
GET/api/change-orders/$id/conflictsDetect merge conflicts
POST/api/change-orders/$id/resolve-conflictsResolve merge conflicts
GET/api/change-orders/$id/conflict-reviewsReview conflict resolutions
POST/api/change-orders/$id/releaseRelease (merge to main)
GET/api/change-orders/$id/summaryGet ECO summary
GET/api/change-orders/$id/bom-changesView BOM-level changes
GET/api/change-orders/$id/branch-historyView branch commit history
GET/api/change-orders/$id/branch-history/graphVisual commit graph
POST/api/change-orders/$id/workflow/transitionTransition workflow state
GET/api/change-orders/$id/workflow/validate-transitionValidate a transition before executing
GET/api/change-orders/$id/workflow/historyWorkflow transition history
GET/api/change-orders/$id/workflow/structureWorkflow definition structure
GET/api/change-orders/$id/approvalsList approval records
GET/api/change-orders/$id/approvals/can-approveCheck if current user can approve
POST/api/change-orders/$id/approvals/$stateIdSubmit approval/rejection
GET/api/change-orders/editableList ECOs the user can edit

UI Pages

PathComponentDescription
/change-ordersChange Orders indexList/search all ECOs
/change-orders/newChangeOrderFormCreate new ECO
/change-orders/$idChange Order detailFull ECO view: affected items, impact, approvals, branch history

Key Files

  • Schema: src/lib/db/schema/items.ts (change_orders and related tables)
  • Types: src/lib/items/types/change-order.ts
  • Form: src/components/change-orders/ChangeOrderForm.tsx
  • Service: src/lib/items/services/ChangeOrderService.ts
  • Release: src/lib/services/EcoReleaseService.ts (in service layer)

4. Requirement

Purpose: Captures product requirements -- what the product must do, how well it must perform, and how compliance will be verified. Requirements support hierarchical decomposition (parent/child), verification tracking, and traceability to parts and test cases.

Lifecycle: Driven (controlled by ECOs)

Default State: Draft

Numbering: REQ-000001

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
descriptiontextRequirement description
typevarchar(50)Functional, Non-Functional, Performance, Security, Usability, or Business
priorityvarchar(20)MustHave, ShouldHave, CouldHave, or WontHave (MoSCoW)
statusvarchar(50)Proposed, Approved, Implemented, Verified, or Rejected
acceptance_criteriatextConditions for requirement satisfaction
sourcevarchar(200)Origin of the requirement (e.g., customer, standard, regulation)
categoryvarchar(100)Grouping category
verification_methodvarchar(50)Analysis, Inspection, Demonstration, or Test
verification_statusvarchar(50)NotStarted, InProgress, Passed, Failed, or Waived
allocated_design_idUUID (FK to designs)Design element this requirement is allocated to
parent_requirement_idUUID (FK to items)Parent requirement (for derived requirements hierarchy)

Lifecycle States

Draft -> Proposed -> In Review -> Approved -> Implemented -> Verified -> Rejected

Relationships

RelationshipTarget TypeDescription
PartPartParts that satisfy this requirement
DocumentDocumentRelated specification documents
DependencyRequirementRequirements this depends on

Verification Methods

Requirements support formal verification tracking (common in aerospace and defense):

MethodDescription
AnalysisVerified by analysis, calculation, or simulation
InspectionVerified by visual examination
DemonstrationVerified by operational demonstration
TestVerified by formal test procedure

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=RequirementSearch/list requirements
GET/api/items/$idGet requirement by ID
POST/api/items/$idCreate requirement
PUT/api/items/$idUpdate requirement
GET/api/requirements/$idRequirement-specific detail
POST/api/requirements/$id/deriveCreate derived (child) requirement
GET/api/requirements/$id/parentGet parent requirement
POST/api/requirements/$id/satisfyMark requirement as satisfied by a part
GET/api/requirements/$id/verifying-testsGet test cases that verify this requirement
GET/api/items/$id/satisfied-requirementsGet requirements satisfied by an item
GET/api/designs/$designId/requirements-coverageRequirements coverage report
GET/api/designs/$designId/verification-gapsFind unverified requirements
GET/api/designs/$designId/gap-analysisFull gap analysis

UI Pages

PathComponentDescription
/requirementsRequirements indexList/search all requirements
/requirements/newRequirementFormCreate new requirement
/requirements/$idRequirement detailView requirement, traceability, verification status

Key Files

  • Schema: src/lib/db/schema/items.ts (requirements table)
  • Types: src/lib/items/types/requirement.ts
  • Form: src/components/requirements/RequirementForm.tsx

5. Task

Purpose: Tracks work items, action items, and engineering tasks. Tasks use a Kanban-style workflow and are the only item type that does not require a design association. They can be scoped to a program or used standalone.

Lifecycle: Free (self-controlled, no ECO required)

Default State: Backlog

Numbering: TSK-000001

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
program_idUUID (FK to programs)Program this task belongs to
parent_task_idUUID (FK to items)Parent task for sub-task hierarchy
descriptiontextTask description
assigneeUUID (FK to users)Assigned user
priorityvarchar(20)Low, Medium, High, or Critical
due_datetimestampTask due date
estimated_hoursdecimal(6,2)Estimated effort in hours
actual_hoursdecimal(6,2)Actual effort in hours
tagsJSONB (string array)Categorization tags

Lifecycle States (Kanban)

Backlog -> To Do -> In Progress -> In Review -> Done

Also: Cancelled

Relationships

RelationshipTarget TypeDescription
BlockerTaskTasks that block this one
DependencyTaskTasks this depends on
DocumentDocumentRelated documents

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=TaskSearch/list tasks
GET/api/items/$idGet task by ID
POST/api/items/$idCreate task
PUT/api/items/$idUpdate task
GET/api/tasks/$idTask-specific detail

UI Pages

PathComponentDescription
/tasksTasks indexList/search tasks, Kanban view
/tasks/newTaskFormCreate new task
/tasks/$idTask detailView task details, sub-tasks, blockers

Key Files

  • Schema: src/lib/db/schema/items.ts (tasks table)
  • Types: src/lib/items/types/task.ts
  • Form: src/components/tasks/TaskForm.tsx

6. Work Instruction

Purpose: Rich, step-by-step manufacturing instructions that guide operators through assembly, inspection, and test procedures. Work Instructions feature a block-based content editor with support for text, images, parametric values (live part data), and data collection fields. They can be attached to parts and executed as formal records.

Lifecycle: Free (self-controlled, no ECO required)

Default State: Draft

Numbering: WI-000001

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
descriptiontextWork instruction description
estimated_timeintegerEstimated completion time in minutes
difficultyvarchar(20)Easy, Medium, or Hard
safety_notestextSafety considerations and warnings
required_toolstextTools and equipment needed

Supporting Tables

Work Instructions have a rich sub-structure stored across several tables:

Operations (work_instruction_operations)

Named groupings of steps (e.g., "Assembly", "Inspection", "Final Test").

ColumnTypeDescription
idUUID (PK)Operation identifier
work_instruction_idUUID (FK)Parent work instruction
order_indexintegerDisplay order
titlevarchar(500)Operation name
descriptiontextOperation description
estimated_timeintegerEstimated time in minutes

Steps (work_instruction_steps)

Individual steps within a work instruction. Each step contains an array of content blocks stored as JSONB.

ColumnTypeDescription
idUUID (PK)Step identifier
work_instruction_idUUID (FK)Parent work instruction
operation_idUUID (FK, nullable)Parent operation (optional grouping)
order_indexintegerDisplay order
titlevarchar(500)Step title
contentJSONB (StepContent)Block-based content (see below)

Step Content Block Types

Each step's content field is a StepContent object containing an array of blocks:

Block TypeDescription
textRich text HTML content
imageImage from vault (with alt text and caption)
parametricLive value pulled from a part attribute (e.g., weight, material, custom attributes). Updates automatically when the part changes.
dataFieldData collection field filled in during execution. Types: text, numeric, checkbox, passFail. Supports validation rules (min/max/pattern).

Part Attachments (work_instruction_part_attachments)

Links Work Instructions to Parts, typically MBOM parts. Supports automatic inheritance from EBOM to MBOM designs.

ColumnTypeDescription
work_instruction_idUUID (FK)Parent work instruction
part_idUUID (FK)Attached part
inherit_to_mbombooleanAuto-attach to derived manufacturing BOMs
inherited_from_idUUIDSource attachment (for EBOM-to-MBOM inheritance tracking)

Change Alerts (work_instruction_change_alerts)

Notifies work instruction authors when linked parts change.

ColumnTypeDescription
work_instruction_idUUID (FK)Affected work instruction
part_idUUID (FK)Changed part
eco_idUUID (FK, nullable)ECO that caused the change
change_typevarchar(50)part_modified, part_obsoleted, or parametric_stale
changed_fieldsJSONB (string array)Which fields changed
previous_values / new_valuesJSONBBefore/after values
statusvarchar(20)pending, acknowledged, or dismissed

Executions (work_instruction_executions)

Records of work instruction execution by operators, with captured data from data collection fields.

ColumnTypeDescription
idUUID (PK)Execution identifier
work_instruction_idUUID (FK)Executed work instruction
work_instruction_revisionvarchar(10)Revision at time of execution
work_order_idUUID (FK, nullable)Associated work order
executed_byUUID (FK)Operator
statusvarchar(30)In Progress, Complete, Incomplete, Pending Approval, Approved, Rejected
started_at / completed_attimestampExecution timeframe
durationintegerElapsed seconds
step_dataJSONBCaptured data from data collection fields
current_step_indexintegerProgress tracking

Lifecycle States

Draft -> In Review -> Approved -> Released -> Obsolete

Relationships

RelationshipTarget TypeDescription
PartPartAttached parts (typically MBOM parts)
DocumentDocumentReference documents

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=WorkInstructionSearch/list work instructions
GET/api/items/$idGet work instruction by ID
POST/api/items/$idCreate work instruction
PUT/api/items/$idUpdate work instruction
GET/api/work-instructions/$idWork instruction detail (with steps)
GET/api/work-instructions/$id/stepsList steps
POST/api/work-instructions/$id/stepsAdd step
PUT/api/work-instructions/$id/steps/$stepIdUpdate step
DELETE/api/work-instructions/$id/steps/$stepIdDelete step
GET/api/work-instructions/$id/operationsList operations
POST/api/work-instructions/$id/operationsAdd operation
PUT/api/work-instructions/$id/operations/$operationIdUpdate operation
DELETE/api/work-instructions/$id/operations/$operationIdDelete operation
GET/api/work-instructions/$id/partsList attached parts
POST/api/work-instructions/$id/partsAttach part
DELETE/api/work-instructions/$id/partsDetach part
GET/api/work-instructions/$id/alertsList change alerts
GET/api/work-instructions/$id/resolve-parametricResolve parametric block values
GET/api/work-instructions/$id/executionsList execution records
POST/api/work-instructions/$id/executionsStart new execution
GET/api/work-instructions/$id/executions/$executionIdGet execution detail
POST/api/work-instructions/$id/executions/$executionId/completeComplete execution
POST/api/work-instructions/$id/executions/$executionId/sign-offSign off execution

UI Pages

PathComponentDescription
/work-instructionsWork Instructions indexList/search all work instructions
/work-instructions/newWorkInstructionFormCreate new work instruction
/work-instructions/$idWork instruction detail/editorBlock-based step editor
/work-instructions/$id/executeExecution viewStep-by-step operator execution interface
/work-instructions/$id/presentPresentation viewFull-screen display for shop floor
/work-instructions/$id/executions/$executionIdExecution recordView completed execution with captured data

Key Files

  • Schema: src/lib/db/schema/items.ts (work_instructions and related tables)
  • Types: src/lib/items/types/work-instruction.ts
  • Form: src/components/work-instructions/WorkInstructionForm.tsx
  • Components: src/components/work-instructions/ (StepEditor, ParametricBlock, etc.)

7. Issue

Purpose: Tracks quality issues, engineering problems, and customer-reported defects. Issues can be linked to affected parts and documents, assigned to engineers for investigation, and connected to the Change Orders that resolve them. Similar to "Problem Reports" in traditional PLM systems like Aras Innovator.

Lifecycle: Free (self-controlled, no ECO required)

Default State: Open

Numbering: ISS-000001

Note: The Issue item type has a complete database schema, API, and UI (list, detail, form, and history views). Advanced features like dashboard views and Kanban boards are not yet implemented.

Type-Specific Fields

ColumnTypeDescription
item_idUUID (PK, FK to items)Links to base item
descriptiontextIssue description
severityvarchar(20)Critical, High, Medium, or Low
priorityvarchar(20)Critical, High, Medium, or Low
categoryvarchar(50)Design, Manufacturing, Quality, Customer, Safety, or Other
reported_byUUID (FK to users)User who reported the issue
reported_datetimestampWhen the issue was reported
assigned_toUUID (FK to users)Assigned investigator
resolutiontextResolution description
resolved_datetimestampWhen resolved
root_causetextRoot cause analysis
affected_item_idsJSONB (UUID array)Items affected by this issue
program_idUUID (FK to programs)Associated program
design_idsJSONB (UUID array)Multiple designs this issue relates to (no branch control)

Lifecycle States

Open -> In Progress -> Pending -> Resolved -> Verified -> Closed

Also: Cancelled

Relationships

RelationshipTarget TypeDescription
AffectedItemPart, DocumentItems affected by this issue
RelatedIssueIssueRelated issues
CausedByChangeOrder, IssueRoot cause (what caused this issue)
ResolvedByChangeOrderECO that resolves this issue

API Endpoints

MethodPathDescription
GET/api/items/search?itemType=IssueSearch/list issues
GET/api/items/$idGet issue by ID
POST/api/items/$idCreate issue
PUT/api/items/$idUpdate issue
GET/api/issues/$idIssue-specific detail

UI Pages

PathComponentDescription
/issuesIssues indexList/search issues
/issues/newIssueFormCreate new issue
/issues/$idIssue detailView issue details, resolution, root cause

Key Files

  • Schema: src/lib/db/schema/items.ts (issues table)
  • Types: src/lib/items/types/issue.ts
  • Form: src/components/issues/IssueForm.tsx

8. Project (Programs and Designs)

Purpose: Programs and Designs form the organizational hierarchy of Cascadia PLM. They are not item types in the ItemTypeRegistry sense (they do not use the two-table pattern), but they are the top-level containers that organize all items.

The hierarchy is: Organization -> Program -> Design -> Items

Program

A Program is a permission boundary and organizational container. Programs typically map to contracts, product lines, or major projects.

Program Fields

ColumnTypeDescription
idUUID (PK)Program identifier
namevarchar(200)Program name
codevarchar(50)Unique short code (e.g., WIDGET)
descriptiontextProgram description
contract_numbervarchar(100)Contract or PO number
customervarchar(200)Customer name
start_datetimestampProgram start date
target_end_datetimestampTarget completion date
statusvarchar(50)Active, On Hold, Completed, or Cancelled
settingsJSONBProgram-specific settings (approval workflow, ECO number format, etc.)
attributesJSONBCustom extensible attributes

Program Membership (program_members)

Users are granted access to programs through membership records.

ColumnTypeDescription
program_idUUID (FK)Program
user_idUUID (FK)User
rolevarchar(50)admin, lead, engineer, or viewer
can_create_ecobooleanPermission flag
can_approve_ecobooleanPermission flag
can_manage_productsbooleanPermission flag

Program API Endpoints

MethodPathDescription
GET/api/programs/$idGet program details
PUT/api/programs/$idUpdate program
GET/api/programs/$id/members/$userIdGet/manage member
GET/api/programs/$id/history/graphProgram commit history graph

Program UI Pages

PathComponentDescription
/programsPrograms indexList all programs
/programs/newProgramFormCreate new program
/programs/$idProgram detailView program with designs, members, ECOs

Design

A Design is a version-controlled container for items within a program. Designs have their own branch structure (main + ECO branches) and commit history. Items (Parts, Documents, Requirements, etc.) belong to a design.

Design Types

TypeDescription
EngineeringStandard engineering design containing EBOM
ManufacturingManufacturing design containing MBOM, derived from an Engineering design
LibraryStandard Library, globally accessible across programs (e.g., standard fasteners)
FamilyContainer for organizing related designs

Design Fields

ColumnTypeDescription
idUUID (PK)Design identifier
program_idUUID (FK, nullable)Owning program (null for Library)
namevarchar(200)Design name
codevarchar(50)Unique short code
descriptiontextDesign description
design_typevarchar(50)Engineering, Manufacturing, Library, or Family
parent_design_idUUIDParent design (for Family hierarchy)
clone_source_design_idUUIDSource if this design was cloned
source_design_idUUIDSource Engineering design (for Manufacturing type)
source_tag_idUUIDBaseline tag used as derivation point
source_commit_idUUIDCommit used as derivation point
planned_quantityintegerPlanned production quantity
default_branch_idUUIDDefault branch (usually main)
is_archivedbooleanArchive flag
sysml_project_idUUIDSysML API compatibility
attributesJSONBCustom extensible attributes

Design API Endpoints

MethodPathDescription
GET/api/designs/familiesList design families
GET/api/designs/$designId/requirements-coverageRequirements coverage report
GET/api/designs/$designId/test-coverageTest coverage report
GET/api/designs/$designId/verification-gapsVerification gap analysis
GET/api/designs/$designId/gap-analysisFull gap analysis
GET/api/designs/$id/history/graphDesign commit history graph

Design UI Pages

PathComponentDescription
/designsDesigns indexList all designs
/designs/newDesignFormCreate new design
/designs/$idDesign detailView design with BOM tree, items, branches, history
/designs/$id/editDesign editEdit design metadata
/designs/workspacesWorkspace indexList personal workspaces
/designs/workspaces/$idWorkspace detailPersonal workspace view
/designs/collaborative/$sessionIdCollaborative designAI-powered collaborative design session

Key Files

  • Program schema: src/lib/db/schema/programs.ts
  • Design schema: src/lib/db/schema/designs.ts
  • Versioning schema: src/lib/db/schema/versioning.ts (branches, commits, tags)
  • Program form: src/components/programs/ProgramForm.tsx
  • Design form: src/components/designs/DesignForm.tsx

Additional Item Types

Test Plan

Purpose: Container for organizing test cases into a structured test campaign.

Lifecycle: Free | Default State: Draft | Numbering: TP-000001

FieldTypeDescription
scopetextWhat the test plan covers
environmentvarchar(100)Test environment
entry_criteriatextConditions to begin testing
exit_criteriatextConditions to consider testing complete
statusvarchar(50)Draft, Active, Completed, Archived

States: Draft, In Review, Approved, Released, Obsolete, Active, Completed, Archived

Relationships: TestCase (contains), Requirement (validates), Document (references)

Test Case

Purpose: Individual test procedure linked to a test plan, with step-by-step instructions and execution tracking.

Lifecycle: Free | Default State: Draft | Numbering: TC-000001

FieldTypeDescription
test_plan_idUUID (FK)Parent test plan
test_typevarchar(50)Unit, Integration, System, Acceptance
preconditionstextSetup requirements
stepsJSONB (TestStep array)Array of {stepNumber, action, expectedResult}
execution_statusvarchar(50)NotRun, Passed, Failed, Blocked
last_executed_attimestampLast execution date
last_executed_byUUID (FK)Last executor
environmentvarchar(100)Execution environment

States: Draft, In Review, Approved, Released, Obsolete, NotRun, Passed, Failed, Blocked

Relationships: VERIFIED_BY -> Requirement, VALIDATES -> Part, TestPlan (parent), Document (references)

Test Executions are stored in the test_executions table with status, duration, actual results, and notes.

API: /api/test-cases/$id/executions


Item Type Registry

All item types are registered in ItemTypeRegistry, which implements a two-tier configuration pattern:

  1. Code definitions -- Type-safe configs defined in src/lib/items/registerItemTypes.server.ts (schemas, components, table names, default states).
  2. Runtime configs -- Business rules from the database item_type_configs table (overridable labels, permissions, lifecycle assignments, relationships).

Runtime configs override code defaults for configurable fields. Components and schemas always come from code for type safety.

Registration Source

src/lib/items/registerItemTypes.server.ts

Lifecycle Assignment

Each item type is assigned a lifecycle definition by ID (stored in src/lib/items/lifecycle-ids.ts). The lifecycle controls valid states and transition rules. Multiple item types can share the same lifecycle definition.

Permissions Model

Each registered type declares CRUD permissions by role:

Item TypeDelete Restricted To
PartAdmin, Engineer
DocumentAdmin, Engineer
ChangeOrderAdmin, Engineer
RequirementAdmin, Engineer, ProductManager
TaskAdmin, ProjectManager, Engineer
WorkInstructionAdmin, Engineer, ManufacturingEngineer
IssueAdmin, Engineer, QualityEngineer
TestPlanAdmin, Engineer, QualityEngineer
TestCaseAdmin, Engineer, QualityEngineer

All types currently allow create, read, and update for all roles (*).


Relationships Between Types

The item_relationships table stores typed, directed relationships between any two items. Key relationship types used across the system:

Relationship TypeTypical SourceTypical TargetDescription
BOMPart (parent)Part (child)Bill of Materials hierarchy
DocumentPartDocumentAttached documentation
AffectsChangeOrderPart, DocumentECO affected items
VERIFIED_BYTestCaseRequirementTest verifies requirement
VALIDATESTestCasePartTest validates part
DependencyRequirement/TaskRequirement/TaskDepends-on relationship
BlockerTaskTaskBlocking relationship
AffectedItemIssuePart, DocumentItems affected by issue
CausedByIssueChangeOrder, IssueRoot cause link
ResolvedByIssueChangeOrderResolution link

Relationship records include optional fields for quantity, reference designator, find number, SysML composition/multiplicity, and cross-design traceability (source/target design, derivation method).

API: GET/POST/DELETE /api/relationships


Generic Item API

All item types share these common endpoints via the unified ItemService:

MethodPathDescription
GET/api/items/searchSearch items with filters (itemType, designId, state, q, pagination)
GET/api/items/$idGet item by ID with optional version context (?branch=, ?commit=, ?tag=)
POST/api/items/$idCreate item (type determined by itemType field in body)
PUT/api/items/$idUpdate item
DELETE/api/items/$idSoft-delete item
GET/api/items/$id/historyVersion history across revisions
GET/api/items/$id/available-contextsList branches/commits where item exists
POST/api/items/$id/checkinCheck in after editing
POST/api/items/$id/cancel-checkoutCancel checkout
GET/api/items/$id/lock-statusCheck lock status
POST/api/items/$id/unlockForce unlock
GET/api/items/$id/impact-analysisRun impact analysis on item
GET/api/items/$id/satisfied-requirementsRequirements satisfied by this item