# arnested/drupal-mode architecture

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

- Interactive diagram: https://gitdiagram.com/arnested/drupal-mode
- Repository: https://github.com/arnested/drupal-mode

## Overview

##### Main Components Structure

Create three main vertical layers:
- Top Layer: Core Component
- Middle Layer: Feature Modules
- Bottom Layer: External Integrations

##### Core Component (Top Layer)
- "drupal-mode.el" as the central component
- It connecting downward to all feature modules

##### Feature Modules (Middle Layer)
Modules into logical clusters:

a. Code Quality Cluster:
- phpcs.el
- flycheck.el
- flymake-phpcs.el
- ispell.el

b. Navigation & Search Cluster:
- etags.el
- ggtags.el
- gtags.el
- gxref.el
- helm-gtags.el

c. Development Tools Cluster:
- autoinsert.el
- eldoc.el
- pcomplete.el
- emacs-drush.el

d. Utility Cluster:
- webjump.el

##### External Integrations (Bottom Layer)
Integration with external tools:
- Drush
- PHP CodeSniffer
- GNU Global
- Ispell/Aspell/Hunspell
- TAGS system

##### Additional Elements
- A small documentation block showing supported Drupal versions
- A note about the minor mode nature and its ability to work with multiple major modes
- Integration points with Emacs core features

Specific Styling Guidelines:
- Use rectangles for core components
- Use rounded rectangles for feature modules
- Use hexagons for external systems
- Blue tones: Core components
- Green tones: Feature modules
- Gray tones: External systems
- Orange: Integration points

##### The project's focus on Drupal development standards and tools

Remember to include a title "Drupal Mode Architecture" and a version number to help with documentation maintenance.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Title
    title[("Drupal Mode Architecture")]:::title

    %% Core Component
    DM["drupal-mode.el"]:::core
    click DM "https://github.com/arnested/drupal-mode/blob/develop/drupal-mode.el"

    %% Feature Module Clusters
    subgraph CodeQuality["Code Quality Tools"]
        PHPCS["phpcs.el"]:::module
        FC["flycheck.el"]:::module
        FM["flymake-phpcs.el"]:::module
        IS["ispell.el"]:::module
        click PHPCS "https://github.com/arnested/drupal-mode/blob/develop/drupal/phpcs.el"
        click FC "https://github.com/arnested/drupal-mode/blob/develop/drupal/flycheck.el"
        click FM "https://github.com/arnested/drupal-mode/blob/develop/drupal/flymake-phpcs.el"
        click IS "https://github.com/arnested/drupal-mode/blob/develop/drupal/ispell.el"
    end

    subgraph Navigation["Navigation & Search"]
        ET["etags.el"]:::module
        GGT["ggtags.el"]:::module
        GT["gtags.el"]:::module
        GX["gxref.el"]:::module
        HGT["helm-gtags.el"]:::module
        click ET "https://github.com/arnested/drupal-mode/blob/develop/drupal/etags.el"
        click GGT "https://github.com/arnested/drupal-mode/blob/develop/drupal/ggtags.el"
        click GT "https://github.com/arnested/drupal-mode/blob/develop/drupal/gtags.el"
        click GX "https://github.com/arnested/drupal-mode/blob/develop/drupal/gxref.el"
        click HGT "https://github.com/arnested/drupal-mode/blob/develop/drupal/helm-gtags.el"
    end

    subgraph DevTools["Development Tools"]
        AI["autoinsert.el"]:::module
        ED["eldoc.el"]:::module
        PC["pcomplete.el"]:::module
        DR["emacs-drush.el"]:::module
        click AI "https://github.com/arnested/drupal-mode/blob/develop/drupal/autoinsert.el"
        click ED "https://github.com/arnested/drupal-mode/blob/develop/drupal/eldoc.el"
        click PC "https://github.com/arnested/drupal-mode/blob/develop/drupal/pcomplete.el"
        click DR "https://github.com/arnested/drupal-mode/blob/develop/drupal/emacs-drush.el"
    end

    subgraph Utility["Utility Tools"]
        WJ["webjump.el"]:::module
        click WJ "https://github.com/arnested/drupal-mode/blob/develop/drupal/webjump.el"
    end

    %% External Systems
    subgraph External["External Integrations"]
        DRUSH[("Drush")]:::external
        PCODESNIFF[("PHP CodeSniffer")]:::external
        GNUTOOLS[("GNU Global")]:::external
        SPELL[("Ispell/Aspell")]:::external
        TAGSYS[("TAGS System")]:::external
    end

    %% Additional Components
    TEST["drupal-tests.el"]:::testing
    DMM["drush-make-mode.el"]:::additional
    click TEST "https://github.com/arnested/drupal-mode/blob/develop/drupal-tests.el"
    click DMM "https://github.com/arnested/drupal-mode/blob/develop/drush-make-mode.el"

    %% Connections
    DM --> CodeQuality
    DM --> Navigation
    DM --> DevTools
    DM --> Utility
    DM --> TEST
    DM --> DMM

    PHPCS -.-> PCODESNIFF
    FM -.-> PCODESNIFF
    DR -.-> DRUSH
    GGT & GT & HGT -.-> GNUTOOLS
    IS -.-> SPELL
    ET -.-> TAGSYS

    %% Styles
    classDef title fill:#f9f,stroke:#333,stroke-width:4px
    classDef core fill:#2b5797,stroke:#333,color:#fff
    classDef module fill:#00a300,stroke:#333
    classDef external fill:#647687,stroke:#333
    classDef testing fill:#ff8c00,stroke:#333
    classDef additional fill:#2d89ef,stroke:#333

    %% Legend
    subgraph Legend
        L1[Core Component]:::core
        L2[Feature Module]:::module
        L3[External System]:::external
        L4[Testing Component]:::testing
        L5[Additional Mode]:::additional
    end
```
