PCR.AI System Design Document (SDD)
Version: 3.0.0
Date: January 2026
Status: Complete
1. Purpose
1.1 Problem Statement
Clinical laboratories running PCR diagnostic tests spend significant time manually reviewing amplification data, classifying results, and performing quality control checks. This manual process is time-consuming, prone to human error, and creates bottlenecks in high-throughput environments.
1.2 Solution Overview
PCR.AI is a cloud-based SaaS platform that automates PCR analysis, quality control, and result classification for clinical diagnostic laboratories. The system:
- Imports run files from thermocyclers (automated or manual upload)
- Applies configurable rules to classify results automatically
- Performs Westgard statistical QC to detect systematic and random errors
- Provides interactive review, amendment, and audit trail capabilities
- Exports results to LIMS/LIS systems
1.3 About This Document
This Software Design Document (SDD) describes the architectural and algorithmic design decisions for PCR.AI. It is written according to IEEE Std 1016-1998 with appropriate tailoring for a cloud-based SaaS application.
This SDD documents design decisions that materially affect:
- System architecture and component relationships
- Algorithm correctness and execution logic
- Configuration schemas and behavioral settings
- Security boundaries and authentication flows
- Auditability and compliance requirements
2. Audience
| Reader | Use Case |
|---|
| Development teams | Implementing features, understanding component interactions |
| QA engineers | Validating system behavior, understanding test boundaries |
| System architects | Reviewing design decisions, planning extensions |
| Technical leads | Code review context, onboarding new developers |
| Regulatory reviewers | Understanding security, audit, and compliance design |
3. Scope
3.1 What This SDD Covers
| Area | Content |
|---|
| Architecture | AWS serverless infrastructure (Lambda, Aurora, S3, Cognito, SQS, SES) |
| Algorithms | Rules engine, Westgard QC, classification logic, import/export processing |
| Configuration | Environment variables, kit configuration schemas, client settings |
| Security | Authentication flows (native, SAML/SSO), role-based access control |
| Deployment | Vapor deployment, Cognito setup, environment configuration |
| Testing | Behat infrastructure, HTML testability attributes |
3.2 What This SDD Excludes
| Exclusion | Rationale |
|---|
| UI presentation details | Standard Vue.js/Laravel patterns; no custom design decisions |
| Standard CRUD operations | User settings, basic forms follow established patterns |
| Test plans and test cases | Belongs in Software Test Description (STD) |
| Operational runbooks | Belongs in Operations Manual |
3.3 Coverage vs SRS
This SDD intentionally covers approximately 30% of SRS requirements. This is a deliberate design decision:
- The SDD documents design decisions, not all implementation details
- Pure UI behavior, standard CRUD, and test documentation are explicitly out of scope
- Absence from the SDD does not imply non-implementation
For the complete scope definition and sufficiency criteria, see sdd-references.md.
4. Document Organization
| Document | Purpose |
|---|
| sdd-introduction.md | This document - overview, scope, navigation |
| sdd-architecture.md | AWS infrastructure, component diagram, ER model, workflows |
| sdd-algorithms.md | Rules engine, Westgard QC, import/export pipelines, classification logic |
| sdd-configuration.md | Environment variables, Vapor secrets, kit configuration schemas |
| sdd-security.md | Cognito authentication, SAML/SSO, role-based access control |
| sdd-deployment-operations.md | Vapor deployment, Cognito user pool setup, environment URLs |
| sdd-testing.md | Behat testing infrastructure, test patterns, fixtures |
| sdd-references.md | IEEE template, coding standards, scope statement, UI references |
| sdd-glossary.md | 127 defined terms with variant tracking |
| sdd-master-index.md | Topic-based navigation with cross-references |
| sdd-todo.md | Deferred items (5 diagrams not yet created) |
5. How to Use This SDD
5.1 Quick Start
- Find a topic: Use sdd-master-index.md to locate content by topic
- Look up terms: Use sdd-glossary.md for 127 defined terms
- Understand scope: See Section 3 above or sdd-references.md
5.2 Reading Paths by Role
| Role | Recommended Path |
|---|
| Developer | sdd-architecture.md → sdd-algorithms.md → domain-specific sections |
| QA/Tester | sdd-testing.md → sdd-algorithms.md (for expected behavior) |
| Architect | sdd-architecture.md → sdd-master-index.md (full topology) |
| Regulatory | sdd-security.md → sdd-configuration.md → audit trail sections |
| Document Set | Location | Description |
|---|
| SRS | output/srs/ | 350+ requirements across 28 domains + 61 rules |
| Code | code/app/ | Laravel/Vue implementation |
| Glossary | sdd-glossary.md | Consolidated terminology |
7. Key System Facts
| Property | Value |
|---|
| Platform | AWS serverless (Lambda via Vapor) |
| Frontend | Laravel + Vue.js |
| Database | Aurora MySQL 8.0 (Serverless v2) |
| Authentication | AWS Cognito (native + SAML/SSO) |
| File Storage | AWS S3 |
| Data Privacy | No PII/PHI stored; all data anonymized before analysis |
| Compliance | Supports ISO 15189, UKAS requirements |
| IEEE Compliance | 78% IEEE 1016-1998 compliant |
8. Version History
| Version | Date | Description |
|---|
| 3.0.0 | January 2026 | Initial SDD from system design specifications conversion |