Architecture Diagrams

Architecture Diagrams

The following diagrams illustrate the core workflows and components of the YouSeddit platform.

Verifiable Conversation Chain System

graph LR
    subgraph "Capture & Processing"
        InterviewSource["Interviewer & Interviewee"] --> CaptureApp["Capture App (Audio/Video)"]
        CaptureApp --> STT["Speech-to-Text & Diarization"]
        STT --> SnippetProcessing["Transcript Snippet Processing\n(Identify Speaker/Turns)"]
        SnippetProcessing --> SnippetHash["Calculate Snippet Hashes"]
        SnippetProcessing --> IPFSStorage["Store Snippet Content (IPFS)"]
    end

    subgraph "Attestation & Ledger Recording"
        SnippetHash --> C2PASnippet["Generate C2PA Attestation per Snippet\n(Speaker, Turn Type, Prev Hash Link, Snippet Hash, IPFS Link)"]
        IPFSStorage --> C2PASnippet
        C2PASnippet --> LedgerStorage["Store Snippet Hash & C2PA Attestation on Ledger"]
    end

    subgraph "Licensing & Verification"
        LedgerStorage --> SmartContract["Smart Contract\n(Snippet Licensing & Valuation - Sum Responses)"]
        MediaOutlet["Media Outlet"] -->|"License Snippet(s)"| SmartContract
        ThirdParty1["3rd Party Media Outlet #1"] -->|"License Snippet(s)"| SmartContract
        ThirdParty2["3rd Party Media Outlet #2"] -->|"License Snippet(s)"| SmartContract
        SmartContract --> VerificationAPI["Verification API (Snippet Level)"]
        VerificationAPI --> Validation["Content Credential Validation (Snippet Level)"]
        Validation --> VerificationURL["Public Verification URL (Snippet/Chain)"]
    end

    style STT fill:#bfb,stroke:#333,stroke-width:2px
    style SnippetProcessing fill:#bfb,stroke:#333,stroke-width:2px
    style C2PASnippet fill:#ff9,stroke:#333,stroke-width:2px
    style LedgerStorage fill:#ff9,stroke:#333,stroke-width:2px
    style SmartContract fill:#f9f,stroke:#333,stroke-width:2px
    style VerificationAPI fill:#bbf,stroke:#333,stroke-width:2px

This diagram illustrates the workflow for capturing and verifying interview content using a snippet-based approach:

  1. Capture & Processing: Interview audio/video is captured and processed using Speech-to-Text with diarization to identify speakers. The transcript is then segmented into speaker-attributed snippets (turns).
  2. Snippet Hashing & Off-Chain Storage: A unique cryptographic hash (snippetHash) is calculated for each snippet’s content. The raw snippet content (transcript segment) is stored off-chain in IPFS.
  3. Ledger Recording (Evidence Record): An “Evidence Record” smart contract function is called for each snippet. This records the cryptographic proof (snippetHash) on the ledger along with metadata:
    • A reference (e.g., IPFS CID) to the off-chain snippet content.
    • The type of snippet: “initiator” (e.g., question) or “response” (e.g., answer/quote).
    • Crucially: If the snippet is a “response”, the ledger entry includes a link to the ledger entry of the corresponding “initiator” snippet, forming the verifiable chain. Initiator snippets may optionally link to responses.
  4. Licensing & Valuation: Smart contracts manage licensing, potentially at the snippet level. Valuation can be based on rules, like summing the value of licensed “response” snippets linked to a specific “initiator”.
  5. Verification: APIs and tools allow validation by:
    • Retrieving snippet content from IPFS using the link in the ledger entry.
    • Verifying the content matches the snippetHash stored on the ledger.
    • Tracing the conversation context by following the initiator/response links recorded on the ledger.
    • Optionally, C2PA attestations can complement this by providing additional metadata about the capture process, linked within the ledger record or IPFS content.

Conversation Chain Workflow: Off-Chain Encrypted Storage with On-Ledger Chaining

This workflow provides a GDPR-compliant system for recording email conversations turn-by-turn onto a distributed ledger, creating a verifiable chain using on-ledger linking and off-chain storage:

