# c2pa-org/public-draft architecture

> Architecture diagram of the GitHub repository c2pa-org/public-draft, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/c2pa-org/public-draft
- Repository: https://github.com/c2pa-org/public-draft

## Overview

##### Project type and purpose
- This is a documentation‐and‐specification repository: it holds the public draft of the C2PA (Coalition for Content Provenance and Authenticity) specification in both HTML and PDF form.
- It is not a multi-tier application or service, but rather a static documentation site, styled with SASS/CSS/JS, and hosted (likely via GitHub Pages or a similar static site host).

##### File structure
- Top‐level:
- .github/ISSUE_TEMPLATE – configuration for issue templates
- LICENSE.md and README.md – licensing and project overview
- docs/ – all published content and assets
- docs/ hierarchy:
- C2PA_Specification.html/.pdf – core outputs
- Explainer.html, Guidance.html, Security_Considerations.html, UX_Recommendations.html, Harms_Modelling.html, Threats_Assessment.md, etc. – additional specification and assessment docs
- assets/ – static assets subdivided into css/, js/, sass/, webfonts/
– sass/ follows a component‐based pattern (_components, _layout, _libs) for maintainable styling
– js/ includes viewer utilities and site interactions
– css/ holds compiled stylesheets used by the HTML
- There are no backend services, databases, or server‐side code.

##### README for additional insights
- Confirms dual‐format publication (PDF + HTML)
- Notes ongoing work on threats, misuses, user experience – each with its own markdown/html doc
- Encourages community feedback via GitHub issues

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Content Sources
    subgraph "Content Sources" 
        direction TB
        ContentHTML["HTML Fragments (docs/*.html)"]:::source
        ContentMD["Markdown Files (docs/*.md)"]:::source
    end

    %% Style Definitions
    subgraph "Style Definitions (SASS)" 
        direction TB
        SassSrc["SASS Source (docs/assets/sass)"]:::source
    end

    %% Static Assets
    subgraph "Static Assets" 
        direction TB
        JSUtils["JavaScript Utilities (docs/assets/js)"]:::source
        ImagesFonts["Images & Fonts (docs/images, docs/assets/webfonts)"]:::source
    end

    %% Build Pipeline
    subgraph "Build Pipeline" 
        direction TB
        SassCompiler["SASS Compiler"]:::build
        HTMLAssembler["HTML Assembler"]:::build
        PDFGenerator["PDF Generator"]:::build
        JSBundler["JS Bundler"]:::build
    end

    %% Artifacts
    subgraph "Artifacts" 
        direction TB
        CSSAssets["Compiled CSS (docs/assets/css)"]:::artifact
        HTMLSite["Website Pages (HTML)"]:::artifact
        PDFSpec["PDF Specification"]:::artifact
        JSAssets["Bundled JS"]:::artifact
    end

    %% Delivery
    subgraph "Delivery & Consumption" 
        direction TB
        Hosting["Hosting Platform (GitHub Pages/CDN)"]:::delivery
        EndUsers["End Users (Browsers)"]:::delivery
    end

    %% CI Feedback
    subgraph "Community Feedback"
        direction TB
        Issues["GitHub Issues (.github/ISSUE_TEMPLATE)"]:::source
        RepoReadme["Project Metadata (README.md, LICENSE.md)"]:::source
    end

    %% Connections
    ContentHTML -->|feeds| HTMLAssembler
    ContentMD -->|feeds| HTMLAssembler
    SassSrc -->|compiles| SassCompiler
    SassCompiler -->|outputs CSS| CSSAssets
    JSUtils -->|bundles| JSBundler
    JSBundler -->|outputs JS| JSAssets
    HTMLAssembler -->|generates| HTMLSite
    PDFGenerator -->|generates| PDFSpec
    CSSAssets -->|deployed with| Hosting
    JSAssets -->|deployed with| Hosting
    HTMLSite -->|deployed| Hosting
    PDFSpec -->|deployed| Hosting
    Hosting -->|serves via HTTP| EndUsers
    Issues -->|trigger CI| HTMLAssembler
    Issues -->|trigger CI| PDFGenerator
    RepoReadme -->|informs| ContentMD

    %% Click Events
    click ContentHTML "https://github.com/c2pa-org/public-draft/blob/main/docs/C2PA_Specification.html"
    click PDFSpec "https://github.com/c2pa-org/public-draft/blob/main/docs/C2PA_Specification.pdf"
    click SassSrc "https://github.com/c2pa-org/public-draft/blob/main/docs/assets/sass/main.scss"
    click CSSAssets "https://github.com/c2pa-org/public-draft/blob/main/docs/assets/css/main.css"
    click JSUtils "https://github.com/c2pa-org/public-draft/blob/main/docs/assets/js/main.js"
    click Issues "https://github.com/c2pa-org/public-draft/blob/main/.github/ISSUE_TEMPLATE/general-issue.md"
    click RepoReadme "https://github.com/c2pa-org/public-draft/blob/main/README.md"

    %% Styles
    classDef source fill:#D0E6FF,stroke:#0366d6,color:#0366d6
    classDef build fill:#DFFFE0,stroke:#28A745,color:#22863A
    classDef artifact fill:#FFF4D1,stroke:#DBAB09,color:#735C0F
    classDef delivery fill:#F0E7FF,stroke:#6F42C1,color:#6F42C1
```
