Architecture

Tech Stack (v1)

LayerTechnologyRationale
FrontendReact + TypeScriptInteractive dashboard, real-time findings display, responsive design
BackendTBD (Python/Node/Go)Validation engine, checklist logic, artifact processing
DatabaseTBD (PostgreSQL or similar)Artifact storage, audit records, user roles, findings
File StorageTBD (S3 or local filesystem)Uploaded documents (PDF, docx, xlsx)
AuthTBD (basic username/password or SSO)User access control, role separation (auditor vs. manager)
DeploymentTBD (cloud or on-prem)No tech preference stated; build team will decide

System Architecture (v1)


┌─────────────────────────────────────────────────────────────┐
│                    COMPLIANCECHECK SYSTEM v1                 │
└─────────────────────────────────────────────────────────────┘

┌───────────────────┐
│   Auditor / Manager   │  (Web Browser)
│   Dashboard UI        │
└──────────┬────────────┘
           │
           ▼
┌────────────────────────────────────────┐
│         Frontend Layer (React)         │
│  - Login                               │
│  - Project dashboard                   │
│  - Artifact upload                     │
│  - Findings review UI                  │
│  - Approval workflow                   │
└──────────┬─────────────────────────────┘
           │ (REST API / WebSocket)
           ▼
┌────────────────────────────────────────────────────────────┐
│              Backend API Layer                               │
│  - User authentication & authorization                      │
│  - Artifact endpoint (upload, retrieve)                     │
│  - Validation orchestration                                 │
│  - Findings management                                      │
│  - Audit workflow logic                                     │
└──────────┬─────────────────────────────────────────────────┘
           │
      ┌────┴────┐
      ▼         ▼
┌──────────────────┐  ┌──────────────────────────┐
│ Validation Engine │  │  QMS Checklist Service   │
│ - Parse docs     │  │ - Load rules v1           │
│ - Extract text   │  │ - Score compliance       │
│ - Check presence │  │ - Flag deviations        │
│ - Compare against│  │ - Market-specific logic  │
│   checklist rules │  │   (future: customizable) │
└────────┬─────────┘  └──────────────────────────┘
         │
         ▼
┌────────────────────────────────────────┐
│         Database                        │
│  - Projects                             │
│  - Artifacts (metadata + pointers)      │
│  - Audit records                        │
│  - Findings & validations               │
│  - User accounts & roles                │
│  - QMS checklist versions               │
└──────────┬─────────────────────────────┘
           │
      ┌────┴────┐
      ▼         ▼
┌──────────────────┐  ┌──────────────────┐
│  File Storage     │  │  Report Generator │
│  - PDFs          │  │  - Summary report │
│  - Word docs     │  │  - Findings list  │
│  - Spreadsheets  │  │  - Export (PDF/CSV)
│  (S3 / local)     │  └──────────────────┘
└──────────────────┘

Data Model v1

EntityKey FieldsPurpose
Projectid, name, organization, methodology, created_at, ownerContainer for an audit scope
Artifactid, project_id, type, filename, upload_date, uploaded_by, storage_path, versionA single document (test strategy, impl plan, etc.)
Auditid, project_id, checklist_version, status, created_at, completed_at, approved_by, approved_atA single compliance audit run
Findingid, audit_id, category, severity, issue_description, artifact_id, status, validated_at, validated_byA flagged compliance issue
Userid, email, role (auditor/manager), created_at, last_loginSystem user account
Checklistid, version, items (json), created_at, activeQMS compliance rules for v1

Validation Engine Logic (v1)

  1. Artifact intake: Upload PDF/DOCX/XLSX → extract text, parse structure
  2. Checklist load: Fetch active QMS checklist from DB
  3. Validate presence: Check for required sections, fields, signatures
  4. Score compliance: Calculate % checklist items passed
  5. Flag deviations: Create Finding records for each gap or inconsistency
  6. Store results: Link findings to audit record, mark audit ready for review
  7. Display findings: Auditor reviews in dashboard, marks valid/invalid/needs-info
  8. Submit for approval: Audit marked complete, routed to manager (manual in v1)

Integration Points

v1 (In scope):

v2+ (Out of scope for v1):

Security & Access Control

Tech decisions TBD: Build team will finalize backend language, database, deployment model, and auth strategy based on team capabilities and organizational constraints.