# johanbook/docs architecture

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

- Interactive diagram: https://gitdiagram.com/johanbook/docs
- Repository: https://github.com/johanbook/docs

## Overview

##### Main Components

a. Client-Side Components:
- Web Browser (User Interface)
- Static Site Assets (HTML, CSS, JavaScript)
- Documentation Content (Markdown files)

b. Build/Development Components:
- Docusaurus Framework
- Node.js Runtime
- Markdown Processor
- GitHub Pages (Hosting)

c. CI/CD Components:
- GitHub Actions
- Build Pipeline
- Deployment Process

**[Web Browser] → [CDN/GitHub Pages] → [Static Assets]**

**[Markdown Files] → [Docusaurus] → [Static Site Generator] → [Compiled Assets]**

**[GitHub Repository] → [GitHub Actions] → [Build Process] → [Deploy to GitHub Pages]**

##### Important Details

a. Content Organization:
- Documentation structure (ai, architecture, databases, etc.)
- Markdown processing flow

b. Build Process:
- Node.js v16 LTS runtime
- NPM package management
- Docusaurus configuration

c. Deployment:
- GitHub Actions workflow
- GitHub Pages hosting
- Uptime monitoring integration

##### Notes

Annotations for:
- The Node.js version requirement
- The markdown compilation process
- The GitHub Pages hosting configuration
- The uptime monitoring integration

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        Browser["Web Browser"]:::client
        StaticAssets["Static Assets"]:::client
        click StaticAssets "https://github.com/johanbook/docs/tree/main/assets"
    end

    subgraph "Documentation Source"
        DocContent["Documentation Content"]:::content
        click DocContent "https://github.com/johanbook/docs/tree/main/docs"
        
        Categories["Documentation Categories"]:::content
        AI["AI Docs"]:::content
        click AI "https://github.com/johanbook/docs/tree/main/docs/ai"
        Arch["Architecture Docs"]:::content
        click Arch "https://github.com/johanbook/docs/tree/main/docs/architecture"
        DB["Database Docs"]:::content
        click DB "https://github.com/johanbook/docs/tree/main/docs/databases"
        DevOps["DevOps Docs"]:::content
        click DevOps "https://github.com/johanbook/docs/tree/main/docs/devops"
        Security["Security Docs"]:::content
        click Security "https://github.com/johanbook/docs/tree/main/docs/security"
        Testing["Testing Docs"]:::content
        click Testing "https://github.com/johanbook/docs/tree/main/docs/testing"
        Network["Network Docs"]:::content
        click Network "https://github.com/johanbook/docs/tree/main/docs/network"
        
        Categories --> AI & Arch & DB & DevOps & Security & Testing & Network
    end

    subgraph "Build System"
        DocusaurusConfig["Docusaurus Config"]:::build
        click DocusaurusConfig "https://github.com/johanbook/docs/blob/main/docusaurus.config.js"
        BabelConfig["Babel Config"]:::build
        click BabelConfig "https://github.com/johanbook/docs/blob/main/babel.config.js"
        PackageJSON["Package.json"]:::build
        click PackageJSON "https://github.com/johanbook/docs/blob/main/package.json"
        SidebarConfig["Sidebar Config"]:::build
        click SidebarConfig "https://github.com/johanbook/docs/blob/main/sidebars.js"
        Styles["CSS Styles"]:::build
        click Styles "https://github.com/johanbook/docs/blob/main/assets/css/styles.css"
        BuildScripts["Build Scripts"]:::build
        click BuildScripts "https://github.com/johanbook/docs/tree/main/scripts"
    end

    subgraph "CI/CD Pipeline"
        GitHubActions["GitHub Actions"]:::cicd
        click GitHubActions "https://github.com/johanbook/docs/blob/main/.github/workflows/deploy.yaml"
        PreCommit["Pre-commit Hooks"]:::cicd
        click PreCommit "https://github.com/johanbook/docs/tree/main/.husky/pre-commit"
        BuildProcess["Build Process"]:::cicd
        GitHubPages["GitHub Pages"]:::cicd
    end

    subgraph "Monitoring"
        UptimeRobot["Uptime Robot"]:::monitoring
    end

    Browser --> GitHubPages
    GitHubPages --> StaticAssets
    DocContent --> BuildProcess
    Categories --> BuildProcess
    
    BuildProcess --> StaticAssets
    DocusaurusConfig & BabelConfig & PackageJSON & SidebarConfig & Styles --> BuildProcess
    BuildScripts --> BuildProcess
    
    GitHubActions --> BuildProcess
    PreCommit --> GitHubActions
    BuildProcess --> GitHubPages
    
    GitHubPages --> UptimeRobot

    classDef client fill:#2374ab
    classDef content fill:#57a773
    classDef build fill:#ff8c42
    classDef cicd fill:#f7b32b
    classDef monitoring fill:#808080

    %% Legend
    subgraph Legend
        Client1["Client Components"]:::client
        Content1["Content Components"]:::content
        Build1["Build Components"]:::build
        CICD1["CI/CD Components"]:::cicd
        Monitor1["Monitoring Components"]:::monitoring
    end
```
