# flybywiresim/docs architecture

> Architecture diagram of the GitHub repository flybywiresim/docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/flybywiresim/docs
- Repository: https://github.com/flybywiresim/docs

## Overview

##### Main Components

a. Frontend Layer:
- MkDocs static site generator (evident from mkdocs.yml)
- Custom CSS/JavaScript components (in docs/stylesheets and docs/javascripts)
- Override templates (in overrides directory)

b. Content Management Layer:
- Documentation structure (organized by aircraft types and user types)
- Asset management system (for images, PDFs, and other media)
- Source files management (in src directory)

c. Build & Deployment Layer:
- GitHub Actions workflows (in .github/workflows)
- Cloudflare deployment system
- Vercel configuration (indicated by vercel.json)

##### Relationships

- Content authors → Source Markdown files
- Source files → Build process
- Build process → Static site generation
- Static site → Cloudflare deployment
- GitHub Actions → Automated workflows

##### Specific Components to Highlight

Documentation Structure:
- Aircraft documentation (A32NX, A380X)
- Pilot resources
- Developer resources
- Tool documentation
- Release notes

##### Special Elements

a. Documentation Categories (with distinct sections):
- Aircraft-specific docs (/docs/aircraft/)
- Pilot resources (/docs/pilots-corner/)
- Developer resources (/docs/dev-corner/)
- Tools and utilities (/docs/tools/)

b. Asset Management:
- Image assets
- Source files
- PDF documents

##### Infrastructure Components

Following:
- GitHub repository
- Cloudflare hosting
- Vercel deployment
- CI/CD pipeline

##### Key Workflows

Following processes:
- Documentation contribution flow
- Build and validation process
- Deployment pipeline
- Content update workflow

##### Bottom layer: Infrastructure and deployment

- Component types
- Relationship types
- Special indicators

Keep the abstraction level appropriate for a principal software engineer while maintaining enough detail to understand the complete documentation system architecture. Focus on showing how the documentation system handles multiple aircraft types and user roles while maintaining consistency and ease of maintenance.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        MK[MkDocs Generator]
        CSS[Custom CSS]
        JS[JavaScript Components]
        OT[Override Templates]
    end

    subgraph ContentManagement
        direction TB
        SM[Source Markdown Files]
        AM[Asset Management]
        
        subgraph DocStructure
            direction TB
            AD[Aircraft Documentation]
            PR[Pilot Resources]
            DR[Developer Resources]
            TD[Tools Documentation]
            RN[Release Notes]
        end
        
        subgraph AircraftDocs
            direction TB
            A32[A32NX Documentation]
            A380[A380X Documentation]
        end
    end

    subgraph BuildDeploy
        direction TB
        GH[GitHub Actions]
        CF[Cloudflare]
        VC[Vercel]
        CI[CI/CD Pipeline]
    end

    %% Relationships
    SM --> MK
    AM --> MK
    DocStructure --> MK
    MK --> CI
    CI --> CF
    CI --> VC
    GH --> CI

    %% Click Events
    click MK "https://github.com/flybywiresim/docs/blob/primary/mkdocs.yml"
    click CSS "https://github.com/flybywiresim/docs/tree/primary/docs/stylesheets/"
    click JS "https://github.com/flybywiresim/docs/tree/primary/docs/javascripts/"
    click OT "https://github.com/flybywiresim/docs/tree/primary/overrides/"
    click SM "https://github.com/flybywiresim/docs/tree/primary/src/"
    click AM "https://github.com/flybywiresim/docs/tree/primary/docs/assets/"
    click AD "https://github.com/flybywiresim/docs/tree/primary/docs/aircraft/"
    click PR "https://github.com/flybywiresim/docs/tree/primary/docs/pilots-corner/"
    click DR "https://github.com/flybywiresim/docs/tree/primary/docs/dev-corner/"
    click TD "https://github.com/flybywiresim/docs/tree/primary/docs/tools/"
    click RN "https://github.com/flybywiresim/docs/tree/primary/docs/release-notes/"
    click A32 "https://github.com/flybywiresim/docs/tree/primary/docs/aircraft/a32nx/"
    click A380 "https://github.com/flybywiresim/docs/tree/primary/docs/aircraft/a380x/"
    click GH "https://github.com/flybywiresim/docs/tree/primary/.github/workflows/"
    click VC "https://github.com/flybywiresim/docs/blob/primary/vercel.json"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef content fill:#e67e22,stroke:#d35400,color:white
    classDef infrastructure fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef deployment fill:#2ecc71,stroke:#27ae60,color:white

    class MK,CSS,JS,OT frontend
    class SM,AM,AD,PR,DR,TD,RN,A32,A380 content
    class GH,CF,VC,CI deployment
    
    %% Legend
    subgraph Legend
        F[Frontend Components]:::frontend
        C[Content Management]:::content
        I[Infrastructure]:::infrastructure
        D[Deployment]:::deployment
    end
```
