# louishuyng/dotfiles architecture

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

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

## Overview

##### Main Components
- Environment Bootstrapping – Includes the bootstrap scripts (mac.sh, arch.sh) and related tools that initialize the system.
- Editor Configuration – Contains directories like “nvim”, “.doom.d” (for Doom Emacs), and related plugin configurations.
- Shell & Terminal Configuration – This includes “terminals” (with fish, kitty, tmux, etc.) and “nvim” (since Neovim is the primary editor) along with terminal-specific config files.
- Window Management & UI Customization – Consists of custom configurations for window managers and status bars, found in directories like “suckless/mac_os” (yabai, sketchybar, karabiner, etc.) and “raycast” for extra scripting.
- DevOps & System Tools – Includes “devops” (with subdirectories for authentik, jaeger, kong, temporal, traefik-proxy, etc.), “nix” (configuration for the Nix package manager), and “home-manager.”
- Version Control & Miscellaneous Configurations – Configurations for git, shell initializations (like .gitignore, .ideavimrc), and miscellaneous scripts in “scripts.”

##### Representing Relationships and Data Flow
- How the bootstrap scripts (in the “bootstrap” directory) initiate the overall configuration process for both macOS and Linux environments.
- Shell configurations (fish under “terminals/fish”) to the terminal emulators (kitty, alacritty, wezterm) to indicate that they work together to provide the user interface.
- That the editor configurations (nvim and .doom.d) are central to the development workflow and integrate with language servers (configured under nvim’s “lsp” and related config files).
- Devops and system tool configurations (inside “devops”, “nix”, and “home-manager”) on one side to denote how these components automate system management and package deployment.
- Link window management (yabai, sketchybar, karabiner, skhd mentioned in “suckless/mac_os”) to the overall user interface, demonstrating that keybindings and automated behaviors improve usability.

##### Architectural Patterns and Design Principles
- The repository is structured in a modular way—each functional area (editor, terminal, window manager) gets its own set of directories and configuration files.
- There is a clear separation between development workflows (like code editing and terminal usage) and system environment setups (like window management and devops automation).
- The use of bootstrap scripts and Nix/home-manager configurations suggests an infrastructure-as-code approach to setting up personal environments reproducibly.

##### Relevant Technologies and Tools
- Neovim and Doom Emacs for text editing.
- Fish shell for command-line operations.
- Terminal emulators: kitty, alacritty, wezterm.
- Tmux for session management.
- Window management via yabai, Sketchy Bar, Karabiner, and Skhd.
- DevOps tools: Docker-compose, Kubernetes yaml manifests, Helm charts; also temporal, kong, jaeger among others.
- Nix and Home Manager for declarative system configurations.

##### Specific Elements
- Clear Labels: Clearly name clusters such as “Editor Setup (nvim, Doom Emacs)”, “Terminal Config (fish, kitty, tmux, etc.)”, “Window Management (yabai, Sketchy Bar, etc.)”, “DevOps & System Tools (devops, nix, home-manager)”, and “Bootstrap Scripts.”
- Annotations: Optionally annotate nodes with critical configuration files (e.g., “nvim/init.lua” under Editor Setup or “bootstrap/mac.sh” under Bootstrapping).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Bootstrapping & System Setup"
        BS["Bootstrap Scripts"]:::bootstrap
    end

    subgraph "Core Environment"
        subgraph "Editor Setup (nvim, Doom Emacs)"
            NV["Neovim Config"]:::editor
            DE["Doom Emacs Config"]:::editor
        end
        subgraph "Shell & Terminal Config"
            FS["Fish Shell Config"]:::terminal
            subgraph "Terminal Emulators"
                KT["Kitty Config"]:::terminal
                AT["Alacritty Config"]:::terminal
                WT["Wezterm Config"]:::terminal
            end
            Tmux["Tmux Config"]:::terminal
        end
    end

    subgraph "User Interface Enhancements"
        UI["macOS Window & UI Config"]:::ui
        RC["Raycast Scripts"]:::ui
    end

    subgraph "DevOps & System Tools"
        DO["DevOps Configs"]:::devops
        NH["Nix & Home Manager"]:::devops
    end

    subgraph "Version Control & Miscellaneous"
        GC["Git/IDE Configs"]:::vcs
        MS["Misc Scripts"]:::vcs
    end

    %% Bootstrap triggers configuration of all components
    BS -->|"init"| NV
    BS -->|"init"| DE
    BS -->|"init"| FS
    BS -->|"init"| Tmux
    BS -->|"init"| KT
    BS -->|"init"| AT
    BS -->|"init"| WT
    BS -->|"init"| UI
    BS -->|"init"| RC
    BS -->|"init"| DO
    BS -->|"init"| NH
    BS -->|"init"| GC
    BS -->|"init"| MS

    %% Fish Shell integrates with Terminal Emulators
    FS -->|"integrates"| KT
    FS -->|"integrates"| AT
    FS -->|"integrates"| WT

    %% Styles
    classDef bootstrap fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef editor fill:#99ccff,stroke:#333,stroke-width:2px;
    classDef terminal fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef ui fill:#ff99cc,stroke:#333,stroke-width:2px;
    classDef devops fill:#ffeb99,stroke:#333,stroke-width:2px;
    classDef vcs fill:#99ffff,stroke:#333,stroke-width:2px;

    %% Click Events
    click BS "https://github.com/louishuyng/dotfiles/tree/minimal-version/bootstrap/"
    click NV "https://github.com/louishuyng/dotfiles/tree/minimal-version/nvim/"
    click DE "https://github.com/louishuyng/dotfiles/tree/minimal-version/.doom.d/"
    click FS "https://github.com/louishuyng/dotfiles/tree/minimal-version/terminals/fish/"
    click KT "https://github.com/louishuyng/dotfiles/blob/minimal-version/terminals/kitty/kitty.conf"
    click AT "https://github.com/louishuyng/dotfiles/blob/minimal-version/terminals/alacritty/alacritty.toml"
    click WT "https://github.com/louishuyng/dotfiles/blob/minimal-version/terminals/wezterm/wezterm.lua"
    click Tmux "https://github.com/louishuyng/dotfiles/blob/minimal-version/terminals/tmux/.tmux.conf"
    click UI "https://github.com/louishuyng/dotfiles/tree/minimal-version/suckless/mac_os/"
    click RC "https://github.com/louishuyng/dotfiles/tree/minimal-version/raycast/"
    click DO "https://github.com/louishuyng/dotfiles/tree/minimal-version/devops/"
    click NH "https://github.com/louishuyng/dotfiles/tree/minimal-version/nix/"
    click GC "https://github.com/louishuyng/dotfiles/tree/minimal-version/config/"
    click MS "https://github.com/louishuyng/dotfiles/tree/minimal-version/scripts/"
```
