# accordproject/techdocs architecture

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

- Interactive diagram: https://gitdiagram.com/accordproject/techdocs
- Repository: https://github.com/accordproject/techdocs

## Overview

##### Main Components
- Documentation Content – This includes the “docs” directory (with various markdown files and versioned documents) where the bulk of the content (tutorials, specifications, guides) resides.
- Website Frontend – Located under the “website” directory, it holds the Docusaurus configuration (site config, pages, sidebars, scripts, and static assets) that turns the documentation content into a navigable website.
- Assets and Supporting Files – The “assets” folder contains images, PDFs, and other media used in branding and documentation.
- CI/CD and Build Infrastructure – The “.github/workflows” directory and various build scripts (e.g., in “scripts” and parts of “docs/assets/architecture”) indicate that continuous integration (build and publish) is used to generate and deploy the site.
- Versioning Infrastructure – The “website/versioned_docs”, “website/versioned_sidebars”, and “website/versions.json” directories manage multiple versions of documentation, which is critical for serving legacy and current information.

##### Relationships and Interactions
- The Documentation Content (docs/...) feeds into the Website Frontend during the build process. Docusaurus takes the content and renders static HTML pages.
- The build process (triggered via GitHub workflows) pulls the latest changes from the repository, compiles the website (using configuration files from the “website” directory and build scripts), and then deploys the generated static site.
- The assets are referenced both by the docs and the website’s static directories.
- Version control and CI/CD ensure that updates (both to technical content and website configuration) are automatically reflected on the live site (https://docs.accordproject.org) once the build and deployment pipeline passes.

##### Architectural Patterns and Technologies
- Static Site Generation – The use of Docusaurus means that the system is built on a static site generator architecture. The content is written in markdown and transformed into a static HTML site.
- Versioning – A key design element is the management of multiple versions of documentation, indicated by the “versioned_docs” and “versioned_sidebars” directories.
- Separation of Concerns – Clearly divided between documentation (content) and website code (presentation and rendering), along with build and deployment automation (via CI/CD workflows).
- Open Source and Collaboration – Configuration files like CONTRIBUTING.md, DEVELOPERS.md, and GitHub templates highlight community collaboration processes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input Components
    A["Documentation Source (docs)"]:::content
    subgraph "Assets and Supporting Files"
        B1["Assets Folder"]:::content
        B2["Docs Assets"]:::content
    end
    C["Website Frontend (React-based, Docusaurus Config)"]:::presentation
    subgraph "Versioning Infrastructure"
        V1["Versioned Docs"]:::content
        V2["Versioned Sidebars"]:::content
        V3["Versions JSON"]:::content
    end

    %% Build Process
    D["Static Site Generator (Docusaurus Build)"]:::process

    %% CI/CD Pipeline Components
    subgraph "CI/CD Pipeline (Build and Publish)"
        E1["GitHub Workflows"]:::infrastructure
        E2["Build Scripts"]:::infrastructure
    end

    %% Deployed Site
    F["Deployed Static Website (docs.accordproject.org)"]:::deployed

    %% Data Flow Connections
    A --> D
    B1 --> D
    B2 --> D
    C --> D
    V1 --> D
    V2 --> D
    V3 --> D
    D --> E1
    D --> E2
    E1 --> F
    E2 --> F

    %% Click Events
    click A "https://github.com/accordproject/techdocs/tree/main/docs/"
    click B1 "https://github.com/accordproject/techdocs/tree/main/assets/"
    click B2 "https://github.com/accordproject/techdocs/tree/main/docs/assets/"
    click C "https://github.com/accordproject/techdocs/tree/main/website/"
    click V1 "https://github.com/accordproject/techdocs/tree/main/website/versioned_docs/"
    click V2 "https://github.com/accordproject/techdocs/tree/main/website/versioned_sidebars/"
    click V3 "https://github.com/accordproject/techdocs/blob/main/website/versions.json"
    click E1 "https://github.com/accordproject/techdocs/blob/main/.github/workflows/build-and-publish.yml"
    click E2 "https://github.com/accordproject/techdocs/tree/main/scripts/"

    %% Styles
    classDef content fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef presentation fill:#d4edda,stroke:#333,stroke-width:2px;
    classDef process fill:#fff3cd,stroke:#333,stroke-width:2px;
    classDef infrastructure fill:#f8d7da,stroke:#333,stroke-width:2px;
    classDef deployed fill:#d1c4e9,stroke:#333,stroke-width:2px;
```
