# linkedin/school-of-sre architecture

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

- Interactive diagram: https://gitdiagram.com/linkedin/school-of-sre
- Repository: https://github.com/linkedin/school-of-sre

## Overview

##### Project Type and Purpose
- The project is an educational website that hosts various courses related to topics like Linux, Git, databases, containerization, system design, and more.
- It leverages content written in Markdown (organized into courses and levels) and uses MkDocs for static site generation. Customization is done via “overrides” (custom HTML partials) and styling (custom CSS in courses/stylesheets).
- Additionally, GitHub workflows (in .github/workflows) and other CI/CD files indicate an automated deployment process.

##### Main Components
a. Content Repository (Courses):
- The courses directory holds all the educational materials, organized by levels (level101, level102) and topics (e.g., python_web, linux_basics, system_design).
- It includes subdirectories for images, Markdown files, and supplementary materials (like CODE_OF_CONDUCT, CONTRIBUTING guidelines).

b. Documentation/Static Site Generator:
- The mkdocs.yml file indicates that MkDocs is used as the static site generator.
- The Overrides directory (with custom HTML partials) is used for modifying theme elements (e.g., header, nav).
- requirements.txt and any related configuration files show dependencies that MkDocs and possibly other Python packages use to build the site.

c. Deployment & CI/CD:
- The .github/workflows folder includes deployment workflows (e.g., gh-deploy.yml), automating the build and publishing process, likely to GitHub Pages or a similar hosting service.
- This part of the design automates testing and deployment for updating the educational content live.

d. Community and Documentation Support:
- Files like LICENSE, NOTICE, CONTRIBUTING.md, and courses/sre_community.md indicate community and governance aspects that could be represented alongside the main components.

##### Relationships and Data/Control Flow
- The Markdown content in the “courses” directory is processed by MkDocs (using the configuration defined in mkdocs.yml) to generate static webpages.
- Custom overrides (from the “overrides” folder) and custom stylesheets (from courses/stylesheets) are applied during the build process.
- The build and deployment processes are managed using GitHub workflows which listen for changes in the repository, triggering CI/CD pipelines.
- The produced static site is then published (potentially to GitHub Pages or another hosting platform).

##### Architectural Patterns and Design Principles
- Separation of Concerns: Content is maintained separately (organized in course directories) and presentation is handled by the static site generator.
- Modular Design: Each course or topic is a self-contained module (level101, level102, etc.), making it easy to extend and manage.
- Automation: CI/CD pipelines (GitHub Actions) are used to ensure the latest content and configuration changes are deployed automatically.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Content Layer
    subgraph "Content Layer"
        CR["Content Repository (Courses)"]:::content
        L101["Level 101 Content"]:::content
        L102["Level 102 Content"]:::content
        CD["Community & Documentation"]:::community
    end

    %% Build & Process Layer
    subgraph "Build & Process Layer"
        cfg["MkDocs Config (mkdocs.yml)"]:::build
        mkd["Static Site Generator (MkDocs)"]:::build
        ov["Custom Overrides"]:::build
        st["Custom Stylesheets"]:::build
        gs["Generated Static Site"]:::build
    end

    %% Deployment Layer
    subgraph "Deployment Layer"
        cicd["CI/CD Pipeline"]:::deployment
        host["Hosted Site"]:::deployment
    end

    %% Relationships and Data Flow
    CR -->|"providesMarkdown"| mkd
    L101 -->|"content"| mkd
    L102 -->|"content"| mkd
    CR -->|"triggersUpdate"| cicd
    cfg -->|"configuration"| mkd
    ov -->|"customHTML"| mkd
    st -->|"customStyling"| mkd
    cicd -->|"automatedBuild"| mkd
    mkd -->|"buildsSite"| gs
    gs -->|"deploysTo"| host

    %% Community not directly part of flow but related to content
    CD ---|"governance"| CR

    %% Click Events for Component Mapping
    click CR "https://github.com/linkedin/school-of-sre/tree/main/courses/"
    click L101 "https://github.com/linkedin/school-of-sre/tree/main/courses/level101/"
    click L102 "https://github.com/linkedin/school-of-sre/tree/main/courses/level102/"
    click cfg "https://github.com/linkedin/school-of-sre/blob/main/mkdocs.yml"
    click ov "https://github.com/linkedin/school-of-sre/tree/main/overrides/"
    click ov "https://github.com/linkedin/school-of-sre/tree/main/overrides/partials/"
    click st "https://github.com/linkedin/school-of-sre/blob/main/courses/stylesheets/custom.css"
    click cicd "https://github.com/linkedin/school-of-sre/tree/main/.github/workflows/"
    click cicd "https://github.com/linkedin/school-of-sre/blob/main/.github/workflows/gh-deploy.yml"
    click CD "https://github.com/linkedin/school-of-sre/tree/main/LICENSE"
    click CD "https://github.com/linkedin/school-of-sre/tree/main/NOTICE"
    click CD "https://github.com/linkedin/school-of-sre/blob/main/CONTRIBUTING.md"
    click CD "https://github.com/linkedin/school-of-sre/blob/main/courses/CODE_OF_CONDUCT.md"

    %% Styles
    classDef content fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef build fill:#A9DFBF,stroke:#28B463,stroke-width:2px;
    classDef deployment fill:#F9E79F,stroke:#D4AC0D,stroke-width:2px;
    classDef community fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
