# johnsonlo00/dlmuthesis architecture

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

- Interactive diagram: https://gitdiagram.com/johnsonlo00/dlmuthesis
- Repository: https://github.com/johnsonlo00/dlmuthesis

## Overview

##### Main Components
- Thesis Template Core: At the heart is the document class file (dlmuthesis.cls) and associated style files (e.g., dlmuthesis-bachelor.bst). This component encapsulates macro definitions and formatting rules.
- Main Document Files (“Main Bodies”): The main_<type>.tex files (for BAhumanities, BAstem, DOC, MA), along with their corresponding chapters and auxiliary texts (found in the mainbody folder), represent the different thesis modes envisioned in the template.
- Figures and Assets: The figures directory holds images (logo, signatures, and chapter-specific images) which are used for thesis cover pages and inside content.
- Code Samples: The codes folder contains sample source code files (in C++, Java, MATLAB, Python). These serve as examples or content inserts for code listings in the thesis.
- Supporting Documents & Manuals: Files like guidebook_of_dlmuthesis.pdf provide documentation and usage instructions.
- Bibliography Resources: The refs folder contains bibliography files (.bib) and additional configuration related to references.
- Miscellaneous Archives: The misc directory holds additional samples or “dead” files that, while not core to the template’s operation, provide extra reference material for special cases.

##### Relationships and Interactions
- The main document files (main_<type>.tex) serve as entry points and include the sequential chapters from the mainbody subdirectories. They rely on the dlmuthesis.cls for formatting and standards.
- Build scripts (latexmkrc, Windows/macOS shell files) form a “technical wrapper” around the LaTeX compilation process, facilitating automated builds. They connect to the main documents and indirectly to all content.
- The guidebook and documentation components (guidebook_of_dlmuthesis.pdf) provide context and support for users, thereby linking to the entire template system.

##### Architectural Patterns and Design Principles
- Modular Design: Notice that each degree mode (BAhumanities, BAstem, DOC, MA) is isolated in its own subfolder for main body content, enabling clean separation and easy updates.
- Separation of Concerns: The template distinguishes between code listings (codes), graphic assets (figures), textual content (mainbody), and bibliographic data (refs). This separation aids maintainability.
- Reusability: The core document class (dlmuthesis.cls) centralizes all styling rules, ensuring that any change applies uniformly across theses.
- Automation and Integration: The presence of build scripts and configuration files (latexmkrc) points to a focus on reliable, automated document compilation.

