# meow-edit/meow architecture

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

## Overview

##### Main Components Identification
The system should be divided into these core components:

a) Core Engine Layer:
- Represented by meow-core.el
- This is the foundation of the modal editing system

b) Feature Modules Layer:
- Command Module (meow-command.el)
- Visual Module (meow-visual.el)
- Keypad Module (meow-keypad.el)
- Thing Module (meow-thing.el)
- Beacon Module (meow-beacon.el)

c) Support Layer:
- Helper Module (meow-helpers.el)
- Utility Module (meow-util.el)
- Variables Module (meow-var.el)
- Face Module (meow-face.el)

d) Integration Layer:
- Keymap Module (meow-keymap.el)
- Shims Module (meow-shims.el)
- ESC handling (meow-esc.el)

e) User Interface Layer:
- Cheatsheet Module (meow-cheatsheet.el, meow-cheatsheet-layout.el)
- Tutorial Module (meow-tutor.el)

##### Component Relationships

- All modules ultimately depend on core and variables
- Integration layer connects with Emacs native functions

##### Additional Details

Annotations for:
- No external dependencies (important feature)
- Modal state management
- Keyboard layout adaptation system
- Command flow pathways

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef core fill:#b3d9ff,stroke:#333
    classDef feature fill:#90EE90,stroke:#333
    classDef support fill:#FFE5B4,stroke:#333
    classDef integration fill:#FFA07A,stroke:#333
    classDef ui fill:#DDA0DD,stroke:#333

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Feature Modules]:::feature
        L3[Support Modules]:::support
        L4[Integration Components]:::integration
        L5[UI Components]:::ui
    end

    %% UI Layer
    subgraph UI
        CHEAT[Cheatsheet System]:::ui
        TUT[Tutorial System]:::ui
        LAYOUT[Layout Support]:::ui
    end
    click CHEAT "https://github.com/meow-edit/meow/blob/master/meow-cheatsheet.el"
    click TUT "https://github.com/meow-edit/meow/blob/master/meow-tutor.el"

    %% Integration Layer
    subgraph Integration
        KEYMAP[Keymap Module]:::integration
        SHIMS[Shims Module]:::integration
        ESC[ESC Handler]:::integration
    end
    click KEYMAP "https://github.com/meow-edit/meow/blob/master/meow-keymap.el"
    click SHIMS "https://github.com/meow-edit/meow/blob/master/meow-shims.el"
    click ESC "https://github.com/meow-edit/meow/blob/master/meow-esc.el"

    %% Support Layer
    subgraph Support
        HELP[Helper Module]:::support
        UTIL[Utility Module]:::support
        VAR[Variables Module]:::support
        FACE[Face Module]:::support
    end
    click HELP "https://github.com/meow-edit/meow/blob/master/meow-helpers.el"
    click UTIL "https://github.com/meow-edit/meow/blob/master/meow-util.el"
    click VAR "https://github.com/meow-edit/meow/blob/master/meow-var.el"
    click FACE "https://github.com/meow-edit/meow/blob/master/meow-face.el"

    %% Feature Modules Layer
    subgraph Features
        CMD[Command Module]:::feature
        VIS[Visual Module]:::feature
        KPD[Keypad Module]:::feature
        THING[Thing Module]:::feature
        BEACON[Beacon Module]:::feature
    end
    click CMD "https://github.com/meow-edit/meow/blob/master/meow-command.el"
    click VIS "https://github.com/meow-edit/meow/blob/master/meow-visual.el"
    click KPD "https://github.com/meow-edit/meow/blob/master/meow-keypad.el"
    click THING "https://github.com/meow-edit/meow/blob/master/meow-thing.el"
    click BEACON "https://github.com/meow-edit/meow/blob/master/meow-beacon.el"

    %% Core Layer
    CORE[Core Engine]:::core
    MAIN[Main Package Entry]:::core
    click CORE "https://github.com/meow-edit/meow/blob/master/meow-core.el"
    click MAIN "https://github.com/meow-edit/meow/blob/master/meow.el"

    %% Relationships
    MAIN --> CORE
    CORE --> Features
    CORE --> Support
    Features --> Support
    Integration --> CORE
    Integration --> Features
    UI --> Integration
    UI --> Features
    UI --> Support

    %% Additional Dependencies
    VAR --> CORE
    CMD --> CORE
    KEYMAP --> CMD
    SHIMS --> CMD
    ESC --> CMD
    CHEAT --> KEYMAP
    TUT --> KEYMAP
    LAYOUT --> KEYMAP
```
