# michaeljsmalley/dotfiles architecture

> Architecture diagram of the GitHub repository michaeljsmalley/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/michaeljsmalley/dotfiles
- Repository: https://github.com/michaeljsmalley/dotfiles

## Overview

##### Main Components

a) Source Components:
- Dotfiles Repository
- Configuration Files (vim, zsh, bash, X resources)
- Setup Script (makesymlinks.sh)
- External Dependency (oh-my-zsh repository)

b) Target Components:
- User's Home Directory
- Backup Directory (dotfiles_old)
- Shell Environment

##### Specific Elements

- Rectangles: Configuration files
- Hexagons: Directories
- Diamonds: Decision points in setup script

- Green: Source files
- Blue: Process actions
- Yellow: Decision points
- Gray: Backup locations
- Orange: External dependencies

##### Shell configuration
- ZSH installation check
- oh-my-zsh clone
- Shell change process

##### Important Details to Capture

- File relationships:
- Configuration file categories
- External dependencies (oh-my-zsh)

- Process flows:
- Backup mechanism
- Symlink creation
- Shell configuration
- Error handling paths

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Source Control Layer"
        GitRepo[("Dotfiles Repository")]
        
        subgraph "Configuration Files"
            ShellConfigs{"Shell Configs"}
            EditorConfigs{"Editor Configs"}
            WMConfigs{"Window Manager Configs"}
            
            ShellConfigs --> |contains| BashRC["bashrc"]:::file
            ShellConfigs --> |contains| ZshRC["zshrc"]:::file
            
            EditorConfigs --> |contains| VimDir["vim/"]:::directory
            EditorConfigs --> |contains| VimRC["vimrc"]:::file
            VimDir --> VimColors["vim/colors/"]:::directory
            VimDir --> VimSyntax["vim/syntax/"]:::directory
            
            WMConfigs --> |contains| XRes["Xresources"]:::file
            WMConfigs --> |contains| Scrotwm["scrotwm.conf"]:::file
        end
        
        SetupScript["makesymlinks.sh"]:::file
        GitIgnore[".gitignore"]:::file
        License["LICENSE"]:::file
        ReadMe["README.markdown"]:::file
    end
    
    subgraph "Setup Process Layer"
        Process{{"Setup Process"}}
        BackupCheck{{"Backup Check"}}
        ShellCheck{{"ZSH Check"}}
        
        Process -->|Execute| BackupCheck
        BackupCheck -->|If exists| CreateBackup[["Create Backup"]]
        BackupCheck -->|If new| CreateSymlinks[["Create Symlinks"]]
        Process -->|Verify| ShellCheck
        ShellCheck -->|If missing| InstallZSH[["Install ZSH"]]
        ShellCheck -->|Clone| OhMyZsh[("oh-my-zsh repo")]
    end
    
    subgraph "Target Environment Layer"
        HomeDir[("Home Directory")]
        BackupDir[("dotfiles_old/")]
        
        CreateBackup -.->|Backup| BackupDir
        CreateSymlinks -->|Deploy| HomeDir
    end
    
    GitRepo --> Process
    
    %% Click events for component mapping
    click SetupScript "https://github.com/michaeljsmalley/dotfiles/blob/master/makesymlinks.sh"
    click BashRC "https://github.com/michaeljsmalley/dotfiles/tree/master/bashrc"
    click ZshRC "https://github.com/michaeljsmalley/dotfiles/tree/master/zshrc"
    click VimDir "https://github.com/michaeljsmalley/dotfiles/tree/master/vim/"
    click VimRC "https://github.com/michaeljsmalley/dotfiles/tree/master/vimrc"
    click VimColors "https://github.com/michaeljsmalley/dotfiles/tree/master/vim/colors/"
    click VimSyntax "https://github.com/michaeljsmalley/dotfiles/tree/master/vim/syntax/"
    click XRes "https://github.com/michaeljsmalley/dotfiles/tree/master/Xresources"
    click Scrotwm "https://github.com/michaeljsmalley/dotfiles/blob/master/scrotwm.conf"
    click ReadMe "https://github.com/michaeljsmalley/dotfiles/blob/master/README.markdown"
    click GitIgnore "https://github.com/michaeljsmalley/dotfiles/blob/master/.gitignore"
    click License "https://github.com/michaeljsmalley/dotfiles/tree/master/LICENSE"
    
    %% Styling
    classDef file fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef directory fill:#87CEEB,stroke:#333,stroke-width:2px;
    classDef process fill:#FFB6C1,stroke:#333,stroke-width:2px;
    classDef external fill:#FFA500,stroke:#333,stroke-width:2px;
    
    %% Legend
    subgraph Legend
        L1[("Repository")]:::external
        L2["File"]:::file
        L3["Directory"]:::directory
        L4{{"Process"}}:::process
        L5[["Action"]]
    end
```
