# toandaominh1997/dotfiles architecture

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

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

## Overview

##### Main Components
- Installation & Setup Layer
– setup.sh (and its upgrade functionality) is the primary entry point that installs/updates the dotfiles into the user’s home directory.
– Git commands (in the README) for cloning and updating the repository.

- Source Configuration Components
– Vim/nvim: Everything under the “vim” directory including deep configurations (Lua modules for LSP, Telescope, Treesitter, etc.).
– tmux: Files under the “tmux” directory (config.tmux, statusline.tmux).
– zsh: The “zsh” folder that contains the configuration (config.zsh), which integrates with oh-my-zsh.
– shell alternatives: fish (fish/config.fish) as an alternate shell configuration, plus related configs like in “brew”, “starship”, and “wezterm”.

- CI & Version Control
– The “.github” directory sets up CI workflows (main.yml, native_dotfiles.yml) to test and validate configurations.
– .gitignore ensures unnecessary files are not tracked.

- Documentation & Utility Scripts
– “utils” holds utility scripts (e.g., test.sh) supporting setup or tests.

##### Detail the Relationships and Interactions
- The central dotfiles repository acts as a source of truth for all configuration files.
- The setup.sh script automates the deployment of configurations to the user's environment.
- Once installed, different applications (Vim/nvim, tmux, zsh, fish, wezterm, starship) load their specific configuration files from their respective folders.
- GitHub workflows run on the repo (e.g., via main.yml) to ensure quality and possibly trigger updates for supported components.
- The README guides users on how to update and interact with these configurations, linking together usage instructions with the system components.

##### Architectural Patterns and Design Principles
- Modular Design: Each configuration (vim, tmux, zsh, etc.) is kept in its own directory, allowing for independent updates and easy troubleshooting.
- Automation: Setup and CI scripts ensure a consistent deployment and maintenance process.
- Separation of Concerns: Distinct directories for each "service" (e.g., editor, terminal multiplexer, shell) help decouple configurations.
- Extensibility: The extensive configuration within Vim (with Lua modules) shows a pattern where plugins, LSP, and other editor integrations are modularized.

## Diagram (Mermaid)

```mermaid
graph TD
    A["Dotfiles Repository"]:::central
    B["Installation Script – setup.sh"]:::install
    C["Vim/nvim Config"]:::config
    D["tmux Config"]:::config
    E["zsh/oh-my-zsh Config"]:::config
    F["Fish Shell Config"]:::config
    G["Starship Config"]:::config
    H["Wezterm Config"]:::config
    I["Brew Config"]:::config
    J["CI & Automation (GitHub Workflows)"]:::workflow
    K["Documentation (docs/ & README)"]:::doc
    L["Utility Scripts (utils)"]:::doc

    A -->|"clones"| B
    B -->|"deploys"| C
    B -->|"deploys"| D
    B -->|"deploys"| E
    B -->|"deploys"| F
    B -->|"deploys"| G
    B -->|"deploys"| H
    B -->|"deploys"| I
    A -->|"sourced"| C
    A -->|"sourced"| D
    A -->|"sourced"| E
    A -->|"sourced"| F
    A -->|"sourced"| G
    A -->|"sourced"| H
    A -->|"sourced"| I

    A -->|"monitors"| J
    A -->|"guides"| K
    A -->|"supports"| L

    click B "https://github.com/toandaominh1997/dotfiles/blob/master/setup.sh"
    click C "https://github.com/toandaominh1997/dotfiles/tree/master/vim/"
    click D "https://github.com/toandaominh1997/dotfiles/tree/master/tmux/"
    click E "https://github.com/toandaominh1997/dotfiles/blob/master/zsh/config.zsh"
    click F "https://github.com/toandaominh1997/dotfiles/blob/master/fish/config.fish"
    click G "https://github.com/toandaominh1997/dotfiles/blob/master/starship/starship.toml"
    click H "https://github.com/toandaominh1997/dotfiles/blob/master/wezterm/wezterm.lua"
    click I "https://github.com/toandaominh1997/dotfiles/blob/master/brew/application.sh"
    click J "https://github.com/toandaominh1997/dotfiles/tree/master/.github/workflows/"
    click K "https://github.com/toandaominh1997/dotfiles/tree/master/docs/"
    click L "https://github.com/toandaominh1997/dotfiles/blob/master/utils/test.sh"

    classDef central fill:#D3D3D3,stroke:#333,stroke-width:2px;
    classDef install fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef config fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef workflow fill:#FFB6C1,stroke:#333,stroke-width:2px;
    classDef doc fill:#FFD700,stroke:#333,stroke-width:2px;
```
