# ubc-cs/cpsc330-2024w2 architecture

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

- Interactive diagram: https://gitdiagram.com/ubc-cs/cpsc330-2024w2
- Repository: https://github.com/ubc-cs/cpsc330-2024w2

## Overview

##### Main Components
- Course Homepage & Static Website – At the top level there are core files such as README.md, _config.yml, _toc.yml, and the _static folder (with extra.css) that indicate that the site is built with a static-site generator (likely Jekyll in this case). Include a “Static Site Builder” or “Jekyll Engine” component.
- Documentation & Course Materials – The docs directory contains guides, instructions, and supplemental documents; the syllabus.md, learning-objectives.md, and other files act as reference material. They can be grouped as “Course Documentation & Reference.”
- Lecture Content & Notebooks – The lectures folder is extensive and subdivided into directories (e.g., different instructor lecture series, notes, tutorials, and even demo code in lectures/code). This represents the bulk of the course’s educational content.
- Deployment & CI/CD – The presence of GitHub workflows (in .github/workflows) and a file like cpsc330env.yml indicate that the site is built and deployed automatically. This component (“Deployment Pipeline/CI”) shows the continuous deployment process triggering website regeneration and publishing.

##### Relationships
- The “Lecture Code & Data Assets” may be highlighted as supportive components for demonstration materials or as embedded interactive examples within the lectures.
- “Deployment Pipeline/CI” as a pipeline that watches the repository for commits/merge events. Show directional flows from the repository (and its file tree) through GitHub Actions to the final deployment destination (such as GitHub Pages or an educational portal).

##### Architectural Patterns & Design Principles
- Separation of concerns is visible: The content is split between static website components, lecture notebooks, and supporting code/data. Each is organized in its own folder structure.
- Use of a static site generator (via _config.yml and _toc.yml) and continuous deployment (via GitHub workflows) exemplifies modern DevOps practices for educational sites.
- The consistent directory naming (docs, lectures, lectures/code, lectures/data) shows a modular approach to managing course assets.
- The project leverages external services (YouTube, Canvas, Gradescope) which should be displayed as part of an overall integration pattern.

##### Relevant Technologies & Frameworks
- Jekyll or similar static site generator (configured via _config.yml and _toc.yml)
- GitHub Actions for CI/CD deployment (configured in .github/workflows)
- Markdown, Jupyter Notebooks (for interactive lecture content), and PDF documents for course materials.
- Python scripts for code demonstrations and data processing within lectures.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Git Repository"]:::repo

    subgraph "Content Sources"
        C["Course Documentation & Reference"]:::docs
        D["Lecture Content & Notebooks"]:::lectures
        E["Lecture Code & Data Assets"]:::codeData
    end

    F["Deployment Pipeline/CI"]:::deploy

    B["Jekyll Engine (Static Site Builder)"]:::static
    G["Course Homepage & Static Website"]:::homepage

    subgraph "External Integrations"
        EX1["Canvas"]:::external
        EX2["Gradescope"]:::external
        EX3["Piazza"]:::external
        EX4["YouTube"]:::external
    end

    A --> C
    A --> D
    A --> E
    A --> F

    C --> B
    D --> B
    E --> B
    F --> B

    B --> G

    G --> EX1
    G --> EX2
    G --> EX3
    G --> EX4

    click B "https://github.com/ubc-cs/cpsc330-2024w2/blob/main/_config.yml"
    click C "https://github.com/ubc-cs/cpsc330-2024w2/tree/main/docs"
    click D "https://github.com/ubc-cs/cpsc330-2024w2/tree/main/lectures"
    click E "https://github.com/ubc-cs/cpsc330-2024w2/tree/main/lectures/code"
    click F "https://github.com/ubc-cs/cpsc330-2024w2/tree/main/.github/workflows"

    classDef repo fill:#D5E8D4,stroke:#82B366,stroke-width:2px;
    classDef docs fill:#CCE5FF,stroke:#004085,stroke-width:2px;
    classDef lectures fill:#CCFFCC,stroke:#008000,stroke-width:2px;
    classDef codeData fill:#FFF2CC,stroke:#B8860B,stroke-width:2px;
    classDef static fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef deploy fill:#FFE6CC,stroke:#CC6600,stroke-width:2px;
    classDef homepage fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef external fill:#E2E2E2,stroke:#828282,stroke-dasharray: 5, 5,stroke-width:2px;
```