graph TD
    subgraph "Process Email Turn N (Repeats)"
        %% Define nodes explicitly first
        YSN[Youseddit System]
        PrevHashInputN[Previous Email Snippet Hash]
        EmailTurnN[Email Turn N]
        HeadersN[Extract Headers N]
        %% Use quotes and <br> for newline and parentheses
        ProvScoreN["Calculate Provenance Score N<br>(Sign/Encrypt, Headers)"]
        EmailHashN["Calculate Email Snippet Hash N<br>(Full Raw Source)"]
        EncryptEmailN["Encrypt Full Email N (Optional)"]
        IPFSStoreN["Store Encrypted Email N (IPFS)"]
        IPCIDN["Generate IPFS CID N"]

        %% Define edges using IDs
        PrevHashInputN --> YSN
        EmailTurnN --> YSN
        YSN --> HeadersN
        YSN -->|Analyze| ProvScoreN
        EmailTurnN --> EmailHashN
        EmailTurnN --> EncryptEmailN
        EncryptEmailN --> IPFSStoreN
        IPFSStoreN --> IPCIDN
    end

    subgraph "On-Ledger Recording (Email Turn N - Repeats)"
        %% Define nodes explicitly first, use quotes if text has special chars or needs formatting
        SCCallN["SC Call Record Email Turn N"]
        LedgerTxN["Ledger Tx N"]
        LedgerRecordN["Ledger Record N"]
        LR_HashN["Email Snippet Hash N"]
        LR_CIDN["IPFS CID N (Optional)"]
        LR_PrevHashN["Link Prev Email Hash"]
        LR_ProvScoreN["Provenance Score N"]
        LR_HeadersN["Key Header Info N"]
        LR_OwnerN["Ownership N"]
        LR_TimeN["Timestamp N"]
        C2PAEmailN["Generate C2PA Attestation N"]

        %% Define edges using IDs
        EmailHashN --> SCCallN
        IPCIDN --> SCCallN
        PrevHashInputN --> SCCallN
        ProvScoreN --> SCCallN
        HeadersN --> SCCallN
        SCCallN --> LedgerTxN
        LedgerTxN --> LedgerRecordN
        LedgerRecordN -->|Contains| LR_HashN
        LedgerRecordN -->|Contains| LR_CIDN
        LedgerRecordN -->|Contains| LR_PrevHashN
        LedgerRecordN -->|Contains| LR_ProvScoreN
        LedgerRecordN -->|Contains| LR_HeadersN
        LedgerRecordN -->|Contains| LR_OwnerN
        LedgerRecordN -->|Contains| LR_TimeN
        LedgerTxN --> C2PAEmailN
    end

    subgraph "Process Final Confirmation (Turn F)"
        %% Define nodes explicitly first, use quotes if text has special chars or needs formatting
        YSF[Youseddit System]
        PrevHashInputF["Last Email Snippet Hash (N)"]
        ConfirmationCode["Confirmation Code Snippet Received"]
        ConfHash["Calculate Confirmation Snippet Hash F"]
        ProvScoreF["Update Overall Provenance Score"]

        %% Define edges using IDs
        PrevHashInputF --> YSF
        ConfirmationCode --> YSF
        YSF --> ConfHash
        YSF -->|Update Score| ProvScoreF
    end

    subgraph "On-Ledger Recording (Confirmation Turn F)"
        %% Define nodes explicitly first, use quotes if text has special chars or needs formatting
        SCCallF["SC Call Record Confirmation F"]
        LedgerTxF["Ledger Tx F (Conclusion)"]
        LedgerRecordF["Ledger Record F"]
        LR_ConfHash["Confirmation Snippet Hash"]
        LR_PrevHashF["Link Last Email Hash"]
        LR_Type["Type: Confirmation"]
        C2PAConfF["Generate C2PA Attestation F"]

        %% Define edges using IDs
        ConfHash --> SCCallF
        PrevHashInputF --> SCCallF
        SCCallF --> LedgerTxF
        LedgerTxF --> LedgerRecordF
        LedgerRecordF -->|Contains| LR_ConfHash
        LedgerRecordF -->|Contains| LR_PrevHashF
        LedgerRecordF -->|Contains| LR_Type
        LedgerTxF --> C2PAConfF
    end

    subgraph "Verification & Usage"
        %% Define nodes explicitly first, use quotes if text has special chars or needs formatting
        Owner[Owner]
        Verifier[Verifier/Reader]
        MediaOutlet["Media Outlet"]
        SmartContractEmail["Smart Contract (Email Snippet Based)"]

        %% Define edges using IDs
        Owner -->|Manage Status| LedgerRecordN
        Owner -->|Manage Status| LedgerRecordF
        Verifier -->|Reads| C2PAEmailN
        Verifier -->|Reads| C2PAConfF
        Verifier -->|Follows Chain Links| LedgerRecordN
        Verifier -->|Follows Chain Links| LedgerRecordF
        Verifier -->|Follows IPFS Link| IPFSStoreN
        Verifier -->|Verify Hashes/Scores| LedgerRecordN
        Verifier -->|Verify Hashes/Scores| LedgerRecordF
        %% Removed parentheses from the edge label below
        MediaOutlet -->|License Email Snippets| SmartContractEmail
        LedgerRecordN --> SmartContractEmail
        LedgerRecordF --> SmartContractEmail
        ProvScoreF --> SmartContractEmail
    end

    %% Link between subgraphs
    EmailHashN --> PrevHashInputF

    %% Styling remains the same
    style YSN fill:#bfb,stroke:#333,stroke-width:2px
    style YSF fill:#bfb,stroke:#333,stroke-width:2px
    style ProvScoreN fill:#e6e6fa,stroke:#333,stroke-width:2px
    style ProvScoreF fill:#d8bfd8,stroke:#333,stroke-width:2px
    style IPFSStoreN fill:#fbf,stroke:#333,stroke-width:2px
    style LedgerTxN fill:#ff9,stroke:#333,stroke-width:2px
    style LedgerRecordN fill:#ff9,stroke:#333,stroke-width:2px
    style LedgerTxF fill:#ffe4b5,stroke:#333,stroke-width:2px
    style LedgerRecordF fill:#ffe4b5,stroke:#333,stroke-width:2px
    style C2PAEmailN fill:#add8e6,stroke:#333,stroke-width:2px
    style C2PAConfF fill:#b0e0e6,stroke:#333,stroke-width:2px
    style Verifier fill:#bbf,stroke:#333,stroke-width:2px
    style MediaOutlet fill:#f9f,stroke:#333,stroke-width:2px
    style SmartContractEmail fill:#f9f,stroke:#333,stroke-width:2px
    style ConfirmationCode fill:#98fb98,stroke:#333,stroke-width:2px

