# jampow/dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This is a *dotfiles repository* whose sole purpose is to version-control and deploy a user’s shell, editor, terminal, window-manager, and other environment configurations.
- Key indicators: All files live in your home directory (`.config/…`, `.zshrc`, `.tmux.conf`, etc.); the README explains a “bare clone” install and lists your system dependencies.

##### File structure
- Top-level files:
- Git config (`.gitignore`, `.gitconfig`)
- Shell config (`.zshrc`, `.bash_alias`, `.zprofile`)
- Terminal multiplexer config (`.tmux.conf`, `*.split.conf`)
- X/window managers (`.xinitrc`, `.config/i3`, `.config/sway`, `.config/rofi`)
- Editors (`.config/nvim`, `.config/lvim`)
- File manager (`.config/ranger`)
- Package sync scripts (`.pacman-sync/`)
- Patterns: All configs are treated as tracked dotfiles under a *bare Git repository*.

##### README for additional insights
- The install process uses a *bare Git repo* in `$HOME/.dotfiles` plus a shell alias (`df`).
- Dependencies section lists applications whose configs are managed by this repo.

a. Main components
1. Host OS (Arch Linux, etc.)
2. Bare Git repository (`$HOME/.dotfiles`)
3. Shell alias and wrapper (`df`)
4. Remote Git service (GitHub)
5. Config consumers:
- Shells (zsh, fish)
- Terminal emulator (Alacritty, Termite)
- Multiplexer (tmux)
- Window managers (i3, sway)
- Editors (nvim, lvim)
- File manager (ranger)
6. Pacman-sync scripts (install/update hook)
b. Relationships and interactions
- On boot/login: OS invokes shell
-> reads `.zshrc`, `.bash_alias`, `df` alias.
- When user runs “df checkout/master” or “df pull”:
-> alias dispatches to Git bare repo
-> updates working tree (their dotfiles)
-> configs are deployed to `~/.config/...`.
- “df push” syncs local changes back to GitHub.
- Package sync: `pacman-sync/install` registers hook to auto-update the system’s package list (`pkg-list.txt`).
c. Architectural patterns
- *Command-wrapper pattern*: the `df` alias encapsulates Git commands on the bare repo.
d. Technologies & frameworks
- Git (bare repo), Zsh/Fish shell, Pacman, Alacritty, i3/Sway, Neovim/LunarVim, Ranger, Rofi, Tmux.

##### Detail
- Call out the post-install hook in pacman-sync.
- Related apps (terminals, editors) visually.

- Visually separates the *deployment mechanism* (bare repo + df) from the *consuming applications* (shell, WM, editors).
- Shows external dependencies (GitHub, pacman).

## Diagram (Mermaid)

```mermaid
flowchart TD
    OS["Host OS (Arch Linux)"]:::runtime
    Remote["Remote: GitHub"]:::external
    BareRepo["Bare Git Repo ($HOME/.dotfiles)"]:::config
    dfAlias["Alias `df` (wrapper)"]:::config
    Pacman["Pacman Sync Scripts"]:::script

    subgraph "Configuration Directories"
        Shells["Shell Configs"]:::config
        Alacritty["Alacritty"]:::config
        Termite["Termite"]:::config
        Tmux["tmux"]:::runtime
        i3["i3 Window Manager"]:::runtime
        Sway["sway Window Manager"]:::runtime
        Rofi["Rofi Launcher"]:::runtime
        Neovim["Neovim Editor"]:::runtime
        LVim["LunarVim Editor"]:::runtime
        Ranger["Ranger File Manager"]:::runtime
    end

    Remote -->|"git pull/clone"| BareRepo
    dfAlias -->|"wraps git CLI"| BareRepo
    BareRepo -->|"checkout configs"| Shells
    BareRepo -->|"checkout configs"| Alacritty
    BareRepo -->|"checkout configs"| Termite
    BareRepo -->|"checkout configs"| Tmux
    BareRepo -->|"checkout configs"| i3
    BareRepo -->|"checkout configs"| Sway
    BareRepo -->|"checkout configs"| Rofi
    BareRepo -->|"checkout configs"| Neovim
    BareRepo -->|"checkout configs"| LVim
    BareRepo -->|"checkout configs"| Ranger
    Pacman -->|hook install/update| OS

    classDef config fill:#cce5ff,stroke:#004085,color:#004085;
    classDef runtime fill:#d4edda,stroke:#155724,color:#155724;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#6c757d;
    classDef script fill:#fff3cd,stroke:#856404,color:#856404;

    click BareRepo "https://github.com/jampow/dotfiles/blob/master/README.md"
    click dfAlias "https://github.com/jampow/dotfiles/blob/master/.bash_alias"
    click GitConfig "https://github.com/jampow/dotfiles/blob/master/.gitconfig"
    click Shells "https://github.com/jampow/dotfiles/blob/master/.zshrc"
    click Alacritty "https://github.com/jampow/dotfiles/blob/master/.config/alacritty/alacritty.toml"
    click Termite "https://github.com/jampow/dotfiles/tree/master/.config/termite/config"
    click Tmux "https://github.com/jampow/dotfiles/blob/master/.tmux.conf"
    click i3 "https://github.com/jampow/dotfiles/tree/master/.config/i3/config"
    click Sway "https://github.com/jampow/dotfiles/tree/master/.config/sway/config"
    click Rofi "https://github.com/jampow/dotfiles/blob/master/.config/rofi/config.rasi"
    click Neovim "https://github.com/jampow/dotfiles/blob/master/.config/nvim/init.vim"
    click LVim "https://github.com/jampow/dotfiles/blob/master/.config/lvim/config.lua"
    click Ranger "https://github.com/jampow/dotfiles/blob/master/.config/ranger/rc.conf"
    click Pacman "https://github.com/jampow/dotfiles/tree/master/.pacman-sync/install"
```
