# astr0n0mer/.dotfiles architecture

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

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

## Overview

##### Main Components

a. Core Management Layer:
- Stow Management System (central component)
- Makefile-based Configuration System
- Installation Scripts Layer

b. Configuration Categories (group these logically):
- Shell Environments (zsh, bash)
- Development Tools (nvim, git, vscode/vscodium)
- Window Management (yabai, skhd, i3)
- Terminal Emulators (alacritty, wezterm)
- System Utilities (bat, fzf, tmux)
- Application Configs (brave, logseq, dashy)

c. Platform-Specific Components:
- Nix/Darwin Integration
- macOS Specific (karabiner, sketchybar)
- Linux Specific (i3, rofi)

##### Relationship Flows to Illustrate

- How the stow system symlinks configurations to their respective locations
- Demonstrate the setup flow from initial clone to deployed configurations
- Platform-specific deployment paths

**┌─────────────────────────────────────────────┐**
- Dotfiles Management              │
- ┤

- ┌─────────────┐      ┌──────────────┐   │
- Makefile  │──────│  GNU Stow    │   │
- ┘      └──────────────┘   │

- ┌───────┴───────┐          │            │
- Setup Scripts │          │            │
- ┘          ▼            │
- ┌──────────────┐     │
- Symlinks    │     │
- ┘     │

- ┌─────────────────┬┴────────────┐ │
- ▼                 ▼              ▼ │
- ┌─────────────┐    ┌──────────────┐ ┌────────┐
- macOS      │    │  Linux       │ │ Shared │
- Configs    │    │  Configs     │ │ Configs│
- ┘    └──────────────┘ └────────┘

- ┘

##### Important Details

- Configuration categories with their respective tools
- Nix-darwin integration for macOS
- Relationship between shared and platform-specific configs

##### Implementation Notes

- Maintain a hierarchical layout from top (management) to bottom (configurations)
- Version control integration indicators

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Management Layer
    subgraph Core
        Stow["GNU Stow Manager"]:::core
        Make["Makefile System"]:::core
        Scripts["Installation Scripts"]:::core
        
        Make --> Stow
        Scripts --> Stow
    end

    %% Symlink Management
    SymLinks["Symlink Management"]:::system
    Stow --> SymLinks

    %% Platform Layers
    subgraph Platforms
        MacOS["macOS Specific"]:::platform
        Linux["Linux Specific"]:::platform
        Shared["Shared Configs"]:::platform
        
        SymLinks --> MacOS
        SymLinks --> Linux
        SymLinks --> Shared
    end

    %% Configuration Categories
    subgraph ShellEnv
        Zsh["Zsh Config"]:::shell
        Bash["Bash Config"]:::shell
        OhMyZsh["Oh-My-Zsh"]:::shell
    end

    subgraph DevTools
        Nvim["Neovim"]:::dev
        Git["Git Config"]:::dev
        VSCodium["VSCodium"]:::dev
    end

    subgraph WinManagement
        Yabai["Yabai"]:::window
        SKHD["SKHD"]:::window
        I3["i3"]:::window
    end

    subgraph TerminalEmu
        Alacritty["Alacritty"]:::terminal
        Wezterm["Wezterm"]:::terminal
    end

    subgraph SysUtils
        Tmux["Tmux"]:::util
        Bat["Bat"]:::util
        Fzf["Fzf"]:::util
    end

    subgraph PkgManagement
        Homebrew["Homebrew"]:::pkg
        NixDarwin["Nix Darwin"]:::pkg
        HomeManager["Home Manager"]:::pkg
    end

    subgraph AppConfigs
        Brave["Brave"]:::app
        Logseq["Logseq"]:::app
        Dashy["Dashy"]:::app
    end

    %% Platform-specific connections
    MacOS --> Yabai
    MacOS --> SKHD
    Linux --> I3
    
    %% Component connections to platforms
    Shared --> ShellEnv
    Shared --> DevTools
    Shared --> TerminalEmu
    Shared --> SysUtils
    Shared --> AppConfigs

    %% Style Definitions
    classDef core fill:#2374ab
    classDef system fill:#457b9d
    classDef platform fill:#e63946
    classDef shell fill:#84a98c
    classDef dev fill:#52796f
    classDef window fill:#354f52
    classDef terminal fill:#2f3e46
    classDef util fill:#588157
    classDef pkg fill:#bc6c25
    classDef app fill:#283618

    %% Click Events
    click Stow "https://github.com/astr0n0mer/.dotfiles/blob/main//.stow-local-ignore"
    click Scripts "https://github.com/astr0n0mer/.dotfiles/tree/main//_scripts"
    click Make "https://github.com/astr0n0mer/.dotfiles/tree/main//Makefile"
    click Zsh "https://github.com/astr0n0mer/.dotfiles/blob/main//zsh/.zshrc"
    click Bash "https://github.com/astr0n0mer/.dotfiles/blob/main//bash/.bashrc"
    click OhMyZsh "https://github.com/astr0n0mer/.dotfiles/tree/main//oh-my-zsh/.oh-my-zsh/custom"
    click Nvim "https://github.com/astr0n0mer/.dotfiles/tree/main//nvim/.config/nvim"
    click Git "https://github.com/astr0n0mer/.dotfiles/blob/main//git/.gitconfig"
    click VSCodium "https://github.com/astr0n0mer/.dotfiles/tree/main//vscodium/.config/VSCodium"
    click Yabai "https://github.com/astr0n0mer/.dotfiles/tree/main//yabai/.config/yabai/yabairc"
    click SKHD "https://github.com/astr0n0mer/.dotfiles/tree/main//skhd/.config/skhd/skhdrc"
    click I3 "https://github.com/astr0n0mer/.dotfiles/tree/main//i3/.config/i3/config"
    click Alacritty "https://github.com/astr0n0mer/.dotfiles/blob/main//alacritty/.config/alacritty/alacritty.toml"
    click Wezterm "https://github.com/astr0n0mer/.dotfiles/blob/main//wezterm/.config/wezterm/wezterm.lua"
    click Tmux "https://github.com/astr0n0mer/.dotfiles/blob/main//tmux/.tmux.conf"
    click Bat "https://github.com/astr0n0mer/.dotfiles/tree/main//bat/.config/bat/config"
    click Fzf "https://github.com/astr0n0mer/.dotfiles/blob/main//fzf/.fzf.zsh"
    click NixDarwin "https://github.com/astr0n0mer/.dotfiles/tree/main//nix-darwin/.config/nix-darwin"
    click Homebrew "https://github.com/astr0n0mer/.dotfiles/blob/main//homebrew/.Brewfile"
    click HomeManager "https://github.com/astr0n0mer/.dotfiles/tree/main//home-manager/.config/home-manager"
    click Brave "https://github.com/astr0n0mer/.dotfiles/tree/main//brave/.config/brave"
    click Logseq "https://github.com/astr0n0mer/.dotfiles/tree/main//logseq/.config/logseq"
    click Dashy "https://github.com/astr0n0mer/.dotfiles/tree/main//dashy/.config/dashy"
```
