# riderius/dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This is a “dotfiles” repository: a collection of configuration files and small helper scripts to bootstrap and maintain a consistent developer workstation environment.
- Its goal is to store, version, and deploy settings for shells (fish, zsh), editors (Neovim, Emacs), window manager (i3), terminal emulator (Alacritty), Git, SSH, package-manager defaults (pacman), UFW applications, and custom helper scripts.

##### File structure
Top-level directories and files:
- .config/ … contains per-application subfolders (alacritty, fish, git, i3, i3status, nvim, pacman)
- .emacs.d/ … Emacs initialization and custom Lisp packages
- .local/bin/ … executable helper scripts (git-imgdiff, restart-nm, windscribe start/stop)
- .ssh/config … SSH client config
- .zshrc, .vimrc, .p10k.zsh … standalone shell and editor config
- install.sh … bootstrapping script that clones/syncs the repo and sets up symlinks
- README.md, LICENSE … metadata
- competitive/, latex_template.tex, ufw_applications/ … auxiliary resources

Architectural patterns:
- Single Git repository as the “source of truth”
- install.sh acts as orchestration layer: clones repo, creates symlinks, invokes per-tool installation steps
- Modular config: each tool’s settings live in their own subfolder under .config or top-level dotfiles

##### README
- Very simple: “My Dotfiles.”

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Repository and Bootstrap
    Repo["Dotfiles Git Repository"]:::repo
    Install["install.sh"]:::script
    Repo -->|clone| Install
    Repo -->|contains| README["README.md"]:::repo
    Repo -->|contains| LICENSE["LICENSE"]:::repo

    %% User Home and Configs
    Install -->|symlink configs| Home["User Home (~)"]
    subgraph "User Home (~)"
        subgraph "Shell Configuration"
            FishCfg["config.fish"]:::config
            FishPrompt["fish_prompt.fish"]:::config
            Zshrc[".zshrc"]:::config
            P10k[".p10k.zsh"]:::config
        end
        subgraph "Editor Configuration"
            NVimCfg["init.vim"]:::config
            EmacsInit["init.el"]:::config
            EmacsLisp["lisp/"]:::config
        end
        subgraph "Window Manager Configuration"
            I3Cfg["i3 config"]:::config
            I3Status["i3status config"]:::config
        end
        subgraph "Terminal Emulator Configuration"
            AlacrittyCfg["alacritty.yml"]:::config
        end
        subgraph "Version Control Configuration"
            GitCfg["git config"]:::config
            GitHook["commit-msg hook"]:::config
        end
        subgraph "SSH Client Configuration"
            SSHCfg["ssh config"]:::config
        end
        subgraph "Package Manager Configuration"
            PacmanCfg["makepkg.conf"]:::config
        end
        subgraph "Firewall Configuration"
            UFWApps["ufw_applications/"]:::config
        end
        subgraph "Custom Helper Scripts"
            Script1["git-imgdiff"]:::script
            Script2["restart-nm"]:::script
            Script3["windscribe-start"]:::script
            Script4["windscribe-stop"]:::script
        end
    end

    %% Applications & Services
    subgraph "Applications & Services"
        FishApp["fish shell"]:::app
        ZshApp["zsh"]:::app
        NVimApp["Neovim"]:::app
        EmacsApp["Emacs"]:::app
        I3App["i3 WM"]:::app
        I3StatusApp["i3status"]:::app
        AlacrittyApp["Alacritty"]:::app
        GitApp["Git"]:::app
        SSHApp["SSH client"]:::app
        PacmanApp["Pacman"]:::app
        UFWApp["UFW"]:::app
    end

    %% Config load relationships
    FishCfg -->|"load"| FishApp
    FishPrompt -->|"prompt"| FishApp
    Zshrc -->|"source"| ZshApp
    P10k -->|"source"| ZshApp
    NVimCfg -->|"load"| NVimApp
    EmacsInit -->|"load"| EmacsApp
    EmacsLisp -->|"require"| EmacsApp
    I3Cfg -->|"load"| I3App
    I3StatusApp -->|"load config"| I3StatusApp
    AlacrittyCfg -->|"load"| AlacrittyApp
    GitCfg -->|"use"| GitApp
    GitHook -->|"hook"| GitApp
    SSHCfg -->|"use"| SSHApp
    PacmanCfg -->|"use"| PacmanApp
    UFWApps -->|"define apps"| UFWApp
    Script1 -->|"execute"| FishApp
    Script2 -->|"execute"| FishApp
    Script3 -->|"execute"| FishApp
    Script4 -->|"execute"| FishApp

    %% External Services
    subgraph "External Services"
        GitRemote["Git Remote"]:::external
        PackageRepo["Package Repos"]:::external
        PluginReg["Plugin Registries"]:::external
    end

    GitRemote -->|push/pull| Repo
    NVimApp -->|pull plugins| PluginReg
    EmacsApp -->|pull packages| PluginReg
    PacmanApp -->|install packages| PackageRepo

    %% Click Events
    click Repo "https://github.com/riderius/dotfiles/tree/master//"
    click Install "https://github.com/riderius/dotfiles/blob/master//install.sh"
    click README "https://github.com/riderius/dotfiles/blob/master//README.md"
    click LICENSE "https://github.com/riderius/dotfiles/tree/master//LICENSE"
    click FishCfg "https://github.com/riderius/dotfiles/blob/master//.config/fish/config.fish"
    click FishPrompt "https://github.com/riderius/dotfiles/blob/master//.config/fish/functions/fish_prompt.fish"
    click Zshrc "https://github.com/riderius/dotfiles/blob/master//.zshrc"
    click P10k "https://github.com/riderius/dotfiles/blob/master//.p10k.zsh"
    click NVimCfg "https://github.com/riderius/dotfiles/blob/master//.config/nvim/init.vim"
    click EmacsInit "https://github.com/riderius/dotfiles/blob/master//.emacs.d/init.el"
    click EmacsLisp "https://github.com/riderius/dotfiles/tree/master//.emacs.d/lisp/"
    click I3Cfg "https://github.com/riderius/dotfiles/tree/master//.config/i3/config"
    click I3Status "https://github.com/riderius/dotfiles/tree/master//.config/i3status/config"
    click AlacrittyCfg "https://github.com/riderius/dotfiles/blob/master//.config/alacritty/alacritty.yml"
    click GitCfg "https://github.com/riderius/dotfiles/tree/master//.config/git/config"
    click GitHook "https://github.com/riderius/dotfiles/tree/master//.config/git/hooks/commit-msg"
    click SSHCfg "https://github.com/riderius/dotfiles/tree/master//.ssh/config"
    click PacmanCfg "https://github.com/riderius/dotfiles/blob/master//.config/pacman/makepkg.conf"
    click UFWApps "https://github.com/riderius/dotfiles/tree/master//ufw_applications/"
    click Script1 "https://github.com/riderius/dotfiles/tree/master//.local/bin/git-imgdiff"
    click Script2 "https://github.com/riderius/dotfiles/tree/master//.local/bin/restart-nm"
    click Script3 "https://github.com/riderius/dotfiles/tree/master//.local/bin/windscribe-start"
    click Script4 "https://github.com/riderius/dotfiles/tree/master//.local/bin/windscribe-stop"

    %% Styles
    classDef repo fill:#ddeeff,stroke:#000000
    classDef config fill:#cce5ff,stroke:#000000
    classDef script fill:#ccffcc,stroke:#000000
    classDef app fill:#ffdd99,stroke:#000000
    classDef external fill:#dddddd,stroke:#000000
```