Processing Each Email Turn (Off-Chain - Repeats)

(Steps 1-4 repeat for each email/turn in the conversation)

  1. Receive & Hash Email: YouSeddit system receives the next email (Turn N). It calculates a SHA-256 hash of the full raw email source file (snippetHash_N). This hash represents the complete email turn as a unique, verifiable snippet.
  2. Store Email Off-Chain: The full raw email source is stored (optionally encrypted) in IPFS, generating an IPFS CID (CID_N).
  3. Header Extraction & Analysis: System extracts key email headers and calculates a turn-specific Provenance Score based on factors like digital signatures (PGP/S/MIME), encryption, and DKIM/SPF results.
  4. Determine Type & Links: The system identifies the email as an “initiator” or “response” based on headers (e.g., In-Reply-To). If it’s a response, it identifies the snippetHash of the initiator email it replies to (initiatorHash).

On-Ledger Recording (Email Turn N - Repeats)

(Steps 5-6 repeat for each email/turn)

  1. Evidence Record Smart Contract Interaction: System calls an “Evidence Record” smart contract function providing:
    • The current email’s snippet hash (snippetHash_N).
    • The IPFS CID (CID_N) linking to the raw email content.
    • The snippet type (“initiator” or “response”).
    • If it’s a “response”, the initiatorHash (the snippetHash of the email being replied to).
    • The calculated Provenance Score for this turn (ProvScoreN).
    • Other relevant metadata (sender, recipient, timestamp from headers).
  2. Ledger Recording: The smart contract records this information immutably on the ledger, creating a verifiable entry for the email turn and linking responses back to their initiators. A transaction ID (TxID_N) is generated.

Processing Final Confirmation (Off-Chain - Turn F)

(This occurs once at the end of the agreed-upon exchange)

  1. Receive & Hash Confirmation: YouSeddit system receives confirmation (e.g., a specific email reply or signal). A hash is calculated for this confirmation action (ConfirmationSnippetHash_F).
  2. Update Overall Provenance: The confirmation may boost the Overall Provenance Score for the entire thread.

On-Ledger Recording (Confirmation Turn F)

  1. Confirmation Smart Contract Interaction: System calls a smart contract function (e.g., recordConfirmation) providing:
    • The confirmation snippet hash (ConfirmationSnippetHash_F).
    • The hash of the last actual email snippet (snippetHash_N) to link the confirmation to the end of the exchange.
  2. Ledger Recording: The smart contract records the confirmation, linking it to the last email turn.

Verification & Usage

  1. Context Tracing: Verifiers can trace the conversation context by starting from a response snippet’s ledger entry and following the recorded initiatorHash link back to the initiating email’s ledger entry.
  2. Content Verification: The snippetHash on the ledger can be used to verify the integrity of the email content retrieved from the linked IPFS CID.
  3. Provenance Check: Individual turn scores and the overall score (potentially updated by confirmation) provide trust indicators.
  4. Licensing: Smart contracts can manage licensing based on verified ledger entries for specific snippets (e.g., licensing a specific response/quote linked to its initiator).
  5. Optional C2PA: C2PA manifests can optionally be generated and linked (e.g., via IPFS CID in the ledger record) to provide further details about the email source or processing, complementing the core on-ledger linking.

Security Architecture

Youseddit’s security architecture includes multiple layers of protection:

  1. Email Provenance Scoring - Analyzes factors like PGP/GPG/S/MIME signing/encryption and attestation codes to determine the reliability of email exchanges.
  2. On-Ledger Snippet Records & Linking - Evidence Record smart contracts store immutable snippetHash proofs for each turn, linking responses to initiators for verifiable context.
  3. Off-Chain Content Storage (IPFS) - Original content (email source, transcript snippets) stored off-chain, linked via IPFS CIDs in ledger records.
  4. C2PA Content Provenance - Optional layer providing additional metadata about content origin and processing, potentially linked from ledger records.
  5. Wallet-Based Authentication - For secure user access control.
  6. Smart Contract Enforcement - For automated licensing compliance based on verified snippet hashes and provenance scores recorded on the ledger.

Last modified July 6, 2025: Update deploy.yml (d65b9c1)