# avinashkrsharma/dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This is a dotfiles repository—a developer environment provisioning tool.
- Purpose: Store and version-control a user’s shell and editor configurations (zsh, tmux, vim, VS Code) and automate their installation on a fresh Ubuntu system.

##### File structure
- Top-level items:
- .gitignore, .gitconfig – Git configuration
- README.md – setup instructions
- aliases, env-vars – shell helper scripts
- init.el, vimrc – Vim/Emacs configurations
- keybindings.json, settings.json – VS Code keybindings and settings
- themes/ – custom zsh theme files
- tmux-conf – tmux configuration
- ubuntu-install.sh – bootstrap script that applies all configurations
- Pattern: one central installer script orchestrates symlink creation or direct installation of each config block into the user’s home directory.

##### README for additional insights
- README simply instructs the user to run ubuntu-install.sh with sudo to bootstrap the environment.

##### Detail without overthinking
- Break the system into: Repo layer, Installation layer, Runtime layer.
- Config file as its own node under “Config Modules.”
- Flow: Clone → Install → Source at runtime.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Repository Layer
    subgraph "Repository Layer"
        Repo["Dotfiles Git Repository"]:::repo
        GitIgnore[".gitignore"]:::repo
        GitConfig[".gitconfig"]:::repo
        Readme["README.md"]:::repo
        UbuntuInstall["ubuntu-install.sh"]:::installer
        Zshrc["zshrc"]:::repo
        Aliases["aliases"]:::repo
        EnvVars["env-vars"]:::repo
        Themes["themes/"]:::repo
        TmuxConf["tmux-conf"]:::repo
        Vimrc["vimrc"]:::repo
        EmacsInit["init.el"]:::repo
        Keybindings["keybindings.json"]:::repo
        Settings["settings.json"]:::repo
    end

    %% Installation Layer
    subgraph "Installation Layer"
        UbuntuHost["Ubuntu Host CLI"]:::runtime
    end

    %% Runtime Layer
    subgraph "Runtime Layer"
        ShellStartup["Shell Startup"]:::runtime
        TmuxStartup["tmux Startup"]:::runtime
        EditorLaunch["Editor Launch"]:::runtime

        HomeZshrc["~/zshrc"]:::runtime
        HomeAliases["~/aliases"]:::runtime
        HomeEnvVars["~/env-vars"]:::runtime
        HomeThemes["~/themes/"]:::runtime
        HomeTmux["~/tmux.conf"]:::runtime
        HomeVimrc["~/.vimrc"]:::runtime
        HomeEmacs["~/.emacs.d/init.el"]:::runtime
        HomeKeybindings["~/.config/Code/User/keybindings.json"]:::runtime
        HomeSettings["~/.config/Code/User/settings.json"]:::runtime
    end

    %% Execution Flow
    UbuntuHost -->|"executes"| UbuntuInstall
    UbuntuInstall -->|"reads"| Zshrc
    UbuntuInstall -->|"reads"| Aliases
    UbuntuInstall -->|"reads"| EnvVars
    UbuntuInstall -->|"reads"| Themes
    UbuntuInstall -->|"reads"| TmuxConf
    UbuntuInstall -->|"reads"| Vimrc
    UbuntuInstall -->|"reads"| EmacsInit
    UbuntuInstall -->|"reads"| Keybindings
    UbuntuInstall -->|"reads"| Settings
    UbuntuInstall -->|"reads"| GitConfig
    UbuntuInstall -->|"reads"| GitIgnore
    UbuntuInstall -->|"reads"| Readme

    UbuntuInstall -->|"deploys"| HomeZshrc
    UbuntuInstall -->|"deploys"| HomeAliases
    UbuntuInstall -->|"deploys"| HomeEnvVars
    UbuntuInstall -->|"deploys"| HomeThemes
    UbuntuInstall -->|"deploys"| HomeTmux
    UbuntuInstall -->|"deploys"| HomeVimrc
    UbuntuInstall -->|"deploys"| HomeEmacs
    UbuntuInstall -->|"deploys"| HomeKeybindings
    UbuntuInstall -->|"deploys"| HomeSettings

    ShellStartup -->|"sources"| HomeEnvVars
    ShellStartup -->|"sources"| HomeAliases
    ShellStartup -->|"sources"| HomeThemes

    TmuxStartup -->|"loads"| HomeTmux

    EditorLaunch -->|"loads"| HomeVimrc
    EditorLaunch -->|"loads"| HomeEmacs
    EditorLaunch -->|"loads"| HomeKeybindings
    EditorLaunch -->|"loads"| HomeSettings

    %% Click Events
    click Repo "https://github.com/avinashkrsharma/dotfiles/tree/master/./"
    click UbuntuInstall "https://github.com/avinashkrsharma/dotfiles/blob/master/ubuntu-install.sh"
    click Zshrc "https://github.com/avinashkrsharma/dotfiles/tree/master/zshrc"
    click Aliases "https://github.com/avinashkrsharma/dotfiles/tree/master/aliases"
    click EnvVars "https://github.com/avinashkrsharma/dotfiles/tree/master/env-vars"
    click Themes "https://github.com/avinashkrsharma/dotfiles/tree/master/themes/"
    click TmuxConf "https://github.com/avinashkrsharma/dotfiles/tree/master/tmux-conf"
    click Vimrc "https://github.com/avinashkrsharma/dotfiles/tree/master/vimrc"
    click EmacsInit "https://github.com/avinashkrsharma/dotfiles/blob/master/init.el"
    click Keybindings "https://github.com/avinashkrsharma/dotfiles/blob/master/keybindings.json"
    click Settings "https://github.com/avinashkrsharma/dotfiles/blob/master/settings.json"
    click GitConfig "https://github.com/avinashkrsharma/dotfiles/blob/master/.gitconfig"
    click GitIgnore "https://github.com/avinashkrsharma/dotfiles/blob/master/.gitignore"
    click Readme "https://github.com/avinashkrsharma/dotfiles/blob/master/README.md"

    %% Styles
    classDef repo fill:#ffdada,stroke:#ff0000,stroke-width:1px
    classDef installer fill:#daffda,stroke:#00aa00,stroke-width:2px,stroke-dasharray: 5 5
    classDef runtime fill:#dadaff,stroke:#0000ff,stroke-width:1px
```
