# chiphuyen/aie-book architecture

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

- Interactive diagram: https://gitdiagram.com/chiphuyen/aie-book
- Repository: https://github.com/chiphuyen/aie-book

## Overview

##### Project type and purpose
- This is not a traditional software application but a documentation project (a technical book and associated resources).
- The repo contains the source markdown files for chapters, tables of contents, summaries, case studies, prompts, resources, misalignment notes, an appendix, and assets (cover images). It also includes a Jupyter notebook under `scripts/` as a “fun tool” for generating heatmaps of model conversations. The `ToC.pdf` suggests a build‐to‐PDF step.

##### File structure
- Top-level markdown files: the book’s chapters and auxiliary documents (ToC, summaries, resources, case studies, etc.).
- `assets/`: cover art and any figures used in the markdown.
- `scripts/ai-heatmap.ipynb`: an independent notebook for generating conversation heatmaps.
- No explicit build or CI configuration files are present, implying a simple build process (e.g., Pandoc, `make`, or O’Reilly’s internal toolchain) invoked manually or via a minimal CI script.

##### README for additional insights
- The README positions this repo as a living set of book artifacts and resources, to be updated over time.
- Mentions distribution channels (Amazon, O’Reilly, Kindle), but no direct code for website hosting—likely published externally or via GitHub Pages once built.

##### Elements
- Clear labels for each component (e.g., “GitHub Repo,” “Build Server,” “Artifact Store,” “Amazon/O’Reilly”)
- Rectangles for compute components (Build System, Notebook Executor)
- Clouds for external services (Amazon, O’Reilly, GitHub Pages)

##### Detailed capture of essential elements
- Even though this is “just” markdown, separate source content, media assets, build logic, and distribution.
- How the Jupyter notebook sits alongside content but feeds into the build only when generating special outputs.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Contributors["Contributors"]:::external

    subgraph "GitHub Repository"
        Repo["Git Repo"]:::storage
        subgraph "Source Content"
            ToCmd["ToC.md"]:::storage
            Appendix["appendix.md"]:::storage
            CaseStudies["case-studies.md"]:::storage
            Summaries["chapter-summaries.md"]:::storage
            Misalignment["misalignment.md"]:::storage
            Prompts["prompt-examples.md"]:::storage
            Resources["resources.md"]:::storage
            StudyNotes["study-notes.md"]:::storage
            README["README.md"]:::storage
        end
        Assets["assets/"]:::storage
        Script["scripts/ai-heatmap.ipynb"]:::compute
    end

    BuildSystem["Build System (Pandoc/Make)"]:::compute
    NotebookExec["Notebook Executor (Jupyter)"]:::compute

    subgraph "Artifact Store"
        ToCPdf["ToC.pdf"]:::storage
    end

    subgraph "Distribution Channels"
        GHPages["GitHub Pages"]:::external
        Amazon["Amazon/O’Reilly/Kindle"]:::external
    end

    Contributors -->|push source| Repo
    Repo -->|"push/tag triggers build"| BuildSystem
    BuildSystem -->|"generate PDF/HTML"| ToCPdf
    BuildSystem -->|"executes notebook"| NotebookExec
    NotebookExec -->|"produce heatmap assets"| ToCPdf
    ToCPdf --> GHPages
    ToCPdf --> Amazon

    click Repo "https://github.com/chiphuyen/aie-book/tree/main//"
    click Assets "https://github.com/chiphuyen/aie-book/tree/main//assets/"
    click Script "https://github.com/chiphuyen/aie-book/blob/main//scripts/ai-heatmap.ipynb"
    click ToCPdf "https://github.com/chiphuyen/aie-book/blob/main//ToC.pdf"
    click ToCmd "https://github.com/chiphuyen/aie-book/blob/main//ToC.md"
    click Appendix "https://github.com/chiphuyen/aie-book/blob/main//appendix.md"
    click CaseStudies "https://github.com/chiphuyen/aie-book/blob/main//case-studies.md"
    click Summaries "https://github.com/chiphuyen/aie-book/blob/main//chapter-summaries.md"
    click Misalignment "https://github.com/chiphuyen/aie-book/blob/main//misalignment.md"
    click Prompts "https://github.com/chiphuyen/aie-book/blob/main//prompt-examples.md"
    click Resources "https://github.com/chiphuyen/aie-book/blob/main//resources.md"
    click StudyNotes "https://github.com/chiphuyen/aie-book/blob/main//study-notes.md"
    click README "https://github.com/chiphuyen/aie-book/blob/main//README.md"

    classDef storage fill:#f9f,stroke:#333,stroke-width:1px
    classDef compute fill:#ccf,stroke:#333,stroke-width:1px
    classDef external fill:#cfc,stroke:#333,stroke-width:1px
```
