SAM User Documentation¶
Welcome to the SAM (SOP Authoring to Models) user documentation. This comprehensive guide will help you create, validate, and deploy Standard Operating Procedures (SOPs) that can be rendered as interactive data collection forms in CLAIRE.
Quick Start¶
To get started with SAM, you’ll need to set up and run the development server first:
Setup Instructions¶
Initial Setup (first time only):
# If config files don't exist in infra/.config/, copy from examples: cp -r infra/example-.config/* infra/.config/ # Customize as needed - see [Frontend Configuration Guide](../../shared/system-admin/frontend-configuration.md) below # Then run setup to create local directories and deploy configs: make setup-local ENV=dev
Install Dependencies:
cd frontend npm install cd ..
Start the Development Server:
ENV=dev ORG=any make start-frontend # Or for the full stack with backend: ENV=dev ORG=any make start-dev
Access SAM:
Navigate to:
http://localhost:3000/samDefault credentials (when auth is enabled):
Email:
dev_user@local.devPassword:
dev123
For detailed setup instructions:
Frontend Configuration: Frontend Configuration Guide - Explains config structure and customization
General Configuration: Configuration Guide
Deployment: System Admin Deployment Guide
Documentation Sections¶
Overview¶
SAM is a schema-driven system for creating Standard Operating Procedures that ensures:
Consistency: All SOPs follow the same validated structure
Quality: Built-in validation prevents errors
Integration: Seamless deployment to CLAIRE for data collection
Compliance: Supports regulatory requirements for immutable data storage
Where to Begin¶
New to SAM? Follow this learning path:
Launching Pad - Install, configure, and start SAM (5 minutes)
SAM Primer - Core concepts and essential commands
Examples - Working templates to copy and modify
Full Creation Guide - Comprehensive SOP authoring documentation
Key Features¶
Schema-Driven Design¶
Create SOPs using a structured YAML format that ensures consistency and enables validation across all procedures.
Real-Time Validation¶
Validate your SOPs against the SOPTemplateSchema to catch errors before deployment.
Visual Editor¶
Use SAM’s interactive form builder to create and edit SOPs with instant preview capabilities.
Easy Deployment¶
Deploy validated SOPs to S3 buckets where CLAIRE can serve them as data collection forms.
Workflow¶
The typical SOP creation workflow:
1. Create SOP in SAM Editor
2. Add task groups, tasks, and fields
3. Validate the structure
4. Preview and test
5. Export as YAML
6. Deploy to S3
7. Use in CLAIRE for data collection
SOP Structure at a Glance¶
Here’s a brief preview of how SOPs are structured. For detailed tutorials, see the SAM Primer and Full Creation Guide.
Basic SOP Components¶
Start with Metadata: Every SOP needs basic information:
id: "MY_SOP_001" name: "My First SOP" title: "My Laboratory Protocol" version: "1.0.0" author: "Your Name"
Add Task Groups: Organize your procedure into logical sections:
taskgroups: - id: main_group name: "Main Procedures" children: [tasks go here]
Define Tasks: Each task group contains tasks (rendered as tabs):
- id: setup_task '@type': Task name: "Setup" ordinal: 1 children: [fields go here]
Add Fields: The actual data input elements:
- id: date_field '@type': Field name: "Experiment Date" type: "string" format: "date" required: true
Key Concepts to Remember¶
Schema Independence¶
Never hardcode assumptions about field names
Use schema properties for all logic
Keep configuration in children arrays
The
@typeis for reference only, not application logic
Field Types¶
Basic: string, number, boolean
Special: date, file, array
Complex: tables, nested objects
Configuration Objects¶
Place these in children arrays - they won’t render as inputs:
ELNFilenameComponent: Include field in filenameExportConfiguration: Control export behavior
Common Patterns¶
Multi-Step Procedures¶
Use ordinal numbers and clear task names:
- name: "Step 1: Preparation"
ordinal: 1
- name: "Step 2: Processing"
ordinal: 2
- name: "Step 3: Analysis"
ordinal: 3
Required vs Optional Fields¶
required: true # User must fill this
required: false # Optional field
Validation Rules¶
validation:
min: 0
max: 100
pattern: "^[A-Z]{3}-[0-9]{4}$"
message: "Format: ABC-1234"
Need Help?¶
Setup Issues: Environment Setup Guide
Learning SAM: SAM Primer - Core concepts and commands
Creating SOPs: Full Creation Guide
Validation Issues: Validation Guide
Deployment: Deployment Guide
Problems: Troubleshooting Guide
Technical Reference: Schema Reference
Documentation Overview¶
This guide provides everything you need to master SAM:
Environment Setup - Get SAM running on your system
SAM Primer - Learn the fundamentals
Creation Guide - Detailed SOP authoring process
Examples - Copy and adapt working templates
Validation & Deployment - Test and publish your SOPs
Troubleshooting - Solve common issues
Future Enhancements¶
Coming Soon: PAUL, an AI-powered system, will automatically generate SOP schemas from unstructured information and SYNDI schemas. Until then, this documentation focuses on manual SOP creation, validation, and deployment.
Support¶
For additional help:
Review the troubleshooting guide
Check the examples for working templates
Contact your system administrator
Submit issues on GitHub