# studio-17/epitech-subjects architecture

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

- Interactive diagram: https://gitdiagram.com/studio-17/epitech-subjects
- Repository: https://github.com/studio-17/epitech-subjects

## Overview

##### Project type and purpose
- This repository is primarily a content-and-documentation repository (“Epitech-Subjects”) that hosts all semester subject files for Epitech students.
- It also contains a small Python “AutoDoc” utility (in the AutoDoc/ directory) for automatically generating or updating README files, plus GitHub Actions workflows for link-checking and CI.

##### File structure analysis
- Top-level:
- .github/workflows – CI pipelines (markdown link-checker).
- AutoDoc/ – Python tool:
– main.py, create_default_readme.py (CLI entry points)
– requirements.txt
– help/ – user instructions
– src/auto_doc.py, param.py, scrapper.py, type_enum.py, writter.py (core modules)
- README.md – project overview and table of content links.
- assets/ – static images for the README.
- Semester-0…Semester-5 – hierarchical tree of subject directories and files. These are static artifacts, not active code.

##### Key insights from README
- The project is not a web application itself but the source repo for a static website (hosted separately on GitHub Pages).
- README describes modules (semesters), credits, and links to individual subject directories.

a. Main components
- Git repository (GitHub)
- GitHub Actions workflows (CI)
- AutoDoc Python utility
- Static content directories (Semester-X)
- GitHub Pages (external hosting)
b. Relationships and interactions
1. Developer → GitHub (push code & content)
2. GitHub → GitHub Actions:
- markdown-links.yml validates README links.
3. AutoDoc CLI (invoked manually or as part of CI) reads source directories:
- param.py parses CLI flags
- scrapper.py crawls directory tree & extracts metadata
- auto_doc.py orchestrates workflow
- writter.py writes/updates README.md files
4. Output: updated README.md & assets in the repo
5. GitHub Pages reads the final static files and publishes the website
c. Architectural patterns / principles
- Modular design in AutoDoc: separation of concerns between scraping, parameter handling, and writing.
- Event-driven CI: workflows trigger on push or pull_request.
- Static site deployment: content is pure markdown/static assets, no dynamic backend.
d. Key technologies/frameworks
- Python 3 (AutoDoc)
- PyPI dependencies (listed in requirements.txt)
- GitHub Actions for CI/CD
- Markdown for content
- GitHub Pages for hosting

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Top-level actors
    Dev["Developer Workstation"]:::developer

    %% Repository
    Repo["GitHub Repository"]:::repo

    %% CI/CD
    CI["GitHub Actions\n(markdown-links.yml)"]:::ci

    %% AutoDoc Utility with modules
    subgraph "AutoDoc Utility" 
        direction TB
        AD_main["main.py"]:::developer
        AD_create["create_default_readme.py"]:::developer
        AD_requirements["requirements.txt"]:::developer
        AD_help["help_auto_doc.txt"]:::developer
        AD_param["param.py"]:::developer
        AD_scrapper["scrapper.py"]:::developer
        AD_auto["auto_doc.py"]:::developer
        AD_type["type_enum.py"]:::developer
        AD_writter["writter.py"]:::developer
    end

    %% Static content directories
    subgraph "Static Content (Semester Folders)"
        direction TB
        SC0["Semester-0/"]:::content
        SC1["Semester-1/"]:::content
        SC2["Semester-2/"]:::content
        SC3["Semester-3/"]:::content
        SC4["Semester-4/"]:::content
        SC5["Semester-5/"]:::content
    end

    %% External hosting
    Pages["GitHub Pages"]:::external

    %% Relationships
    Dev -->|push code & content| Repo
    Repo -->|on push/pull_request| CI
    Repo -->|trigger manual or CI| AD_main
    AD_main -->|uses| AD_param
    AD_param -->|calls| AD_scrapper
    AD_scrapper -->|orchestrated by| AD_auto
    AD_auto -->|writes via| AD_writter
    AD_main -->|reads| SC0 -.-> AD_scrapper
    SC1 -.-> AD_scrapper
    SC2 -.-> AD_scrapper
    SC3 -.-> AD_scrapper
    SC4 -.-> AD_scrapper
    SC5 -.-> AD_scrapper
    AD_writter -->|generate README| Repo
    Repo -->|deploy static site| Pages

    %% Click Events
    click CI "https://github.com/studio-17/epitech-subjects/blob/main/.github/workflows/markdown-links.yml"
    click AD_main "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/main.py"
    click AD_create "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/create_default_readme.py"
    click AD_requirements "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/requirements.txt"
    click AD_help "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/help/help_auto_doc.txt"
    click AD_param "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/src/param.py"
    click AD_scrapper "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/src/scrapper.py"
    click AD_auto "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/src/auto_doc.py"
    click AD_type "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/src/type_enum.py"
    click AD_writter "https://github.com/studio-17/epitech-subjects/blob/main/AutoDoc/src/writter.py"
    click SC0 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-0/"
    click SC1 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-1/"
    click SC2 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-2/"
    click SC3 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-3/"
    click SC4 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-4/"
    click SC5 "https://github.com/studio-17/epitech-subjects/tree/main/Semester-5/"

    %% Styles
    classDef developer fill:#D0E6FF,stroke:#0288D1,color:#000
    classDef repo fill:#E3F2FD,stroke:#1976D2,color:#000
    classDef ci fill:#E8F5E9,stroke:#2E7D32,color:#000
    classDef content fill:#D0E6FF,stroke:#0288D1,color:#000
    classDef external fill:#FFF3E0,stroke:#F57C00,color:#000
```
