# azat-io/you-dont-know-js-ru architecture

> Architecture diagram of the GitHub repository azat-io/you-dont-know-js-ru, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azat-io/you-dont-know-js-ru
- Repository: https://github.com/azat-io/you-dont-know-js-ru

## Overview

##### Project type and purpose
- This is a documentation/content‐only repository (a static book series “You Don’t Know JS” in Markdown form).
- There is no traditional “backend” or dynamic service here—just Markdown sources, a versioned Git repository, and (implicitly) a publishing pipeline to a static hosting platform.

##### File structure
- Top‐level files:
- .gitignore, LICENSE.txt, README.md, preface.md
- Six major directories, each representing one book in the series:
- “up & going”
- “scope & closures”
- “this & object prototypes”
- “types & grammar”
- “async & performance”
- “es6 & beyond”
- Each book folder contains:
- README.md (book overview & ToC)
- chaptern files (ch1.md, ch2.md, …)
- appendix files (apA.md, apB.md, …)
- foreword.md, toc.md
- No build scripts or configuration files are present, implying that any site generation or publishing is done separately (for example via a CI process or manual Markdown‐to‐HTML conversion).

##### README for additional insights
- Describes the series purpose and links to online reading and purchase pages.
- Mentions free electronic reading (no embedded SSG instructions).
- Points to community contributions (pull requests for typo fixes/code improvements).

##### Components
a. Content sources
- Git repository (Markdown files for each book and chapter)
- Static Site Generator or Markdown processor (e.g., Jekyll, Hugo, Docsify, MkDocs)
- CI/CD platform (e.g., GitHub Actions, Travis CI)
c. Hosting & delivery
- GitHub Pages, Netlify, or a CDN (for static HTML/CSS/JS assets)
d. End users
- Web browsers requesting the static site
e. External services (optional)
- Patreon badge images, O’Reilly/Safari links, book purchase URLs

##### Relationships and interactions
- Developer pushes Markdown changes → Git repo
- CI/CD hook triggers → Markdown-to-HTML build
- Generated static assets → deployed to hosting platform or CDN
- End user’s browser → fetches HTML/CSS/JS from CDN/hosting
- Any external image or badge URLs → loaded on page

##### Architectural patterns and design principles
- Static site architecture (build‐once, serve‐everywhere)
- Content‐as‐source‐controlled data (all docs versioned in Git)
- Decoupled pipeline (source → build → production hosting)
- Progressive enhancement in the browser (plain HTML first, optional client JS)

##### Technologies, frameworks, and libraries (examples)
- Version control: Git/GitHub
- Static site generator: Jekyll, Hugo, Docsify, MkDocs, etc.
- CI/CD: GitHub Actions, Travis CI, CircleCI
- Hosting/CDN: GitHub Pages, Netlify, AWS S3 + CloudFront
- Client: modern browsers (HTML5, CSS3)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Content Layer
    subgraph "Content Layer"
        direction TB
        Repo["Markdown Content Repository"]:::content
        Preface["Preface"]:::content
        subgraph "Books"
            direction TB
            UpGoing["Up & Going"]:::content
            ScopeClos["Scope & Closures"]:::content
            ThisObj["This & Object Prototypes"]:::content
            TypesGram["Types & Grammar"]:::content
            AsyncPerf["Async & Performance"]:::content
            ES6Beyond["ES6 & Beyond"]:::content
        end
    end

    %% Build Pipeline
    subgraph "Build Pipeline"
        direction TB
        CI["CI/CD (GitHub Actions)"]:::build
        SSG["Static Site Generator"]:::build
    end

    %% Hosting Layer
    subgraph "Hosting Layer"
        direction TB
        Hosting["Hosting/CDN"]:::hosting
    end

    %% End User
    Browser["End User Browser"]:::user

    %% External Services
    External["External Services\n(Patreon badges, Purchase URLs)"]:::external

    %% Connections
    Repo -->|"push changes"| CI
    CI -->|"build site"| SSG
    SSG -->|"deploy static assets"| Hosting
    Browser -->|"request site"| Hosting
    Hosting -->|"serve content"| Browser
    Browser -->|"fetch badges & links"| External

    %% Click Events
    click Repo "https://github.com/azat-io/you-dont-know-js-ru/tree/master//"
    click Preface "https://github.com/azat-io/you-dont-know-js-ru/blob/master//preface.md"
    click UpGoing "https://github.com/azat-io/you-dont-know-js-ru/tree/master//up & going"
    click ScopeClos "https://github.com/azat-io/you-dont-know-js-ru/tree/master//scope & closures"
    click ThisObj "https://github.com/azat-io/you-dont-know-js-ru/tree/master//this & object prototypes"
    click TypesGram "https://github.com/azat-io/you-dont-know-js-ru/tree/master//types & grammar"
    click AsyncPerf "https://github.com/azat-io/you-dont-know-js-ru/tree/master//async & performance"
    click ES6Beyond "https://github.com/azat-io/you-dont-know-js-ru/tree/master//es6 & beyond"

    %% Styles
    classDef content fill:#D0E6FF,stroke:#0052CC,color:#000;
    classDef build fill:#FFE0B2,stroke:#FF8C00,color:#000;
    classDef hosting fill:#D0F0C0,stroke:#228B22,color:#000;
    classDef user fill:#FFF5BA,stroke:#FFD700,color:#000;
    classDef external fill:#F0F0F0,stroke:#A9A9A9,color:#000
```
