# jones-sam/.dotfiles architecture

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

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

## Overview

##### Project Type & Purpose
- This is a personal “dotfiles” repository—essentially a configuration‐as‐code project that uses chezmoi to manage all of your shell, editor, window manager, and other user‐level settings.
- The README confirms it’s a chezmoi‐managed setup: you clone the repo, run `chezmoi init --apply`, and chezmoi symlinks or renders the files into your home directory.

##### High‐Level File Structure & Architectural Patterns
- Top‐level:
– `.chezmoiignore`: files/patterns you don’t want tracked
– `README.md`, plus core dotfiles (`dot_zshrc`, `dot_p10k.zsh`)
- `private_dot_config/`: holds per‐application config folders (dunst, hypr, kitty, nvim, swaylock, waybar). Each subfolder is a self‐contained set of config files or scripts.
- Pattern: a single Git repo serves as the source of truth; chezmoi orchestrates templating/symlinking into `$HOME/.config/...` (or other target paths).

##### Key Components
a. Remote Git Repository (e.g. GitHub)
b. Local Clone of dotfiles (your machine’s `.local/share/chezmoi` or wherever chezmoi stores state)
c. chezmoi CLI Engine (runs init/apply commands, processes templates, applies changes)
d. Home Directory Targets (actual config paths in `$HOME`, e.g. `~/.zshrc`, `~/.config/nvim/init.lua`, `~/.config/hypr/hyprland.conf`, etc.)
e. Consumer Applications (Zsh, Powerlevel10k, Neovim, Hyprland, Dunst, Kitty, Waybar, Swaylock)
f. (Optional) User workflow: edit→commit→push→clone/apply on new machine

##### Relationships & Data Flows
- Developer edits files in Local Clone → Git commit → push to Remote.
- On any machine: chezmoi pulls from Remote → chezmoi processes templates → symlinks or renders into Home Directory Targets.
- Applications (Zsh, Neovim, etc.) read their config from these targets at runtime.

##### Architectural Patterns & Principles
- Configuration‐as‐Code: versioned dotfiles, single source of truth
- Idempotent Provisioning: `chezmoi apply` can be run repeatedly to converge state
- Separation of Public vs. Private:
– Public dotfiles (`dot_zshrc`, `.chezmoiignore`, etc.) vs. private_app configs under `private_dot_config/`
- Modular design: each application’s config is isolated in its own subfolder

