# dan7h3x/lazydo architecture

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

- Interactive diagram: https://gitdiagram.com/dan7h3x/lazydo
- Repository: https://github.com/dan7h3x/lazydo

## Overview

##### Project Type and Purpose
- This is an open‐source Neovim plugin written in Lua, called “LazyDo.”
- Purpose: Provide an in‐editor, feature-rich task/todo manager with UI panels, storage backends, custom theming, and integrations (e.g., lualine).

##### File Structure Analysis
- Top‐level:
- README.md, LICENSE
- lua/lazydo/… (all source modules)
- Key directories/modules under lua/lazydo:
- init.lua – entry point, exposes public API
- config.lua – user options, defaults, validation
- core.lua – orchestrator: bootstraps plugin, wires up commands/events
- ui.lua – handles floating windows, panels, input mappings
- storage.lua – persistence layer (global/project/custom modes)
- task.lua, types.lua – domain model: Task, Subtask, Metadata, Dates
- actions.lua – mapping of keypresses to commands (add, delete, edit)
- highlights.lua – UI styling definitions
- utils.lua – shared helper functions
- health.lua – plugin health checks, setup validations

##### README Insights
- Describes commands (LazyDoToggle, LazyDoPin, LazyDoToggleStorage) that drive the UI
- Highlights integration points (lazy.nvim for installation, lualine for status)

##### Essential Details to Capture
- How configuration flows into each submodule
- “lazy load” trigger from lazy.nvim (event: VeryLazy)
- Multiple storage modes (global vs. project) as subcomponents or toggles
- Lualine integration as an optional output path

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Systems
    Neovim["Neovim Host Environment"]:::external
    LazyNvim["lazy.nvim (Plugin Manager)"]:::external
    Lualine["lualine.nvim (Status Bar)"]:::external
    FS["File System (JSON/YAML files)"]:::data

    %% LazyDo Plugin
    subgraph "LazyDo Plugin"
        direction TB

        %% Configuration
        subgraph "Configuration Module"
            Config["config.lua"]:::controller
        end

        %% Controller Layer
        subgraph "Controller Layer"
            Init["init.lua"]:::controller
            Core["core.lua"]:::controller
            Actions["actions.lua"]:::controller
        end

        %% Model Layer
        subgraph "Model Layer"
            Task["task.lua"]:::model
            Types["types.lua"]:::model
            Storage["storage.lua"]:::data
        end

        %% UI Layer
        subgraph "UI Layer"
            UI["ui.lua"]:::ui
            Highlights["highlights.lua"]:::ui
        end

        %% Utilities & Health
        subgraph "Utilities"
            Utils["utils.lua"]:::util
            Health["health.lua"]:::util
        end
    end

    %% Relationships
    LazyNvim -->|"triggers VeryLazy event"| Init
    Neovim -->|"user commands/keymaps"| Actions
    Actions -->|"calls"| Core
    Core -->|"uses Task API"| Task
    Core -->|"uses Type definitions"| Types
    Core -->|"persists data via"| Storage
    Storage -->|"reads/writes"| FS
    Storage -->|"returns task list"| Core
    Core -->|"sends data to"| UI
    UI -->|"renders via Neovim API"| Neovim
    Config -.->|"injected config"| Core
    Config -.->|"injected config"| UI
    Config -.->|"injected config"| Storage
    Core -.->|"optional integration"| Lualine

    %% Click Events
    click Init "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/init.lua"
    click Config "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/config.lua"
    click Core "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/core.lua"
    click Actions "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/actions.lua"
    click Storage "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/storage.lua"
    click Task "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/task.lua"
    click Types "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/types.lua"
    click Utils "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/utils.lua"
    click Highlights "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/highlights.lua"
    click Health "https://github.com/dan7h3x/lazydo/blob/main/lua/lazydo/health.lua"

    %% Styles
    classDef external fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef controller fill:#b2f2bb,stroke:#333,stroke-width:1px
    classDef model fill:#fff3bf,stroke:#333,stroke-width:1px
    classDef ui fill:#cfe2ff,stroke:#333,stroke-width:1px
    classDef data fill:#ffd8a8,stroke:#333,stroke-width:1px
    classDef util fill:#ffd1dc,stroke:#333,stroke-width:1px
```
