# yld/dotfiles architecture

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

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

## Overview

##### Main Components

a. Core Configuration Management
- Main script components (bin/dotfiles_init and bin/dotfiles_submodule)
- Configuration storage (represented by the root directory structure)

b. Shell Environment Configuration
- Zsh configuration (.zshrc, .zshenv)
- Shell functions and aliases (.sh directory)
- Completion system (.zsh/completion.d)
- Plugin management (Zplug integration)

c. Development Tools Configuration
- Version Managers (nodenv, rbenv, pyenv)
- Vim Configuration (.vim, .vimrc)
- Git Configuration (.gitconfig)
- Ruby Configuration (.irbrc, .rspec)

d. Window Manager Configuration
- Although marked for removal, include "Awesome WM" configuration
- Relationship with .config/awesome directory

##### Relationship Flows

- Installation flow (curl → dotfiles_init → configuration deployment)
- Plugin management flows (Zplug → Zsh plugins, Vundle → Vim plugins)
- Configuration inheritance paths

##### Important Elements to Highlight

a. Configuration Sources:
- Hierarchical structure of configuration files
- Main entry points (.zshrc, .vimrc, etc.)

b. Tool Integration:
- External tool dependencies (urxvt, tmux, etc.)
- Plugin management systems

Create clear sections for:
- Installation & Setup
- Runtime Configuration
- Tool Integration
- Plugin Management

##### Additional Details

- File types (configuration, executable scripts, directories)
- Dependency relationships
- Plugin integration points
- Platform-specific components (Debian/Gentoo)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Installation
        CURL["curl"]
        INIT["Dotfiles Init"]:::script
        SUB["Dotfiles Submodule"]:::script
    end

    subgraph "Core Configuration"
        DOT["Dotfiles Manager"]:::core
        SHELL_UTIL["Shell Utilities"]:::core
    end

    subgraph "Shell Environment"
        ZSHRC["Zsh Config"]:::shell
        ZSHE["Zsh Environment"]:::shell
        FUNC["Shell Functions"]:::shell
        ALIAS["Shell Aliases"]:::shell
        COMP["Completion System"]:::shell
        ZPLUG["Zplug Packages"]:::shell
        
        subgraph "Platform Specific"
            DEB["Debian Aliases"]:::platform
            GEN["Gentoo Aliases"]:::platform
        end
    end

    subgraph "Development Tools"
        VIM["Vim/NeoVim Config"]:::dev
        GIT["Git Config"]:::dev
        RUBY["Ruby Config"]:::dev
        NODE["Node Config"]:::dev
        DB["Database Config"]:::dev
        TMUX["Terminal Config"]:::dev
    end

    subgraph "Window Manager"
        AWE["Awesome WM Config"]:::wm
        THEME["Awesome Themes"]:::wm
        WIDGET["Awesome Widgets"]:::wm
        HELP["Awesome Helpers"]:::wm
    end

    subgraph "Dev Environment"
        VER["Version Management"]:::env
        UTILS["Dev Utilities"]:::env
        PLAT["Platform Tools"]:::env
    end

    subgraph "Shell Integration"
        ITERM["iTerm2 Integration"]:::integration
        KEY["Keychain Integration"]:::integration
        EXP["Exports Config"]:::integration
    end

    %% Relationships
    CURL --> INIT
    INIT --> SUB
    INIT --> DOT
    DOT --> SHELL_UTIL

    DOT --> ZSHRC
    DOT --> ZSHE
    ZSHRC --> FUNC
    ZSHRC --> ALIAS
    ZSHRC --> COMP
    ZSHRC --> ZPLUG
    ALIAS --> DEB
    ALIAS --> GEN

    DOT --> VIM
    DOT --> GIT
    DOT --> RUBY
    DOT --> NODE
    DOT --> DB
    DOT --> TMUX

    DOT --> AWE
    AWE --> THEME
    AWE --> WIDGET
    AWE --> HELP

    DOT --> VER
    DOT --> UTILS
    DOT --> PLAT

    ZSHRC --> ITERM
    ZSHRC --> KEY
    ZSHRC --> EXP

    %% Click Events
    click INIT "https://github.com/yld/dotfiles/tree/master/bin/dotfiles_init"
    click SUB "https://github.com/yld/dotfiles/tree/master/bin/dotfiles_submodule"
    click SHELL_UTIL "https://github.com/yld/dotfiles/tree/master/.sh/dotfiles"
    click ZSHRC "https://github.com/yld/dotfiles/blob/master/.zshrc"
    click ZSHE "https://github.com/yld/dotfiles/blob/master/.zshenv"
    click FUNC "https://github.com/yld/dotfiles/blob/master/.sh/functions.zsh"
    click ALIAS "https://github.com/yld/dotfiles/tree/master/.sh/aliases"
    click COMP "https://github.com/yld/dotfiles/tree/master/.zsh/completion.d/"
    click ZPLUG "https://github.com/yld/dotfiles/blob/master/.zsh/zplug_packages.zsh"
    click DEB "https://github.com/yld/dotfiles/blob/master/.sh/aliases.debian"
    click GEN "https://github.com/yld/dotfiles/blob/master/.sh/aliases.gentoo"
    click VIM "https://github.com/yld/dotfiles/blob/master/.vimrc"
    click GIT "https://github.com/yld/dotfiles/blob/master/.gitconfig"
    click RUBY "https://github.com/yld/dotfiles/blob/master/.irbrc"
    click NODE "https://github.com/yld/dotfiles/blob/master/.default-npm-packages"
    click DB "https://github.com/yld/dotfiles/blob/master/.psqlrc"
    click TMUX "https://github.com/yld/dotfiles/blob/master/.tmux.conf"
    click AWE "https://github.com/yld/dotfiles/blob/master/.config/awesome/rc.lua"
    click THEME "https://github.com/yld/dotfiles/tree/master/.config/awesome/themes/catio/"
    click WIDGET "https://github.com/yld/dotfiles/blob/master/.config/awesome/rc/widgets.lua"
    click HELP "https://github.com/yld/dotfiles/blob/master/.config/awesome/helpers.lua"
    click VER "https://github.com/yld/dotfiles/blob/master/.tool-versions"
    click ITERM "https://github.com/yld/dotfiles/blob/master/.sh/iterm2_shell_integration.zsh"
    click KEY "https://github.com/yld/dotfiles/blob/master/.sh/keychain.sh"
    click EXP "https://github.com/yld/dotfiles/tree/master/.sh/exports"

    %% Styling
    classDef core fill:#2374ab
    classDef shell fill:#57a773
    classDef dev fill:#ff8c42
    classDef wm fill:#848484
    classDef env fill:#7768ae
    classDef integration fill:#4a90e2
    classDef platform fill:#d64933
    classDef script fill:#2d5d7b
```