##### Detailing & Capturing Essentials
- Directory mapping: e.g.,
Local `private_dot_config/nvim/init.lua`
→ symlink → `~/.config/nvim/init.lua`
- How core files like `dot_zshrc` map to `~/.zshrc`

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Remote
    RemoteGit["Remote Git Repository"]:::remote

    %% Local Clone & chezmoi
    subgraph "Local Clone (chezmoi state)" 
        direction TB
        PublicDotfiles["Public Dotfiles (.)"]:::local
        CZignore[".chezmoiignore"]:::local
        ZshRC["dot_zshrc"]:::local
        P10k["dot_p10k.zsh"]:::local

        subgraph "private_dot_config"
            direction TB
            DunstCfg["dunstrc"]:::local
            subgraph "hypr"
                direction TB
                HyprConf["hyprland.conf"]:::local
                HyprIdle["hypridle.conf"]:::local
                HyprLock["hyprlock.conf"]:::local
                HyprPaper["hyprpaper.conf"]:::local
                HyprScripts["scripts/…"]:::local
            end
            subgraph "kitty"
                direction TB
                KittyConf["kitty.conf"]:::local
                GruvConf["gruvbox_dark.conf"]:::local
                ScrollbackInit["scrollback-pager/nvim/init.vim"]:::local
                KittyLogs["private_logs/.keep"]:::local
            end
            subgraph "nvim"
                direction TB
                NVInitLua["init.lua"]:::local
                LuaRc["dot_luarc.json"]:::local
                LazyLock["lazy-lock.json"]:::local
                OldVim["init.vim.old"]:::local
                AfterPlugins["after/…"]:::local
                LuaDir["lua/…"]:::local
                SpellFiles["spell/…"]:::local
            end
            SwaylockCfg["swaylock/config"]:::local
            subgraph "waybar"
                direction TB
                WBConfig["config.jsonc"]:::local
                WBExample["example.jsonc"]:::local
                WBStyle["style.css"]:::local
                WBScripts["scripts/…"]:::local
            end
        end
    end

    %% Home Directory Targets
    subgraph "Home Directory Targets"
        direction TB
        HD_ZshRC["~/.zshrc"]:::cfg
        HD_P10k["~/.p10k.zsh"]:::cfg
        HD_Nvim["~/.config/nvim/init.lua"]:::cfg
        HD_Kitty["~/.config/kitty/kitty.conf"]:::cfg
        HD_Hypr["~/.config/hypr/hyprland.conf"]:::cfg
        HD_Dunst["~/.config/dunst/dunstrc"]:::cfg
        HD_Swaylock["~/.config/swaylock/config"]:::cfg
        HD_Waybar["~/.config/waybar/config.jsonc"]:::cfg
    end

    %% Applications
    subgraph "Applications"
        direction TB
        ZshApp["Zsh"]:::app
        P10kApp["Powerlevel10k"]:::app
        NVApp["Neovim"]:::app
        KittyApp["Kitty"]:::app
        HyprApp["Hyprland"]:::app
        DunstApp["Dunst"]:::app
        SwaylockApp["Swaylock"]:::app
        WaybarApp["Waybar"]:::app
    end

    %% Connections
    RemoteGit -->|"git clone/pull"| PublicDotfiles
    PublicDotfiles -->|"chezmoi apply"| HD_ZshRC
    CZignore -. filters .-> PublicDotfiles
    ZshRC -->|"symlink"| HD_ZshRC
    P10k -->|"symlink"| HD_P10k
    DunstCfg -->|"symlink"| HD_Dunst
    HyprConf -->|"symlink"| HD_Hypr
    KittyConf -->|"symlink"| HD_Kitty
    NVInitLua -->|"symlink"| HD_Nvim
    SwaylockCfg -->|"symlink"| HD_Swaylock
    WBConfig -->|"symlink"| HD_Waybar

    HD_ZshRC -->|"reads config"| ZshApp
    HD_P10k -->|"reads theme"| P10kApp
    HD_Nvim -->|"reads config"| NVApp
    HD_Kitty -->|"reads config"| KittyApp
    HD_Hypr -->|"reads config"| HyprApp
    HD_Dunst -->|"reads config"| DunstApp
    HD_Swaylock -->|"reads config"| SwaylockApp
    HD_Waybar -->|"reads config"| WaybarApp

    %% Click Events
    click PublicDotfiles "https://github.com/jones-sam/.dotfiles/blob/main/."
    click CZignore "https://github.com/jones-sam/.dotfiles/blob/main/.chezmoiignore"
    click ZshRC "https://github.com/jones-sam/.dotfiles/tree/main/dot_zshrc"
    click P10k "https://github.com/jones-sam/.dotfiles/blob/main/dot_p10k.zsh"
    click DunstCfg "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/dunst/dunstrc"
    click HyprConf "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/hypr/hyprland.conf"
    click HyprIdle "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/hypr/hypridle.conf"
    click HyprLock "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/hypr/hyprlock.conf"
    click HyprPaper "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/hypr/hyprpaper.conf"
    click HyprScripts "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/hypr/scripts"
    click KittyConf "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/kitty/kitty.conf"
    click GruvConf "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/kitty/gruvbox_dark.conf"
    click ScrollbackInit "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/kitty/scrollback-pager/nvim/init.vim"
    click KittyLogs "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/kitty/private_logs/.keep"
    click NVInitLua "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/nvim/init.lua"
    click LuaRc "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/nvim/dot_luarc.json"
    click LazyLock "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/nvim/lazy-lock.json"
    click OldVim "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/nvim/init.vim.old"
    click AfterPlugins "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/nvim/after"
    click LuaDir "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/nvim/lua"
    click SpellFiles "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/nvim/spell"
    click SwaylockCfg "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/swaylock/config"
    click WBConfig "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/waybar/config.jsonc"
    click WBExample "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/waybar/example.jsonc"
    click WBStyle "https://github.com/jones-sam/.dotfiles/blob/main/private_dot_config/waybar/style.css"
    click WBScripts "https://github.com/jones-sam/.dotfiles/tree/main/private_dot_config/waybar/scripts"

    %% Styles
    classDef remote fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef local fill:#90EE90,stroke:#333,stroke-width:1px
    classDef cfg fill:#FFA500,stroke:#333,stroke-width:1px
    classDef app fill:#D3D3D3,stroke:#333,stroke-width:1px
```
