# kabero/dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This is a “dotfiles” repository: a personal configuration management project.
- It uses chezmoi plus Git to store and deploy shell configs, editor settings, terminal themes, etc., across machines.

##### File structure
- Top-level files:
- .chezmoiignore & .gitignore – define what to skip in deployment and versioning
- README.md – overview of included tools and setup hints
- dot_* directories – each holds a set of config files named for the target path in your home directory
- excludes/ – scripts and files you want in the repo but not managed by chezmoi
- Key patterns:
- “dot_config” holds sub-directories for alacritty, bat, git, nvim, starship, etc.
- “dot_zsh”, “dot_vimrc”, “dot_tmux.conf” are single-file configs.
- chezmoi treats each “dot_…” entry as a source and symlinks or templates it into ~/.config or ~/.*.

##### README for additional insights
- Lists major tools: alacritty, asdf, git, neovim, starship, tmux, vim, zsh, chezmoi, obsidian
- Mentions helper tools: fzf, navi, pet
- Provides alias examples and fzf keybindings

a. Main components
- Version Control: Git repo (local + remote origin)
- Deployment Engine: chezmoi CLI
- File System: user’s $HOME (with ~/.config and ~/.*)
- Runtime Consumers: alacritty, neovim, tmux, zsh, starship, obsidian, etc.
b. Relationships & interactions
1. Git repo is cloned or pulled → local copy
2. chezmoi reads repo, .chezmoiignore, templates → writes/symlinks into $HOME
3. When user launches an app (e.g., alacritty), the app reads its config from ~/.config/alacritty/…
c. Architectural patterns
- Infrastructure-as-Code: declarative dotfiles
- Idempotent deployment: running “chezmoi apply” yields consistent environment
- Separation of concerns:
– Source (repo) vs. Deployed files (home directory)
– Excluded files remain in /excludes but are never linked
d. Key technologies
- Git / GitHub (versioning & collaboration)
- chezmoi (dotfiles management)
- Deno (used by some scripts, e.g., bufpreview.vim)
- Shell apps: zsh + completions, fzf, navi, pet
- Editors & terminals: neovim, vim, alacritty, tmux, obsidian

