# spywhere/dotfiles architecture

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

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

## Overview

##### Relationships and Flows

- Installation flow from install.sh to various components
- Package dependencies and relationships
- Configuration distribution paths
- Platform-specific adaptations

##### Key Architectural Elements

a. Platform Support Layer:
- How configs adapt to different OS (macos, linux)
- Platform-specific package handlers

b. Module System:
- Package installation scripts
- Configuration templates
- Support utilities

##### Integration Points

Connections for:
- External package managers (asdf)
- Third-party applications
- System services
- Custom binaries

##### Implementation Details

- Shell scripts (packages/*.sh)
- Configuration files (configs/*)
- Support scripts (supports/*)
- Binary tools (binaries/*)

##### Top Level Structure
- [Installation Manager]

- ┌──────┴──────┐

- ▼             ▼
- [Packages]  [Configs]

##### Configuration Flow
- [Config Templates] ──► [Platform Adapters] ──► [Local Configs]

##### Package Management
- [Package Scripts] ──► [Package Manager] ──► [System Installation]

##### Support Systems
- [Support Scripts] ◄──► [Main System]

- [User Environment]

Key Considerations:

##### Features
- Modularity
- Platform independence
- Custom tooling
- Configuration management

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core Components
    InstallMgr[Installation Manager]:::core
    PkgMgr[Package Manager]:::core
    ConfigMgr[Configuration Manager]:::core
    SetupMgr[Setup Manager]:::core
    SupportSys[Support Systems]:::core

    %% Platform Layer
    subgraph Platform
        MacOS[MacOS Support]:::platform
        Linux[Linux Support]:::platform
    end

    %% Configuration Domains
    subgraph Configs
        direction TB
        Shell[Shell Environment]
        DevTools[Development Tools]
        Terminal[Terminal Multiplexers]
        SysUtils[System Utilities]
        AppConfigs[Application Configs]
    end

    %% Integration Layer
    subgraph Integration
        direction TB
        ASDF[ASDF Manager]
        ExtTools[External Tools]
        CustomUtils[Custom Utilities]
    end

    %% Relationships
    InstallMgr --> PkgMgr
    InstallMgr --> ConfigMgr
    InstallMgr --> SetupMgr
    PkgMgr --> Platform
    ConfigMgr --> Platform
    Platform --> Configs
    Platform --> Integration
    SupportSys --> Configs
    SupportSys --> Integration

    %% Configuration Details
    Shell --> |ZSH|ZSH[ZSH Config]
    DevTools --> |NeoVim|NVIM[NeoVim Config]
    DevTools --> |VSCode|VSCODE[VSCode Config]
    DevTools --> |Git|GIT[Git Config]
    Terminal --> |TMux|TMUX[TMux Config]
    Terminal --> |Zellij|ZELLIJ[Zellij Config]
    SysUtils --> |Utils|UTILS[htop/bat/eza]
    AppConfigs --> |Terminal|TERM[Alacritty/Kitty]

    %% Styling
    classDef core fill:#3498db,stroke:#2980b9,stroke-width:2px
    classDef platform fill:#e74c3c,stroke:#c0392b,stroke-width:2px
    classDef config fill:#2ecc71,stroke:#27ae60,stroke-width:2px
    classDef integration fill:#9b59b6,stroke:#8e44ad,stroke-width:2px

    %% Click Events
    click InstallMgr "https://github.com/spywhere/dotfiles/blob/main/install.sh"
    click PkgMgr "https://github.com/spywhere/dotfiles/tree/main/packages/"
    click ConfigMgr "https://github.com/spywhere/dotfiles/tree/main/configs/"
    click SetupMgr "https://github.com/spywhere/dotfiles/tree/main/setup/"
    click SupportSys "https://github.com/spywhere/dotfiles/tree/main/supports/"
    click Shell "https://github.com/spywhere/dotfiles/tree/main/configs/zsh/"
    click NVIM "https://github.com/spywhere/dotfiles/tree/main/configs/nvim/"
    click VSCODE "https://github.com/spywhere/dotfiles/tree/main/configs/vscode/"
    click GIT "https://github.com/spywhere/dotfiles/tree/main/configs/git/"
    click TMUX "https://github.com/spywhere/dotfiles/tree/main/configs/tmux/"
    click ZELLIJ "https://github.com/spywhere/dotfiles/tree/main/configs/zellij/"
    click UTILS "https://github.com/spywhere/dotfiles/tree/main/configs/htop/"
    click TERM "https://github.com/spywhere/dotfiles/tree/main/configs/alacritty/"
    click MacOS "https://github.com/spywhere/dotfiles/blob/main/configs/git/gitconfig.macos"
    click CustomUtils "https://github.com/spywhere/dotfiles/tree/main/binaries/"
    click ASDF "https://github.com/spywhere/dotfiles/tree/main/configs/asdf/"
    click ExtTools "https://github.com/spywhere/dotfiles/tree/main/configs/starship/"

    %% Legend
    subgraph Legend
        direction TB
        L1[Core Components]:::core
        L2[Platform Layer]:::platform
        L3[Configuration]:::config
        L4[Integration]:::integration
    end
```
