# ved0el/dotfiles architecture

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

- Interactive diagram: https://gitdiagram.com/ved0el/dotfiles
- Repository: https://github.com/ved0el/dotfiles

## Overview

##### Main Components
- Installer & Setup:
- bin/install.sh – The main entry-point script to install or update your dotfiles.
- The provided curl command in the README indicates that the script drives the installation process.
- Shell Configuration:
- zshrc and zshrc.d – Core shell configuration files that include the main zshrc and various segmented configuration scripts. This repository modularizes global settings, variables, aliases, keybinds, and external plugin configurations.
- Plugin Configuration:
- config/sheldon – Repository for the Sheldon plugin manager configuration.
- zshrc.d/pluginrc – Contains configurations for plugins like sheldon and tmux.
- Scripts for Tool Installations:
- zshrc.d/scripts – Dedicated folder for installation scripts of various tools (bat, eza, fd, fzf, nvm, rg, sheldon).
- Additional Environment Customizations:
- tmux.conf – Configuration file for tmux integration.
- p10k.zsh – Likely a configuration file for the Powerlevel10k theme used to enhance the terminal look.
- Miscellaneous Data & Custom Files:
- data/ – Placeholder or configuration data that may be used during installation or by the system.

##### Relationships and Interactions
- The installer (bin/install.sh) acts as the orchestrator, pulling configurations from the various subdirectories (e.g., zshrc, zshrc.d, config/sheldon) and deploying them into the appropriate locations in the user’s environment.
- The zshrc file sources the zshrc.d directory files. Within zshrc.d, there are segmented files for general global settings, lazy/nonlazy configurations, plugin configurations, and scripts. This folder structure implies a modular approach where components are loaded in a defined sequence.
- The plugin configurations in zshrc.d/pluginrc ensure that external tools like Sheldon (a plugin manager) and tmux are configured correctly. In addition, sheldon’s own configuration is maintained separately under config/sheldon.
- The scripts under zshrc.d/scripts automate installation tasks for supplemental command-line tools, ensuring the environment remains current and consistent.

##### Architectural Patterns and Design Principles
- Modularity: The repository is broken into specific directories (like zshrc.d and config/sheldon) that each serve distinct configuration roles.
- Separation of Concerns: Different aspects of the environment (shell behavior, plugins, external tools) are isolated in their own files and directories.
- Automated Setup: The install.sh script and related installation scripts promote an automated, repeatable setup process.
- Maintainability and Extensibility: The structured layout with clear separations (e.g., global vs. plugin configurations) enables easy updates and scaling as more components or tools are added.

##### Technologies, Frameworks,or Tools
- zsh is the shell chiefly configured by these dotfiles.
- Sheldon appears to be used as a plugin or package manager for shell plugins.
- tmux is configured for terminal multiplexing.
- Additional utilities (like bat, eza, fd, fzf, nvm, rg) are installed via the provided scripts.
- The p10k.zsh file suggests the use of the Powerlevel10k theme, enhancing terminal aesthetics and usability.

##### Final Checklist
- Confirm that all key components (installer, shell configuration, plugins, and scripts) are represented.
- Simplicity and ease of updating these configurations, in line with the project’s “make your life simple” motto.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Setup/Installer Layer"
        I["Installer Script"]:::installer
    end

    subgraph "Core Configuration Layer"
        SC1["Shell Core Configuration: zshrc"]:::shell
        SC2["Shell Directory: zshrc.d"]:::shell
    end

    subgraph "Plugin Manager Configuration Layer"
        PM1["Plugin Manager: config/sheldon"]:::plugin
        PM2["Plugin Config: zshrc.d/pluginrc"]:::plugin
    end

    subgraph "Tool Installation Scripts Layer"
        TI["Tool Install Scripts: zshrc.d/scripts"]:::tool
        TIS1["install_bat.zsh"]:::tool
        TIS2["install_eza.zsh"]:::tool
        TIS3["install_fd.zsh"]:::tool
        TIS4["install_fzf.zsh"]:::tool
        TIS5["install_nvm.zsh"]:::tool
        TIS6["install_rg.zsh"]:::tool
        TIS7["install_sheldon.zsh"]:::tool
    end

    subgraph "User Environment Layer"
        U1["tmux.conf"]:::env
        U2["p10k.zsh"]:::env
    end

    M["Misc Data: data/"]:::misc

    %% Connections
    I -->|"triggers"| SC1
    I -->|"initiates"| PM1
    I -->|"initiates"| PM2
    I -->|"runs"| TI
    I -->|"uses"| M

    SC1 -->|"sources"| SC2

    PM1 -->|"feeds"| PM2

    SC1 -->|"configures"| U2
    PM2 -->|"integrates"| U1
    PM2 -->|"integrates"| U2

    TI -->|"executes"| TIS1
    TIS1 -->|"sequence"| TIS2
    TIS2 -->|"sequence"| TIS3
    TIS3 -->|"sequence"| TIS4
    TIS4 -->|"sequence"| TIS5
    TIS5 -->|"sequence"| TIS6
    TIS6 -->|"sequence"| TIS7
    TIS7 -->|"completes"| U2

    %% Click Events
    click I "https://github.com/ved0el/dotfiles/blob/main/bin/install.sh"
    click SC1 "https://github.com/ved0el/dotfiles/tree/main/zshrc"
    click SC2 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d"
    click PM1 "https://github.com/ved0el/dotfiles/tree/main/config/sheldon"
    click PM2 "https://github.com/ved0el/dotfiles/tree/main/zshrc.d/pluginrc"
    click TI "https://github.com/ved0el/dotfiles/tree/main/zshrc.d/scripts"
    click TIS1 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_bat.zsh"
    click TIS2 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_eza.zsh"
    click TIS3 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_fd.zsh"
    click TIS4 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_fzf.zsh"
    click TIS5 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_nvm.zsh"
    click TIS6 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_rg.zsh"
    click TIS7 "https://github.com/ved0el/dotfiles/blob/main/zshrc.d/scripts/install_sheldon.zsh"
    click U1 "https://github.com/ved0el/dotfiles/blob/main/tmux.conf"
    click U2 "https://github.com/ved0el/dotfiles/blob/main/p10k.zsh"
    click M "https://github.com/ved0el/dotfiles/tree/main/data/"

    %% Styles
    classDef installer fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef shell fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef plugin fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef tool fill:#FFFF99,stroke:#000,stroke-width:2px;
    classDef env fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef misc fill:#FFDAB9,stroke:#000,stroke-width:2px;
```
