# hackyourfuture-cph/programme architecture

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

- Interactive diagram: https://gitdiagram.com/hackyourfuture-cph/programme
- Repository: https://github.com/hackyourfuture-cph/programme

## Overview

##### Project Type and Purpose
- This is a documentation‐centric monorepo that “Documents the HYF programme, courses and modules.” It contains all of the markdown content for current courses (`/courses/*`), legacy material (`/legacy/*`), shared modules (`/shared-modules/*`), contribution guidelines (`/contributing/*`), plus a small custom support toolchain (`/support/*`) and CI configuration (`.github/workflows/lint.yml`).

##### File Structure Analysis
- Top-level directories:
- `courses/` – live curriculum grouped by Foundation, Backend, Frontend, Pre-Course
- `legacy/` – archived course material in the same structure
- `shared-modules/` – reusable lesson plans and assignment templates
- `contributing/` – governance, meeting notes, proposals
- `support/` – a small TypeScript CLI tool for parsing/validating/watch tasks
- Config & tool files:
- `package.json` / `package-lock.json` – Node.js project manifest
- `support/tsconfig.json` – TypeScript compiler settings
- `.markdownlint.yaml`, `.prettierignore` – formatting and linting rules
- GitHub Actions workflow for linting (`.github/workflows/lint.yml`)

##### README Insights
- Confirms the repo’s role as the single source of truth for HYF CPH’s curriculum docs.

a. Main Components
- Content Store
- “Courses” content
- “Legacy” content
- “Shared-modules”
- “Contributing” docs
- Support Toolchain (Node.js + TypeScript scripts)
- parse.ts, validateLinks.ts, watch.ts – a local CLI that scans and validates all `.md` files
- CI Pipeline (GitHub Actions)
- Linting / markdown checks triggered on push/PR
- Development Environment
- Developers clone repo, install via `npm install`, run `npm run watch` or `npm run lint`
b. Relationships & Data Flow
- Developers → (edit/add) → Content Store
- Support Toolchain → (reads) → Content Store → (reports) → Developer console
- CI Pipeline → (on push) → runs Support Toolchain (lint/validate), posts status back to GitHub
c. Architectural Patterns & Principles
- Monorepo pattern: all curriculum modules and tooling live in one repository
- Separation of concerns: content vs. tooling vs. CI vs. contribution docs
- Convention-over-configuration: directory names define module type and stage (current vs. legacy)
d. Key Technologies & Frameworks
- Markdown for content
- Node.js + TypeScript for custom scripts
- MarkdownLint and Prettier for formatting
- GitHub Actions for CI

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Monorepo Repository
    subgraph "Monorepo Repository"
        direction TB
        subgraph "Content Store"
            direction TB
            Courses["courses/"]:::content
            Legacy["legacy/"]:::content
            Shared["shared-modules/"]:::content
            Contrib["contributing/"]:::content
        end
        subgraph "Support Toolchain (Node.js + TypeScript)"
            direction TB
            ST_Parse["parse.ts"]:::tool
            ST_Validate["validateLinks.ts"]:::tool
            ST_Watch["watch.ts"]:::tool
            TSConfig["tsconfig.json"]:::config
            PKG["package.json & package-lock.json"]:::config
        end
        subgraph "CI Pipeline"
            direction TB
            LintWF["lint.yml"]:::ci
            MDLint[".markdownlint.yaml"]:::config
            PrettierIg[".prettierignore"]:::config
        end
    end

    %% External Actors
    Developer(("Developer")):::external
    GitHub(("GitHub")):::external
    NPMRegistry(("NPM Registry")):::external

    %% Developer Workflow
    Developer -->|edit/add| Courses
    Developer -->|edit/add| Legacy
    Developer -->|edit/add| Shared
    Developer -->|edit/add| Contrib
    Developer -->|npm install| NPMRegistry
    Developer -->|npm run watch| ST_Watch
    Developer -->|npm run lint| ST_Validate

    %% Push to CI
    Courses -->|push/PR| GitHub
    Legacy -->|push/PR| GitHub
    Shared -->|push/PR| GitHub
    Contrib -->|push/PR| GitHub

    GitHub -->|trigger| LintWF
    LintWF -->|runs| ST_Validate
    LintWF -->|runs| ST_Parse
    LintWF -->|runs| ST_Watch
    LintWF -->|reads| MDLint
    LintWF -->|reads| PrettierIg
    LintWF -->|reports| GitHub

    %% Local Validation Flow
    Courses -->|local run| ST_Parse
    Courses -->|local run| ST_Validate
    Courses -->|watch&rebuild| ST_Watch
    ST_Parse -->|report| Developer
    ST_Validate -->|report| Developer

    %% Click Events
    click Courses "https://github.com/hackyourfuture-cph/programme/tree/main/courses/"
    click Legacy "https://github.com/hackyourfuture-cph/programme/tree/main/legacy/"
    click Shared "https://github.com/hackyourfuture-cph/programme/tree/main/shared-modules/"
    click Contrib "https://github.com/hackyourfuture-cph/programme/tree/main/contributing/"
    click ST_Parse "https://github.com/hackyourfuture-cph/programme/blob/main/support/src/parse.ts"
    click ST_Validate "https://github.com/hackyourfuture-cph/programme/blob/main/support/src/validateLinks.ts"
    click ST_Watch "https://github.com/hackyourfuture-cph/programme/blob/main/support/src/watch.ts"
    click TSConfig "https://github.com/hackyourfuture-cph/programme/blob/main/support/tsconfig.json"
    click PKG "https://github.com/hackyourfuture-cph/programme/blob/main/package.json"
    click LintWF "https://github.com/hackyourfuture-cph/programme/blob/main/.github/workflows/lint.yml"
    click MDLint "https://github.com/hackyourfuture-cph/programme/blob/main/.markdownlint.yaml"
    click PrettierIg "https://github.com/hackyourfuture-cph/programme/blob/main/.prettierignore"

    %% Styles
    classDef content fill:#cce5ff,stroke:#004085,color:#004085;
    classDef tool fill:#d4edda,stroke:#155724,color:#155724;
    classDef ci fill:#d1ecf1,stroke:#0c5460,color:#0c5460;
    classDef config fill:#fff3cd,stroke:#856404,color:#856404;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
```
