# eminbzdgn/webrehber architecture

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

- Interactive diagram: https://gitdiagram.com/eminbzdgn/webrehber
- Repository: https://github.com/eminbzdgn/webrehber

## Overview

##### Project type and purpose
- From the README (`# WebRehber`) and file layout, this is a Python-based static site generator / content‐update tool.
- Purpose: install dependencies, load configuration, update data sources, compile/generate HTML pages, and produce the final “sayfalar” output folder.

##### Main components
a. Dependency management
- libInstall.py
b. Configuration loader
- conf.py
c. Data update module
- dataupdate.py
d. Build/compile module
- derle.py
e. Core orchestrator
- main.py
f. Utility functions
- utils.py
g. Output folder (static pages)
- sayfalar/ (contains rehber.html and image/)
h. Runtime environment
- Python interpreter, any third-party libs installed

##### Relationships & flow
1. User invokes `main.py`.
2. `main.py` calls `libInstall.py` to ensure dependencies are installed.
3. `main.py` loads project settings via `conf.py`.
4. `main.py` triggers `dataupdate.py` to fetch or refresh source data.
5. `main.py` calls `derle.py` to compile/generate HTML files, using helpers in `utils.py`.
6. Generated files land in `sayfalar/`.
7. Static assets (images) are copied into `sayfalar/image/`.

##### Architectural patterns & design principles
- Modular CLI workflow: each phase (install, config, update, build) is encapsulated in its own module.
- Single responsibility: modules do one job and expose clean interfaces (via function calls in main.py).
- File-based pipeline: no database; data flows from source files into HTML outputs.

##### Technology callouts
- Python 3.x (interpreter)
- Standard library (os, shutil, etc.)
- Any external libs installed by libInstall.py
- HTML/CSS static output in sayfalar/

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Python Runtime" 
        direction TB
        MAIN["main.py"] 
        LIB["libInstall.py"] 
        CONF["conf.py"] 
        DATA["dataupdate.py"] 
        BUILD["derle.py"] 
        UTIL["utils.py"] 
    end

    subgraph "sayfalar/" 
        direction TB
        REHBER["rehber.html"] 
        IMG["image/"] 
    end

    MAIN -->|"install dependencies"| LIB
    MAIN -->|"load config"| CONF
    CONF -->|"update data"| DATA
    DATA -->|"compile/generate HTML"| BUILD
    BUILD -->|"write output"| REHBER
    BUILD -->|"copy assets"| IMG
    BUILD <-->|"use helpers"| UTIL

    class MAIN,LIB,CONF,DATA,BUILD,UTIL config
    class CONF,RUNTIME runtime
    class DATA,BUILD process
    class UTIL util
    class sayfalar,REHBER,IMG output

    click MAIN "https://github.com/eminbzdgn/webrehber/blob/main/main.py"
    click LIB "https://github.com/eminbzdgn/webrehber/blob/main/libInstall.py"
    click CONF "https://github.com/eminbzdgn/webrehber/blob/main/conf.py"
    click DATA "https://github.com/eminbzdgn/webrehber/blob/main/dataupdate.py"
    click BUILD "https://github.com/eminbzdgn/webrehber/blob/main/derle.py"
    click UTIL "https://github.com/eminbzdgn/webrehber/blob/main/utils.py"
    click sayfalar "https://github.com/eminbzdgn/webrehber/tree/main/sayfalar/"
    click REHBER "https://github.com/eminbzdgn/webrehber/blob/main/sayfalar/rehber.html"
    click IMG "https://github.com/eminbzdgn/webrehber/tree/main/sayfalar/image/"

    classDef config fill:#ccf,stroke:#333,stroke-width:1px
    classDef process fill:#cfc,stroke:#333,stroke-width:1px
    classDef util fill:#fc9,stroke:#333,stroke-width:1px
    classDef output fill:#ddd,stroke:#333,stroke-width:1px
    classDef runtime fill:#eef,stroke:#333,stroke-width:1px
```
