# orcwg/cra-hub architecture

> Architecture diagram of the GitHub repository orcwg/cra-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/orcwg/cra-hub
- Repository: https://github.com/orcwg/cra-hub

## Overview

##### Project type and purpose
- This repository (“CRA Hub”) is a documentation hub: a statically-served collection of Markdown files (FAQs, inventories, product definitions, questionnaires, standards, resources).
- It is intended to provide everything a user needs to know about the Cyber Resilience Act (CRA) and its implementation—no dynamic backend or database, purely content.

##### File structure
- Top-level Markdown files (LICENSE.md, README.md, faq.md, inventory.md, standards.md) form the main navigation.
- Four subdirectories hold related content:
- product-definitions/ – Excel and PDF inputs plus explanation Markdown
- questionnaires/ – Markdown questionnaires for manufacturers and OSS projects
- resources/ – PDFs and templates, with a README overview
- community-resources.md & other top-level docs
- No code directories (src/, lib/) or server-side scripts—this is a static content repository.
- Absence of CI config (e.g., GitHub Actions) suggests content is rendered by GitHub Pages (Jekyll) by default.

##### README for additional insights
- README clearly lays out site sections and external links (Google spreadsheets, pull-requests, issues, EU Commission PDFs).

a. Main components
- Content Repository (GitHub repo with Markdown + assets)
- Static Site Generator (Jekyll on GitHub Pages or similar)
- Hosting Platform (GitHub Pages CDN)
- Client Browser (end user viewing the site)
- Developer Workflow Tools (Git, GitHub UI, issues, PRs)
- External Resources (Google Sheets, EU Commission PDFs, Issue trackers)
b. Relationships & interactions
- Developer pushes commits to the GitHub repo → triggers site rebuild.
- Static Site Generator compiles Markdown → outputs HTML/CSS/JS.
- Hosting Platform serves static site assets from CDN to Client Browser.
- Client Browser may fetch embedded/external resources (Google Sheets links, PDF assets in /resources).
- Developer and community members interact via GitHub Issues and Pull Requests.
c. Architectural patterns and principles
- Content-as-code: treat documentation as code, versioned in Git.
- Static Site Hosting: no runtime backend, all pages pre-rendered for speed and security.
- Distributed collaboration using pull requests, issues for content updates.
d. Key technologies
- Markdown (content format)
- Git & GitHub (version control, collaboration)
- Jekyll (or other SSG) for build – implicit via GitHub Pages
- GitHub Pages (hosting/CDN)
- External embeddable links (Google Sheets, PDFs)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Actors
    Developer("Developer"):::dev
    Community("Community"):::dev

    %% Content Repository Group
    subgraph "Content Repository"
        Repo("Content Repository"):::repo
        RootDocs("Root Documentation (LICENSE.md, README.md, faq.md, inventory.md, standards.md, community-resources.md)"):::repo
        ProductDefinitions("Product Definitions"):::repo
        Questionnaires("Questionnaires"):::repo
        ResourcesDir("Resources"):::repo
        Codeowners("_CODEOWNERS"):::repo
    end

    %% Build and Hosting
    SSG("Static Site Generator (Jekyll)"):::build
    CDN("GitHub Pages CDN"):::build

    %% End User and External
    Client("Client Browser"):::user
    External("External Resources (Google Sheets, EU PDFs)"):::external

    %% Relationships
    Developer -->|"git push / pull-request"| Repo
    Community -->|"propose changes (issues/PRs)"| Repo
    Repo -->|"build site"| SSG
    SSG -->|"deploy static assets"| CDN
    Client -->|"HTTP GET pages/assets"| CDN
    Client -->|"fetch linked PDFs/Sheets"| External

    %% Click Events
    click RootDocs "https://github.com/orcwg/cra-hub/tree/main//"
    click ProductDefinitions "https://github.com/orcwg/cra-hub/tree/main//product-definitions"
    click Questionnaires "https://github.com/orcwg/cra-hub/tree/main//questionnaires"
    click ResourcesDir "https://github.com/orcwg/cra-hub/tree/main//resources"
    click Codeowners "https://github.com/orcwg/cra-hub/tree/main//_CODEOWNERS"

    %% Styles
    classDef dev fill:#E3E4FA,stroke:#888,stroke-width:1px
    classDef repo fill:#D0E1F9,stroke:#0366D6,stroke-width:1px
    classDef build fill:#D4F5D2,stroke:#28A745,stroke-width:1px
    classDef user fill:#FFD8A8,stroke:#EA7600,stroke-width:1px
    classDef external fill:#FFE4B5,stroke:#EA7600,stroke-width:1px
```
