# sluwh/fourtimizer architecture

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

- Interactive diagram: https://gitdiagram.com/sluwh/fourtimizer
- Repository: https://github.com/sluwh/fourtimizer

## Overview

##### Project Type and Purpose
- Fourtimizer is an open-source Windows optimization tool comprised of standalone scripts and `.reg` files.
- It automates registry tweaks and system configurations to boost performance, with built-in reversibility.

##### File Structure Analysis
- Top-level modules, each in its own folder:
- “Punto de restauración” – batch to create a system restore point
- “Plan de energía” – power plan tweaks (BAT, POW, TXT)
- “Procesador” – CPU registry tweaks
- “Gráfica” – GPU registry tweaks
- “Internet” – network/latency tweaks
- “Sistema” – general system tweaks
- “Mouse” – pointer response tweaks
- “Configs de windows” – grouped miscellaneous `.reg`
- “Limpieza” – cleanup CMD script for temp files
- Each folder contains:
- A `.reg` or `.cmd` file to apply changes
- A “Quitar esto.reg” (or undo script) for reversal
- A “Qué hace esto.txt” explaining the change
- README.md describes overall purpose and usage.

##### Key Architectural Patterns and Components
a. CLI Orchestrator
- The main entry-point is a user running individual scripts or chaining them in order.
b. Module Scripts
- Each folder is a self-contained module: apply/undo registry changes or run cleanup.
c. Windows Registry Interface
- Every tweak module interacts with the Windows Registry via `regedit /s` or `reg add` commands.
d. System Restore Interface
- “Punto de restauración” invokes `PowerShell` or `WMI` to create a restore point.
e. Documentation
- Plain-text explanations in each module for transparency and safety.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CLI Orchestrator
    User["User / CLI Orchestrator"]:::cli

    %% Modules Layer
    subgraph "Modules" 
        direction TB
        RP["RestorePoint Module (.ps1/.cmd)"]:::module
        PP["PowerPlan Module (.bat/.pow)"]:::module
        CPU["CPU Module (.reg)"]:::module
        GPU["GPU Module (.reg)"]:::module
        NET["Internet Module (.reg)"]:::module
        SYS["System Module (.reg)"]:::module
        MOU["Mouse Module (.txt)"]:::module
        WINC["WindowsConfigs Module (.reg)"]:::module
        CLN["Cleanup Module (.cmd)"]:::module
    end

    %% Services Layer
    REG["Windows Registry Service"]:::registry
    SR["System Restore Service"]:::restore
    FS["File System (Temp Folders)"]:::filesystem

    %% Relationships
    User --> RP
    User --> PP
    User --> CPU
    User --> GPU
    User --> NET
    User --> SYS
    User --> MOU
    User --> WINC
    User --> CLN

    RP --> SR
    PP --> REG
    CPU --> REG
    GPU --> REG
    NET --> REG
    SYS --> REG
    MOU --> REG
    WINC --> REG
    CLN --> FS

    %% Click Events
    click User "https://github.com/sluwh/fourtimizer/blob/main/README.md"
    click RP "https://github.com/sluwh/fourtimizer/tree/main/Punto de restauración/"
    click PP "https://github.com/sluwh/fourtimizer/blob/main/Plan de energía/Abrir como admin para que funcione.bat"
    click CPU "https://github.com/sluwh/fourtimizer/blob/main/Procesador/CPU.reg"
    click GPU "https://github.com/sluwh/fourtimizer/blob/main/Gráfica/GPU.reg"
    click NET "https://github.com/sluwh/fourtimizer/blob/main/Internet/Internet.reg"
    click SYS "https://github.com/sluwh/fourtimizer/blob/main/Sistema/Sistema.reg"
    click MOU "https://github.com/sluwh/fourtimizer/blob/main/Mouse/Desactiva Mejorar Precisión de puntero.txt"
    click WINC "https://github.com/sluwh/fourtimizer/blob/main/Configs de windows/Configs.reg"
    click CLN "https://github.com/sluwh/fourtimizer/blob/main/Limpieza/Borrar archivos temporales.cmd"

    %% Styles
    classDef cli fill:#DDEEFF,stroke:#3399FF,color:#000;
    classDef module fill:#E8F0FE,stroke:#3366CC,color:#000;
    classDef registry fill:#E6FFE6,stroke:#33CC33,color:#000;
    classDef restore fill:#FFF7CC,stroke:#FFCC00,color:#000;
    classDef filesystem fill:#F2F2F2,stroke:#999999,color:#000;
```
