# aditya-jai/computer-science architecture

> Architecture diagram of the GitHub repository aditya-jai/computer-science, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aditya-jai/computer-science
- Repository: https://github.com/aditya-jai/computer-science

## Overview

##### Project Type and Purpose
- This is a **documentation website** for the Open Source Society University (OSSU) computer-science curriculum.
- It’s implemented as a **static site** using **Jekyll** and hosted via **GitHub Pages**.
- The README makes clear that the repo’s role is to present curriculum content (Markdown course pages, extras, guidelines) and coordinate contributions and community engagement.

##### File Structure Analysis
- Top-level files:
- `.github/` – issue templates & CI workflows (GitHub Actions)
- `_config.yml` – Jekyll site configuration
- `_includes/`, `_layouts/` – Jekyll partials and page layouts
- `_site/` (implicitly, generated output)
- `coursepages/`, `extras/`, `images/` – source content
- `README.md`, `CONTRIBUTING.md`, `FAQ.md` etc. – site pages
- No backend code or dynamic services—purely a build-and-deploy pipeline.

##### Key Components
a. Version Control (GitHub)
- Repo containing source Markdown, templates, config, images.
- Branches and pull requests as contribution flow.
b. Continuous Integration (GitHub Actions)
- Workflow `.github/workflows/delete-empty-issues.yml` (and potentially others) runs on push/PR.
- Steps: checkout → Jekyll build → link checks / lint → automatic cleanup tasks.
c. Static Site Generator (Jekyll)
- Reads `_config.yml`, `_includes/`, `_layouts/`, plus Markdown in `coursepages/`, `extras/`, root.
- Produces HTML/CSS/JS static assets.
d. Hosting & Delivery (GitHub Pages)
- Deploys the generated `_site/` to `gh-pages` or `master` branch.
- Serves content at `ossu.cs/` via `CNAME`.
e. Consumers (Web Browsers)
- End-users access the site via browser over HTTPS.
f. Optional Local Development
- Developer machine runs `jekyll serve` with Ruby, bundler, local preview.

##### Relationships and Data Flow
1. Developer clones repo → edits Markdown, templates, or config → commits & pushes.
2. GitHub Actions triggers on push/PR:
- Lints Markdown, removes stale issues, builds site.
3. On successful build, Actions deploy static `_site/` to Pages branch.
4. GitHub Pages serves static HTML/CSS/JS at the custom domain.
5. End-user browser requests pages → delivered by GitHub Pages CDN.

##### Architectural Patterns & Principles
- **Separation of Concerns**:
- Source content vs. templates/layouts
- CI/CD pipeline separate from hosting
- **Infrastructure as Code**:
- GitHub workflows declared in YAML
- **Content-First Architecture**:
- Curriculum content is primary; site generator patterns support assembly.
- **Community & Contribution Model**:
- Issue templates and CONTRIBUTING guide embedded in repo.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer
    Dev["Developer Machine"]:::actor

    %% Version Control
    subgraph "Version Control (GitHub Repo)"
        direction TB
        RepoRoot["Root Directory /"]:::repo
        Content["Markdown Content"]:::repo
        Templates["Jekyll Templates"]:::repo
        Config["_config.yml"]:::repo
        Community["Community & Docs"]:::repo
    end

    %% CI/CD
    subgraph "Continuous Integration (GitHub Actions)"
        direction TB
        Workflow["Workflow: delete-empty-issues.yml"]:::ci
        IssueTemplate["Issue Templates"]:::ci
    end

    %% Static Site Generation
    subgraph "Static Site Generator (Jekyll)"
        direction TB
        Includes["Includes (_includes/)"]:::ssg
        Layouts["_layouts/page.html"]:::ssg
        Build["jekyll build"]:::ssg
    end

    %% Hosting & Delivery
    subgraph "Hosting & Delivery (GitHub Pages)" 
        direction TB
        Pages["GitHub Pages"]:::host
        Domain["Custom Domain (CNAME)"]:::host
    end

    %% End User
    User["Web Browser"]:::actor

    %% Relationships
    Dev -->|"clones & pushes"| RepoRoot
    RepoRoot --> Content
    RepoRoot --> Templates
    RepoRoot --> Config
    RepoRoot --> Community

    RepoRoot -->|"on push/PR"| Workflow
    Workflow -->|runs| IssueTemplate
    Workflow -->|runs| Build

    Content -->|feeds into| Build
    Templates -->|feeds into| Build
    Config -->|feeds into| Build
    Includes -->|used by| Build
    Layouts -->|used by| Build

    Build -->|generates _site/| Pages
    Pages -->|served via HTTPS| User
    Pages --> Domain
    Domain --> User

    %% Click Events
    click RepoRoot "https://github.com/aditya-jai/computer-science/tree/master//"
    click Workflow "https://github.com/aditya-jai/computer-science/blob/master/.github/workflows/delete-empty-issues.yml"
    click IssueTemplate "https://github.com/aditya-jai/computer-science/blob/master/.github/ISSUE_TEMPLATE/request-for-comment-template.md"
    click Config "https://github.com/aditya-jai/computer-science/blob/master/_config.yml"
    click Includes "https://github.com/aditya-jai/computer-science/blob/master/_includes/custom-head.html"
    click Includes "https://github.com/aditya-jai/computer-science/blob/master/_includes/footer.html"
    click Includes "https://github.com/aditya-jai/computer-science/blob/master/_includes/nav-items.html"
    click Layouts "https://github.com/aditya-jai/computer-science/blob/master/_layouts/page.html"
    click Content "https://github.com/aditya-jai/computer-science/tree/master/coursepages/"
    click Extras "https://github.com/aditya-jai/computer-science/tree/master/extras/"
    click Dev "https://github.com/aditya-jai/computer-science/blob/master/README.md"
    click Community "https://github.com/aditya-jai/computer-science/blob/master/CONTRIBUTING.md"
    click Domain "https://github.com/aditya-jai/computer-science/tree/master/CNAME"

    %% Styles
    classDef actor fill:#ddd,stroke:#333,stroke-width:1px
    classDef repo fill:#ddeeff,stroke:#3399ff,stroke-width:1px
    classDef ci fill:#ddffdd,stroke:#33cc33,stroke-width:1px
    classDef ssg fill:#eeffee,stroke:#33aa33,stroke-width:1px
    classDef host fill:#ffe5cc,stroke:#ff9933,stroke-width:1px
```