##### Relevant Technologies and Tools
- LaTeX and its distribution (2022 edition or above) are fundamental.
- Automation is managed via latexmk (invoked by configuration files and batch/shell scripts).
- Auxiliary tools (possibly a PDF viewer for guidebook_of_dlmuthesis.pdf) and code listings integration features (via packages predefined in the template) are also involved.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Content Layer
    subgraph "Content Layer"
        subgraph "Main Document Files"
            MD1["main_BAhumanities.tex"]
            MD2["main_BAstem.tex"]
            MD3["main_DOC.tex"]
            MD4["main_MA.tex"]
        end
        subgraph "Mainbody Chapters"
            MB1["mainbody/BAhumanities"]
            MB2["mainbody/BAstem"]
            MB3["mainbody/DOC"]
            MB4["mainbody/MA"]
        end
        Figures["Figures and Assets"]
        Codes["Code Samples"]
        Refs["Bibliography Resources"]
        Guidebook["Supporting Documents (guidebook_of_dlmuthesis.pdf)"]
        Misc["Miscellaneous Archives"]
    end

    %% Build/Integration Layer
    subgraph "Build/Integration Layer"
        Core["Template Core (dlmuthesis.cls & dlmuthesis-bachelor.bst)"]
        Build["Build Tools (latexmkrc, dlmuthesis-box scripts)"]
    end

    %% Compiled Thesis Output
    Compiled["Compiled Thesis Document"]

    %% Relationships within Content Layer
    MD1 --> MB1
    MD2 --> MB2
    MD3 --> MB3
    MD4 --> MB4

    MD1 ---|includes| Compiled
    MD2 ---|includes| Compiled
    MD3 ---|includes| Compiled
    MD4 ---|includes| Compiled
    Figures ---|assets| Compiled
    Codes ---|code| Compiled
    Refs ---|references| Compiled

    %% Relationships from Build/Integration Layer to Compiled Thesis
    Core ---|styles| Compiled
    Build ---|builds| Compiled

    %% Styling Classes
    class MD1,MD2,MD3,MD4 mainDoc
    class MB1,MB2,MB3,MB4 mainbody
    class Figures,Codes,Refs,Guidebook,Misc content
    class Core,Build integration
    class Compiled result

    %% Click Events for Thesis Template Core
    click Core "https://github.com/johnsonlo00/dlmuthesis/blob/main/dlmuthesis.cls"
    click Core "https://github.com/johnsonlo00/dlmuthesis/blob/main/dlmuthesis-bachelor.bst"

    %% Click Events for Main Document Files
    click MD1 "https://github.com/johnsonlo00/dlmuthesis/blob/main/main_BAhumanities.tex"
    click MD2 "https://github.com/johnsonlo00/dlmuthesis/blob/main/main_BAstem.tex"
    click MD3 "https://github.com/johnsonlo00/dlmuthesis/blob/main/main_DOC.tex"
    click MD4 "https://github.com/johnsonlo00/dlmuthesis/blob/main/main_MA.tex"

    %% Click Events for Mainbody Chapters
    click MB1 "https://github.com/johnsonlo00/dlmuthesis/tree/main/mainbody/BAhumanities"
    click MB2 "https://github.com/johnsonlo00/dlmuthesis/tree/main/mainbody/BAstem"
    click MB3 "https://github.com/johnsonlo00/dlmuthesis/tree/main/mainbody/DOC"
    click MB4 "https://github.com/johnsonlo00/dlmuthesis/tree/main/mainbody/MA"

    %% Click Events for Figures and Assets
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/BAhumanities"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/BAstem"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/DOC"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/MA"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/logo"
    click Figures "https://github.com/johnsonlo00/dlmuthesis/tree/main/figures/signatures"

    %% Click Events for Code Samples
    click Codes "https://github.com/johnsonlo00/dlmuthesis/tree/main/codes/"
    click Codes "https://github.com/johnsonlo00/dlmuthesis/blob/main/codes/funfactorial.cpp"
    click Codes "https://github.com/johnsonlo00/dlmuthesis/blob/main/codes/funfactorial.java"
    click Codes "https://github.com/johnsonlo00/dlmuthesis/blob/main/codes/funfactorial.m"
    click Codes "https://github.com/johnsonlo00/dlmuthesis/blob/main/codes/funfactorial.py"

    %% Click Event for Supporting Documents & Manuals
    click Guidebook "https://github.com/johnsonlo00/dlmuthesis/blob/main/guidebook_of_dlmuthesis.pdf"

    %% Click Events for Build and Automation Scripts
    click Build "https://github.com/johnsonlo00/dlmuthesis/tree/main/latexmkrc"
    click Build "https://github.com/johnsonlo00/dlmuthesis/blob/main/dlmuthesis-box.bat"
    click Build "https://github.com/johnsonlo00/dlmuthesis/blob/main/dlmuthesis-box.sh"

    %% Click Events for Bibliography Resources
    click Refs "https://github.com/johnsonlo00/dlmuthesis/tree/main/refs/"
    click Refs "https://github.com/johnsonlo00/dlmuthesis/blob/main/refs/ref_BAhumanities.tex"
    click Refs "https://github.com/johnsonlo00/dlmuthesis/blob/main/refs/ref_BAstem.bib"
    click Refs "https://github.com/johnsonlo00/dlmuthesis/blob/main/refs/ref_DOC.bib"
    click Refs "https://github.com/johnsonlo00/dlmuthesis/blob/main/refs/ref_MA.bib"

    %% Click Event for Miscellaneous Archives
    click Misc "https://github.com/johnsonlo00/dlmuthesis/tree/main/misc/"

    %% Class Definitions for Colors
    classDef mainDoc fill:#bbdefb,stroke:#0d47a1,stroke-width:2px;
    classDef mainbody fill:#c5cae9,stroke:#303f9f,stroke-width:2px;
    classDef content fill:#dcedc8,stroke:#558b2f,stroke-width:2px;
    classDef integration fill:#ffccbc,stroke:#d84315,stroke-width:2px;
    classDef result fill:#fff9c4,stroke:#f9a825,stroke-width:2px;
```