##### Detail is key
- Break out each top-level “dot_*” directory as a sub-component under “chezmoi”
- .chezmoiignore excluding “excludes/”
- That running `chezmoi apply` is the central orchestration step

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Version Control
    subgraph "Version Control"
        GitRepo["Git Repo"]:::tool
    end

    %% Deployment Engine
    ChezmoiEngine["chezmoi Engine"]:::tool

    %% Chezmoi Sources
    subgraph "chezmoi Sources"
        chezmoiIgnore[".chezmoiignore"]:::fs
        gitIgnore[".gitignore"]:::fs
        Readme["README.md"]:::fs
        ToolVersions["dot_tool-versions"]:::fs
        ASDFrC["dot_asdfrc"]:::fs
        LocalBin["dot_local/bin"]:::fs
        Excludes["excludes/"]:::fs

        subgraph "dot_config"
            DC_Alacritty["alacritty/"]:::fs
            DC_Bat["bat/"]:::fs
            DC_Git["git/"]:::fs
            DC_Nvim["nvim/"]:::fs
            DC_Starship["starship.toml"]:::fs
        end

        subgraph "single-file dotfiles"
            Zshrc["dot_zshrc.tmpl"]:::fs
            ZshComps["dot_zsh/completions/"]:::fs
            Tmux["dot_tmux.conf"]:::fs
            Vim["dot_vimrc"]:::fs
            Obsidian["dot_obsidian.vimrc"]:::fs
        end

        subgraph "other tools"
            Claude["dot_claude/"]:::fs
            Logseq["dot_logseq/config/"]:::fs
        end
    end

    %% Home File System
    subgraph "Home File System"
        subgraph "~/.config"
            Home_Alacritty["alacritty/"]:::fs
            Home_Bat["bat/"]:::fs
            Home_Git["git/"]:::fs
            Home_Nvim["nvim/"]:::fs
            Home_Starship["starship.toml"]:::fs
        end
        subgraph "~/."
            Home_Zshrc[".zshrc"]:::fs
            Home_ZshComps[".zsh/completions/"]:::fs
            Home_Tmux[".tmux.conf"]:::fs
            Home_Vim[".vimrc"]:::fs
            Home_Obsidian[".obsidian.vimrc"]:::fs
            Home_Claude[".claude/"]:::fs
            Home_Logseq[".logseq/config/"]:::fs
        end
    end

    %% Runtime Applications
    subgraph "Runtime Applications"
        AlacrittyApp["Alacritty"]:::app
        BatApp["Bat"]:::app
        GitApp["Git CLI"]:::app
        NeovimApp["Neovim"]:::app
        StarshipApp["Starship"]:::app
        ZshApp["Zsh"]:::app
        TmuxApp["Tmux"]:::app
        VimApp["Vim"]:::app
        ObsidianApp["Obsidian"]:::app
        ClaudeApp["Claude Notes"]:::app
        LogseqApp["Logseq"]:::app
    end

    %% Relationships
    GitRepo -->|"pull/clone"| ChezmoiEngine
    ChezmoiEngine -->|"reads sources"| chezmoiIgnore
    ChezmoiEngine --> gitIgnore
    ChezmoiEngine --> Readme
    ChezmoiEngine --> ToolVersions
    ChezmoiEngine --> ASDFrC
    ChezmoiEngine --> LocalBin
    ChezmoiEngine --> Excludes
    ChezmoiEngine --> DC_Alacritty
    ChezmoiEngine --> DC_Bat
    ChezmoiEngine --> DC_Git
    ChezmoiEngine --> DC_Nvim
    ChezmoiEngine --> DC_Starship
    ChezmoiEngine --> Zshrc
    ChezmoiEngine --> ZshComps
    ChezmoiEngine --> Tmux
    ChezmoiEngine --> Vim
    ChezmoiEngine --> Obsidian
    ChezmoiEngine --> Claude
    ChezmoiEngine --> Logseq

    ChezmoiEngine -->|"apply/symlink"| Home_Alacritty
    ChezmoiEngine --> Home_Bat
    ChezmoiEngine --> Home_Git
    ChezmoiEngine --> Home_Nvim
    ChezmoiEngine --> Home_Starship
    ChezmoiEngine --> Home_Zshrc
    ChezmoiEngine --> Home_ZshComps
    ChezmoiEngine --> Home_Tmux
    ChezmoiEngine --> Home_Vim
    ChezmoiEngine --> Home_Obsidian
    ChezmoiEngine --> Home_Claude
    ChezmoiEngine --> Home_Logseq

    Home_Alacritty -->|"reads config"| AlacrittyApp
    Home_Bat -->|"reads config"| BatApp
    Home_Git -->|"reads config"| GitApp
    Home_Nvim -->|"reads config"| NeovimApp
    Home_Starship -->|"reads config"| StarshipApp
    Home_Zshrc -->|"reads config"| ZshApp
    Home_ZshComps --> ZshApp
    Home_Tmux -->|"reads config"| TmuxApp
    Home_Vim -->|"reads config"| VimApp
    Home_Obsidian -->|"reads config"| ObsidianApp
    Home_Claude -->|"reads config"| ClaudeApp
    Home_Logseq -->|"reads config"| LogseqApp

    %% Click Events
    click GitRepo "https://github.com/kabero/dotfiles/tree/master/./"
    click chezmoiIgnore "https://github.com/kabero/dotfiles/blob/master/.chezmoiignore"
    click gitIgnore "https://github.com/kabero/dotfiles/blob/master/.gitignore"
    click Readme "https://github.com/kabero/dotfiles/blob/master/README.md"
    click ToolVersions "https://github.com/kabero/dotfiles/tree/master/dot_tool-versions"
    click ASDFrC "https://github.com/kabero/dotfiles/tree/master/dot_asdfrc"
    click LocalBin "https://github.com/kabero/dotfiles/tree/master/dot_local/bin"
    click Excludes "https://github.com/kabero/dotfiles/tree/master/excludes/"
    click DC_Alacritty "https://github.com/kabero/dotfiles/tree/master/dot_config/alacritty/"
    click DC_Bat "https://github.com/kabero/dotfiles/tree/master/dot_config/bat/"
    click DC_Git "https://github.com/kabero/dotfiles/tree/master/dot_config/git/"
    click DC_Nvim "https://github.com/kabero/dotfiles/tree/master/dot_config/nvim/"
    click DC_Starship "https://github.com/kabero/dotfiles/blob/master/dot_config/starship.toml"
    click Zshrc "https://github.com/kabero/dotfiles/blob/master/dot_zshrc.tmpl"
    click ZshComps "https://github.com/kabero/dotfiles/tree/master/dot_zsh/completions/"
    click Tmux "https://github.com/kabero/dotfiles/blob/master/dot_tmux.conf"
    click Vim "https://github.com/kabero/dotfiles/tree/master/dot_vimrc"
    click Obsidian "https://github.com/kabero/dotfiles/blob/master/dot_obsidian.vimrc"
    click Claude "https://github.com/kabero/dotfiles/tree/master/dot_claude/"
    click Logseq "https://github.com/kabero/dotfiles/tree/master/dot_logseq/config/"

    %% Styles
    classDef tool fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef fs fill:#90EE90,stroke:#333,stroke-width:1px
    classDef app fill:#FFA500,stroke:#333,stroke-width:1px
```
