# mnadhro/nadirolabi-web-corner architecture

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

- Interactive diagram: https://gitdiagram.com/mnadhro/nadirolabi-web-corner
- Repository: https://github.com/mnadhro/nadirolabi-web-corner

## Overview

##### Project Type and Purpose
- This is a static documentation-style personal website built with MkDocs (a Python-based static site generator).
- Markdown files in `docs/` represent content; custom themes and CSS in `styling_/` define styling.
- It’s deployed via Cloudflare Pages from a GitHub repository.

##### File Structure Overview
- Top-level:
- mkdocs.yml (MkDocs configuration)
- requirements.txt (Python deps including mkdocs and theme plugins)
- docs/ (Markdown content and assets)
- styling_/ (three custom MkDocs themes: bootswatch_theme, cinder, terminal_theme)
- docs/stylesheets and docs/vx_images (content-specific CSS & images)
- No backend code or database—purely static site generator and theming.

##### Main Components
a. Source Code Repository (GitHub)
- Contains Markdown pages, theme packages, config files.
b. Continuous Deployment (Cloudflare Pages)
- Watches the GitHub repo, triggers builds on commit.
c. Build System (MkDocs + Python environment)
- mkdocs.yml defines site structure, theme, plugins (tile_grid, etc.).
- Python runtime installs dependencies via requirements.txt.
- MkDocs assembles HTML/CSS/JS into a static site.
d. Themes & Plugins
- Three theme packages: Bootswatch variants, Cinder, Terminal.
- MkDocs plugin `md_to_html` and `tile_grid` pluglets process content.
e. Static Assets
- CSS, JS, fonts, images output by MkDocs into a deployable folder.
f. CDN & Browser
- Deployed static files served by Cloudflare CDN to end users’ browsers.

##### Component Relationships and Data Flow
- Developer → Push to GitHub (source commit)
- GitHub Webhook → Cloudflare Pages build trigger
- Cloudflare Pages → Clone repo → Install Python deps → Run MkDocs build
- MkDocs → Read `docs/`, apply `styling_/` themes & plugins → Generate static site
- Build Output → Deployed to Cloudflare CDN
- End User Browser ← HTTP GET ← Cloudflare CDN ← Static files

##### Architectural Patterns & Design Principles
- Separation of Concerns: Content (Markdown) vs. Presentation (themes/CSS) vs. Deployment (Cloudflare).
- Plugin-based extension: MkDocs plugins and pluglets for custom macros (tile_grid).
- Infrastructure as code: mkdocs.yml and requirements.txt drive build reproducibility.
- CI/CD Pipeline: Continuous deployment on every push, zero-server static hosting.

##### Detail
- Call out mkdocs.yml, requirements.txt as configuration inputs.
- That there is no dynamic server or database—everything is pre-built.
- Versions or tech stack notes (Python, MkDocs, Cloudflare Pages).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layers and Components

    subgraph "Developer"
        dev["Developer"]
    end

    subgraph "Source Layer" 
        direction TB
        repo["GitHub Repo"]:::source
        mkdocsYML["mkdocs.yml"]:::source
        req["requirements.txt"]:::source
        docsDir["docs/"]:::source
        css["extra.css"]:::source
        images["vx_images/"]:::source
        styling["styling_/"]:::source
    end

    subgraph "Build/CI Layer"
        direction TB
        cfPages["Cloudflare Pages Build"]:::build
        subgraph "MkDocs Build Process"
            direction TB
            pythonEnv["Python Env"]:::build
            process["MkDocs Process"]:::build
            config["mkdocs.yml"]:::build
            deps["requirements.txt"]:::build
        end
        subgraph "Presentation Layer"
            direction TB
            boots["Bootswatch Theme"]:::presentation
            cinder["Cinder Theme"]:::presentation
            terminal["Terminal Theme"]:::presentation
            md2html["md_to_html Plugin"]:::presentation
            tile["tile_grid Pluglet"]:::presentation
        end
    end

    staticSite["Static Site Artifacts"]:::artifact
    cdn["Cloudflare CDN"]:::cdn
    browser["End User Browser"]:::client

    %% Connections
    dev -->|"push"| repo
    repo -->|"trigger build"| cfPages
    cfPages --> process
    process --> config
    process --> deps
    process --> boots
    process --> cinder
    process --> terminal
    process --> md2html
    process --> tile
    docsDir --> cfPages
    css --> cfPages
    images --> cfPages
    styling --> cfPages

    cfPages -->|"generate"| staticSite
    staticSite -->|"deploy"| cdn
    cdn -->|"HTTP GET"| browser

    %% Click Events
    click mkdocsYML "https://github.com/mnadhro/nadirolabi-web-corner/blob/master//mkdocs.yml"
    click req "https://github.com/mnadhro/nadirolabi-web-corner/blob/master//requirements.txt"
    click docsDir "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//docs/"
    click css "https://github.com/mnadhro/nadirolabi-web-corner/blob/master//docs/stylesheets/extra.css"
    click images "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//docs/vx_images/"
    click styling "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//styling_/"
    click boots "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//styling_/bootswatch_theme/"
    click cinder "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//styling_/cinder/"
    click terminal "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//styling_/terminal_theme/"
    click md2html "https://github.com/mnadhro/nadirolabi-web-corner/blob/master//styling_/terminal_theme/plugins/md_to_html/plugin.py"
    click tile "https://github.com/mnadhro/nadirolabi-web-corner/tree/master//styling_/terminal_theme/pluglets/tile_grid/"

    %% Styles
    classDef source fill:#BBDEFB,stroke:#000,stroke-width:1px
    classDef build fill:#C8E6C9,stroke:#000,stroke-width:1px
    classDef presentation fill:#FFE0B2,stroke:#000,stroke-width:1px
    classDef artifact fill:#D7CCC8,stroke:#000,stroke-width:1px
    classDef cdn fill:#B3E5FC,stroke:#000,stroke-width:1px
    classDef client fill:#FFCDD2,stroke:#000,stroke-width:1px
```
