# pllk/cphb architecture

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

- Interactive diagram: https://gitdiagram.com/pllk/cphb
- Repository: https://github.com/pllk/cphb

## Overview

##### Project type and purpose
- This is not a multi-tier web app or microservice suite but a LaTeX-based book project.
- Purpose: authoring and typesetting “Competitive Programmer’s Handbook” into a single PDF (book.pdf) by combining ~30 chapter source files, a preface, a list, and the main book.tex.

##### File structure
- Top-level files:
- book.tex       ← master document
- book.pdf       ← generated output
- chapter01.tex … chapter30.tex  ← one .tex per chapter
- preface.tex, list.tex
- README.md
- No subdirectories or code modules—every source file lives at the root.
- No build scripts provided, but implicit build steps: TeX engine(s), possibly latexmk or a Makefile that runs pdflatex/xelatex repeatedly.
- No external assets (images, bibliography) beyond these .tex files.

##### README for additional insights
- Confirms this is a book on competitive programming, licensed CC BY-NC-SA.
- No mention of custom tooling beyond standard LaTeX.

## Diagram (Mermaid)

```mermaid
flowchart TD
    CI[("CI Service")]:::external
    subgraph "Content Layer"
        MD["Master Document (book.tex)"]:::content
        CH["Chapter Modules (chapter01–chapter30.tex)"]:::content
        AN1["Preface (preface.tex)"]:::content
        AN2["List (list.tex)"]:::content
        RD["Project Documentation (README.md)"]:::doc
    end

    subgraph "Build Layer"
        ORC["Build Orchestrator (latexmk/Makefile)"]:::build
        DIST["TeX Distribution (TeX Live/MiKTeX)"]:::build
        ENG["LaTeX Engine (pdfLaTeX/XeLaTeX)"]:::build
    end

    subgraph "Artifact Layer"
        PDF["Output (book.pdf)"]:::artifact
    end

    CI -->|triggers build| ORC
    CH -->|included by| MD
    AN1 -->|included by| MD
    AN2 -->|included by| MD
    MD -->|builds via| ORC
    ORC -->|invokes| DIST
    ORC -->|invokes| ENG
    DIST -->|provides binaries to| ENG
    ENG -->|produces| PDF

    click MD "https://github.com/pllk/cphb/blob/master/book.tex"
    click CH "https://github.com/pllk/cphb/blob/master/chapter01.tex"
    click AN1 "https://github.com/pllk/cphb/blob/master/preface.tex"
    click AN2 "https://github.com/pllk/cphb/blob/master/list.tex"
    click PDF "https://github.com/pllk/cphb/blob/master/book.pdf"
    click RD "https://github.com/pllk/cphb/blob/master/README.md"

    classDef content fill:#D6E9F8,stroke:#2B7BB9,stroke-width:2px
    classDef build fill:#DFF2BF,stroke:#4F8A10,stroke-width:2px
    classDef artifact fill:#FEEFB3,stroke:#9F6000,stroke-width:2px
    classDef doc fill:#F2DEDE,stroke:#A94442,stroke-width:2px
    classDef external fill:#ECECEC,stroke:#888,stroke-width:2px,stroke-dasharray:5 5
```
