# jfred/dotfiles architecture

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

## Overview

Key Components to Include:

##### Core System Structure
- Installation script (install.sh) as a primary entry point
- "topics" directory as the main configuration container

##### Topic Organization (use a hierarchical structure)
- Topics into logical categories:
- Development Tools (vim, nvim, git, java, python, clojure)
- System Configuration (zsh, bash, system)
- OS-Specific (osx, ubuntu)
- Terminal Tools (tmux, direnv)
- Utility Scripts (util, ops)

##### Installation Flow
- Installation process flow:
- Initial setup (Homebrew installation for OSX)
- Topic discovery and processing
- Symlink creation
- Post-installation hooks

##### Configuration Management
- Demonstrate how local configurations (.localrc) integrate
- Symlink structure between topics and home directory
- Override/customization points

- Layer 1: Installation and core management
- Layer 2: Topic organization
- Layer 3: Configuration files and symlinks
- Layer 4: Local customizations and overrides

##### Specific elements
- Environment variables (DOT_EXCLUDE)
- Post-initialization hooks (DOTFILES_POST_INIT)
- Symlink management system
- Homebrew integration

Important Relationships to Show:

##### Topic Dependencies
- How topics can depend on each other
- Shared resources (bin directories, common scripts)

##### Configuration Flow
- Demonstrate how global configs merge with local overrides
- Precedence order of configurations

##### System Integration
- How the dotfiles integrate with the host system
- Symlink relationships to the home directory

Keep the following in mind:
- Maintain a clear separation between installation and runtime components
- Extensibility points for adding new topics
- Configuration override mechanisms
- Where user customization can occur

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        DM[Dotfiles Manager]:::core
        IS[Installation Script]:::core
        TC[Topics Container]:::core
    end

    subgraph "Development Tools"
        VIM[Vim]:::dev
        NVIM[Neovim]:::dev
        GIT[Git]:::dev
        JAVA[Java]:::dev
        PY[Python]:::dev
        CLJ[Clojure]:::dev
    end

    subgraph "System Configuration"
        ZSH[ZSH]:::system
        BASH[Bash]:::system
        SYS[System]:::system
    end

    subgraph "OS Specific"
        OSX[OSX]:::os
        UBUNTU[Ubuntu]:::os
    end

    subgraph "Terminal Tools"
        TMUX[Tmux]:::terminal
        DIRENV[Direnv]:::terminal
    end

    subgraph "Utilities"
        OPS[Operations]:::util
        UTIL[Utilities]:::util
    end

    subgraph "Configuration Management"
        LOCALRC[Local Config]:::config
        BIN[Binary Tools]:::config
        EXTRA[Extra Resources]:::config
    end

    DM --> TC
    IS --> DM
    TC --> |Topics| VIM & NVIM & GIT & JAVA & PY & CLJ
    TC --> |Topics| ZSH & BASH & SYS
    TC --> |Topics| OSX & UBUNTU
    TC --> |Topics| TMUX & DIRENV
    TC --> |Topics| OPS & UTIL

    DM --> LOCALRC
    DM --> BIN
    DM --> EXTRA

    %% Click events for component mapping
    click IS "https://github.com/jfred/dotfiles/blob/main/install.sh"
    click TC "https://github.com/jfred/dotfiles/tree/main/topics/"
    click VIM "https://github.com/jfred/dotfiles/tree/main/topics/vim/"
    click NVIM "https://github.com/jfred/dotfiles/tree/main/topics/nvim/"
    click GIT "https://github.com/jfred/dotfiles/tree/main/topics/git/"
    click JAVA "https://github.com/jfred/dotfiles/tree/main/topics/java/"
    click PY "https://github.com/jfred/dotfiles/tree/main/topics/python/"
    click CLJ "https://github.com/jfred/dotfiles/tree/main/topics/clojure/"
    click ZSH "https://github.com/jfred/dotfiles/tree/main/topics/zsh/"
    click BASH "https://github.com/jfred/dotfiles/tree/main/topics/bash/"
    click SYS "https://github.com/jfred/dotfiles/tree/main/topics/system/"
    click OSX "https://github.com/jfred/dotfiles/tree/main/topics/osx/"
    click UBUNTU "https://github.com/jfred/dotfiles/tree/main/topics/ubuntu/"
    click TMUX "https://github.com/jfred/dotfiles/tree/main/topics/tmux/"
    click DIRENV "https://github.com/jfred/dotfiles/tree/main/topics/direnv/"
    click OPS "https://github.com/jfred/dotfiles/tree/main/topics/ops/"
    click UTIL "https://github.com/jfred/dotfiles/tree/main/topics/util/"
    click LOCALRC "https://github.com/jfred/dotfiles/tree/main/extras/osx/local_rc"
    click BIN "https://github.com/jfred/dotfiles/tree/main/bin/"
    click EXTRA "https://github.com/jfred/dotfiles/tree/main/extras/"

    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef dev fill:#2ecc71,stroke:#27ae60,color:white
    classDef system fill:#e67e22,stroke:#d35400,color:white
    classDef os fill:#9b59b6,stroke:#8e44ad,color:white
    classDef terminal fill:#34495e,stroke:#2c3e50,color:white
    classDef util fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef config fill:#1abc9c,stroke:#16a085,color:white
```
