```mermaid
block-beta
  columns 3

  %% UI Component Column
  block:UI["UI COMPONENTS / WIREFRAME"]:1
    columns 1
    
    block:HeaderUI["Header & Nav"]:1
      columns 1
      h_title["[Text] Document Name & Type"]
      h_date["[Text] Date & Origin Location"]
    end

    block:EditorUI["Page Transcription Editor"]:1
      columns 1
      ed_img["[Image Viewer] Source Image"]
      ed_page["[Badge] Page Number"]
      ed_raw["[Read-Only] AI Raw Output"]
      ed_rev["[Textarea] Human Revised Text"]
    end

    block:PeopleUI["Attribution Sidebar"]:1
      columns 1
      p_author["[List] Authors (Full Name)"]
      p_recip["[List] Recipients (Full Name)"]
      p_bio["[Card] Person Biography & Dates"]
    end

    block:JobUI["AI Processing Drawer"]:1
      columns 1
      j_status["[Badge] Job Status"]
      j_model["[Text] Provider & Model"]
      j_tokens["[JSON View] AI Token Usage"]
    end
  end

  %% Directional Mapping / Connectors
  block:FLOW["MAPPING / FLOW"]:1
    columns 1
    f1["Reads / Updates -->"]
    f2["Renders Active Page -->"]
    f3["Joins via Role -->"]
    f4["Executes & Logs -->"]
  end

  %% Postgres Schema Column
  block:DB["POSTGRES SQL SCHEMA"]:1
    columns 1

    block:DocTbl["Table: document"]:1
      columns 1
      d_id["id : UUID (PK)"]
      d_name["name : TEXT"]
      d_type["document_type : TEXT"]
      d_date["document_date : DATE"]
    end

    block:SrcTbl["Table: source"]:1
      columns 1
      s_id["id : UUID (PK)"]
      s_page["page_number : INT"]
      s_path["file_path : TEXT"]
      s_raw["raw_transcription : TEXT"]
      s_rev["revised_text : TEXT"]
    end

    block:PersonTbl["Table: person & document_person"]:1
      columns 1
      p_id["id : UUID (PK)"]
      p_name["full_name : TEXT"]
      p_role["role : 'author' | 'recipient'"]
    end

    block:JobTbl["Table: job & job_source"]:1
      columns 1
      j_id["id : UUID (PK)"]
      j_stat["status : VARCHAR"]
      j_prov["provider / model : TEXT"]
      j_meta["ai_metadata : JSONB"]
    end
  end

  %% Connections
  HeaderUI --> DocTbl
  ed_img --> s_path
  ed_page --> s_page
  ed_raw --> s_raw
  ed_rev --> s_rev
  PeopleUI --> PersonTbl
  JobUI --> JobTbl
```
