# gianlucatruda/dotfiles architecture

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

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

## Overview

##### Main Components

a) Core Configuration Layer
- Bash Environment (.bash_profile, .bashrc)
- Configuration Files (.config directory)
- System Scripts (scripts directory)

b) Tool-specific Configurations
- Terminal Emulator (Alacritty)
- Shell Enhancement (Tmux)
- Text Editors (NeoVim, Vim)
- Package Management (Homebrew)
- System Automation (Hammerspoon, Karabiner)

c) Installation & Bootstrap Components
- Bootstrap Script
- Brew Installation
- macOS Configuration

**┌─────────────────────────────────────────────────────┐**
- User Interface                      │
- (Alacritty + Tmux + NeoVim/Vim + Karabiner)       │
- ┤
- Shell Environment                       │
- (Bash + Aliases + Functions + Exports)          │
- ┤
- Configuration Management                   │
- (Bootstrap + Homebrew + macOS Settings)          │
- ┤
- Utility Scripts                        │
- (Custom GT Scripts + Hammerspoon)            │
- ┘

##### Key Relationships to Highlight

a) Bootstrap Flow:
- How bootstrap.sh initiates the setup
- Configuration file symlinks
- Homebrew package installation flow

b) Tool Integration:
- How Tmux integrates with Alacritty
- NeoVim's plugin architecture
- Karabiner's key mapping system

##### Important Details

- Configuration File Locations:
- .config directory structure
- Configuration files
- Symlink relationships

- Tool Dependencies:
- Homebrew package relationships
- Plugin dependencies (especially for NeoVim)
- System integration points

##### Specific Implementation Notes

- Rectangles: Core configuration files
- Hexagons: Applications/Tools
- Rounded rectangles: Scripts
- Diamonds: Decision points in bootstrap process

Annotations for:
- Git configuration
- Shell customization
- NeoVim plugin structure
- Script functionality

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph UI["User Interface Layer"]
        direction TB
        Alacritty["Alacritty Terminal"]:::ui
        Tmux["Tmux Session Manager"]:::ui
        NeoVim["NeoVim Editor"]:::ui
        Vim["Vim Editor"]:::ui
        Karabiner["Karabiner Key Mapper"]:::ui
    end

    subgraph Shell["Shell Environment Layer"]
        direction TB
        BashProfile[".bash_profile"]:::shell
        BashRC[".bashrc"]:::shell
        Aliases["Aliases"]:::shell
        Functions["Functions"]:::shell
        Exports["Exports"]:::shell
        BashPrompt["Bash Prompt"]:::shell
        Path["Path Config"]:::shell
    end

    subgraph Config["Configuration Management Layer"]
        direction TB
        Bootstrap["Bootstrap Script"]:::config
        Brew["Homebrew Manager"]:::config
        MacOS["macOS Settings"]:::config
        Git["Git Config"]:::config
        GitIgnore["Global Gitignore"]:::config
        BrewFile["Brewfile"]:::config
    end

    subgraph Utils["Utility Scripts Layer"]
        direction TB
        Hammerspoon["Hammerspoon"]:::util
        BTooth["Bluetooth Manager"]:::util
        Cheat["Cheat Sheet"]:::util
        Scan["Network Scanner"]:::util
        ObsidianSync["Obsidian Sync"]:::util
        HDDSync["HDD Sync"]:::util
        TTS["Text-to-Speech"]:::util
        STT["Speech-to-Text"]:::util
    end

    Bootstrap --> Shell
    Bootstrap --> UI
    Bootstrap --> Utils
    Brew --> UI
    Shell --> UI

    %% Click Events
    click Alacritty "https://github.com/gianlucatruda/dotfiles/blob/master/.config/alacritty.toml"
    click Tmux "https://github.com/gianlucatruda/dotfiles/blob/master/.config/tmux/tmux.conf"
    click NeoVim "https://github.com/gianlucatruda/dotfiles/blob/master/.config/nvim/init.lua"
    click Vim "https://github.com/gianlucatruda/dotfiles/blob/master/.vimrc"
    click Karabiner "https://github.com/gianlucatruda/dotfiles/blob/master/.config/karabiner/karabiner.json"
    click BashProfile "https://github.com/gianlucatruda/dotfiles/blob/master/.bash_profile"
    click BashRC "https://github.com/gianlucatruda/dotfiles/blob/master/.bashrc"
    click Aliases "https://github.com/gianlucatruda/dotfiles/blob/master/.config/.aliases"
    click Functions "https://github.com/gianlucatruda/dotfiles/blob/master/.config/.functions"
    click Exports "https://github.com/gianlucatruda/dotfiles/blob/master/.config/.exports"
    click BashPrompt "https://github.com/gianlucatruda/dotfiles/blob/master/.config/.bash_prompt"
    click Path "https://github.com/gianlucatruda/dotfiles/blob/master/.config/.path"
    click Bootstrap "https://github.com/gianlucatruda/dotfiles/blob/master/bootstrap.sh"
    click Brew "https://github.com/gianlucatruda/dotfiles/blob/master/brew.sh"
    click MacOS "https://github.com/gianlucatruda/dotfiles/blob/master/macos.sh"
    click Git "https://github.com/gianlucatruda/dotfiles/tree/master/.config/git/config"
    click GitIgnore "https://github.com/gianlucatruda/dotfiles/blob/master/.gitignore_global"
    click BrewFile "https://github.com/gianlucatruda/dotfiles/tree/master/.config/homebrew/Brewfile"
    click Hammerspoon "https://github.com/gianlucatruda/dotfiles/blob/master/.hammerspoon/init.lua"
    click BTooth "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-btooth"
    click Cheat "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-cheat"
    click Scan "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-scan"
    click ObsidianSync "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-sync-obsidian"
    click HDDSync "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-synchdd"
    click TTS "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-tts"
    click STT "https://github.com/gianlucatruda/dotfiles/tree/master/scripts/gt-stt"

    %% Styling
    classDef ui fill:#4A90E2,stroke:#2171C7,color:white
    classDef shell fill:#50C878,stroke:#2E8B57,color:white
    classDef config fill:#FFA500,stroke:#FF8C00,color:white
    classDef util fill:#9370DB,stroke:#7B68EE,color:white

    %% Legend
    subgraph Legend
        UI_Legend["UI Components"]:::ui
        Shell_Legend["Shell Components"]:::shell
        Config_Legend["Configuration Components"]:::config
        Util_Legend["Utility Scripts"]:::util
    end
```
