Last Updated: June 24, 2025 Audience: Developers tasked with maintaining, customizing, or troubleshooting the application.


1. Architectural Overview

The ADAM QC Viewer is intentionally designed as a zero-dependency, single-file web application. This architecture was chosen for maximum portability and ease of use for non-technical users, as it requires no build process, package manager, or local development server. Simplicity.

The application operates on the following principles:

<aside>

Recommended Normalized Data Schema

Update as needed.

{
  "document_id": "string", // Unique ID for the document
  "source_file": "string", // Original file name or S3 URI
  "metadata": {
    "author": "string | null", // May not always be available
    "keywords": ["string"],
    "status": "normalized" | "needs_review", // Set by the Validator
    "quality_score": "float" // Final score from the Validator
  },
  "content_blocks": [
    {
      "block_id": "string", // Unique ID for this chunk
      "type": "prose" | "table",
      "page_number": "number", // Added for context
      // The Normalizer decides which field to populate:
      "content": "string | null", // For prose, or a sentence describing a table/figure
      "data": [["string"]] | null // The raw structured data of a table, for reference
    }
  ]
}

</aside>


2. Code Structure & Key Components

The primary logic is located inside the <script type="text/babel"> tag.

Icon Components

Core Functional Components