# mimikun/dotfiles architecture

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

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

## Overview

##### Main Components

a. Core Management Layer:
- Chezmoi (Central configuration manager)
- File Structure Manager
- Template Engine (*.tmpl files)

b. Configuration Categories:
- Shell Environments (Fish, Zsh, Bash, PowerShell)
- Editor Configurations (Neovim, Vim, Emacs)
- Terminal Emulators (Alacritty, WezTerm, etc.)
- Window Managers (i3, komorebi)
- Development Tools (Git, SSH, etc.)

c. Platform-Specific Components:
- Linux-specific configurations
- Windows-specific configurations
- WSL configurations
- macOS configurations (planned)

##### Relationship Flow

**┌─────────────────────────────────────────────────────────────┐**
- Chezmoi Core Layer                      │
- ┤
- Template Engine                                          │
- File Management                                          │
- Platform Detection                                       │
- ┬─────────────────────┬────────────────────────┘

- ▼                     ▼
**┌─────────────────────┐   ┌──────────────────────┐**
- Common Configs     │   │ Platform Specific     │
- ┤   ├──────────────────────┤
- Shell             │   │ - Linux Scripts       │
- Editor            │   │ - Windows Scripts     │
- Git               │   │ - WSL Configs         │
- SSH               │   │ - macOS (planned)     │
- ┘   └──────────────────────┘

- ▼                     ▼
**┌─────────────────────────────────────────────────────────────┐**
- Application Configs                        │
- ┤
- Terminal Emulators (Alacritty, WezTerm)                  │
- Development Tools                                         │
- Window Managers                                          │
- Utility Scripts                                          │
- ┘

##### Important Elements to Highlight

- Template System (.tmpl files)
- Platform-specific scripts (.chezmoiscripts directory)
- Configuration hierarchy
- Cross-platform compatibility
- Utility scripts and tools

##### Implementation Details

- Version tags and update mechanisms

##### Maintenance Flows

Update and maintenance processes:
- GitHub Actions workflows
- Package management (cargo, pip, etc.)
- Configuration synchronization
- Backup mechanisms

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Management Layer"]
        CM[Chezmoi Manager]:::core
        TE[Template Engine]:::core
        FSM[File Structure Manager]:::core
    end

    subgraph Common["Common Configurations"]
        direction TB
        SC[Shell Configs]:::common
        EC[Editor Configs]:::common
        DT[Development Tools]:::common
    end

    subgraph Platform["Platform-Specific"]
        direction TB
        LS[Linux Scripts]:::platform
        WS[Windows Scripts]:::platform
        WSLC[WSL Configs]:::platform
        MAC[macOS Configs]:::platform
    end

    subgraph Apps["Application Configurations"]
        direction TB
        TE_Apps[Terminal Emulators]:::apps
        WM[Window Managers]:::apps
        Utils[Utility Scripts]:::apps
    end

    CM --> SC
    CM --> EC
    CM --> DT
    CM --> Platform
    CM --> Apps

    subgraph Shell["Shell Environments"]
        direction TB
        Fish[Fish Shell]:::shell
        Zsh[Zsh Shell]:::shell
        Bash[Bash Shell]:::shell
        PS[PowerShell]:::shell
    end

    subgraph Editors["Editor Setup"]
        direction TB
        NV[Neovim]:::editor
        Vim[Vim]:::editor
        Emacs[Emacs]:::editor
    end

    subgraph Terms["Terminal Setup"]
        direction TB
        AL[Alacritty]:::terminal
        WZ[WezTerm]:::terminal
        KT[Kitty]:::terminal
    end

    SC --> Shell
    EC --> Editors
    TE_Apps --> Terms
    
    classDef core fill:#2374ab
    classDef common fill:#57a773
    classDef platform fill:#ff8c42
    classDef apps fill:#9b5de5
    classDef shell fill:#45b7d1
    classDef editor fill:#4a90e2
    classDef terminal fill:#bb86fc

    click CM "https://github.com/mimikun/dotfiles/blob/master/.chezmoi.toml.tmpl"
    click FSM "https://github.com/mimikun/dotfiles/tree/master/.chezmoiscripts/"
    click Fish "https://github.com/mimikun/dotfiles/tree/master/dot_config/fish/"
    click Zsh "https://github.com/mimikun/dotfiles/blob/master/dot_zshrc.tmpl"
    click Bash "https://github.com/mimikun/dotfiles/blob/master/dot_bashrc.tmpl"
    click PS "https://github.com/mimikun/dotfiles/tree/master/dot_config/powershell/"
    click NV "https://github.com/mimikun/dotfiles/tree/master/dot_config/nvim/"
    click Vim "https://github.com/mimikun/dotfiles/tree/master/dot_vim/"
    click Emacs "https://github.com/mimikun/dotfiles/tree/master/dot_emacs.d/"
    click AL "https://github.com/mimikun/dotfiles/tree/master/dot_config/alacritty/"
    click WZ "https://github.com/mimikun/dotfiles/tree/master/dot_config/wezterm/"
    click KT "https://github.com/mimikun/dotfiles/tree/master/dot_config/kitty/"
    click WM "https://github.com/mimikun/dotfiles/tree/master/dot_config/i3/"
    click LS "https://github.com/mimikun/dotfiles/tree/master/.chezmoiscripts/linux/"
    click WS "https://github.com/mimikun/dotfiles/tree/master/.chezmoiscripts/windows/"
    click WSLC "https://github.com/mimikun/dotfiles/tree/master/misc/wsl/"
    click MAC "https://github.com/mimikun/dotfiles/tree/master/.chezmoiscripts/macos/"
    click Utils "https://github.com/mimikun/dotfiles/tree/master/private_dot_local/bin/"
```
