# eichisanden/redmine_markdown_task_list architecture

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

- Interactive diagram: https://gitdiagram.com/eichisanden/redmine_markdown_task_list
- Repository: https://github.com/eichisanden/redmine_markdown_task_list

## Overview

- Plugin Integration Layer: Emphasize that this code is a plugin that extends Redmine. Illustrate that it hooks into the existing Redmine/Rails system.
- Application Components in the Plugin:
- Controllers (app/controllers): Responsible for handling HTTP requests if any specific actions are added.
- Models (app/models): Likely holds data-related logic if the plugin stores any special state or records. Although currently the models folder is empty (only a .gitkeep), note its existence.
- Views (app/views): Contains the UI partials or views used in the plugin, even if these are currently placeholders.
- Helpers (app/helpers): Provides view-related helpers that probably assist with formatting or generating the checkbox elements.
- Assets Folder (assets): This directory contains images, JavaScript, and stylesheet assets that possibly style the checkboxes or add client-side functionalities.
- Configuration and Localization (config):
- Routes (config/routes.rb): Define any plugin-specific routes that expose controller endpoints.
- Locales (config/locales/en.yml): Handles internationalization.
- Database Integration (db): Includes migrations if the plugin needs to store or change any database schema; though details are not visible here.
- Library Code (lib):
- The main plugin logic is in lib/markdown_task_list_plugin.rb.
- Tasks (lib/tasks): Likely contains rake tasks for plugin maintenance or setup.
- Testing Suite (test): A well-organized test suite covering fixtures, functional, integration, unit tests, ensuring proper functionality.

##### Other Architectural Elements
- External Integration: Clearly denote that the plugin is installed into the Redmine installation (typically in the plugins folder) and interacts with Redmine’s core.
- Dependency and Build/Deployment: Include the configuration steps (installation instructions) that emphasize a simple git clone and a restart of Redmine.

##### Relationships and Interactions
- How the plugin’s components integrate with Redmine:
- The lib component hooks into Redmine’s markdown parser.
- The app layer (controllers/views/helpers) is served as part of any new pages or processing flows.
- The assets are incorporated for front-end styling or interactivity.
- Clearly point out dependencies among components (e.g., the markdown_task_list_plugin.rb in lib can be considered the core processing logic and is used by helper methods in app/helpers; the configuration routes point to controllers in app/controllers).

##### Detailed Architectural Patterns
- Adherence to standard Rails conventions, which will help in understanding how the plugin can be maintained or extended.

##### Final Design and Execution
- Top left: "app" (controllers, models, views, helpers)
- Top right: "assets" for front-end resources
- Bottom left: "config" (routes, locales)
- Bottom center: "lib" for core logic
- Bottom right: "db" and "test" for migrations and validations

## Diagram (Mermaid)

```mermaid
flowchart TD
    UMI["User Markdown Input"]:::input
    EX["Redmine Core"]:::external
    PIntegration["Plugin Integration Layer"]:::plugin

    EX -->|"integrates"| PIntegration
    UMI -->|"submitMarkdown"| PIntegration

    subgraph "App Components"
        Controller["Controller Layer"]:::controller
        Model["Model Layer"]:::model
        View["View Layer"]:::view
        Helper["Helper Layer"]:::helper
    end

    subgraph "Assets & Config"
        Assets["Assets"]:::assets
        subgraph "Configuration"
            Routes["Routes"]:::config
            Locales["Locales"]:::config
        end
        Assets -->|"contains"| AImages["Images"]:::assets
        Assets -->|"contains"| AJS["Javascripts"]:::assets
        Assets -->|"contains"| ACSS["Stylesheets"]:::assets
    end

    subgraph "Library & Tasks"
        Library["Library Code"]:::library
        Tasks["Tasks (Rake)"]:::library
    end

    subgraph "Infrastructure"
        Database["Database Integration"]:::database
        Testing["Testing Suite"]:::testing
    end

    PIntegration -->|"hooksTo"| Controller
    PIntegration -->|"hooksTo"| Helper
    PIntegration -->|"integrates"| Library
    Controller -->|"renders"| View
    Helper -->|"assists"| View
    Library -->|"processesMarkdown"| Helper
    Library -->|"processesMarkdown"| Controller
    Controller -->|"storesData"| Database
    PIntegration -->|"servesAssets"| Assets
    PIntegration -->|"configRoutes"| Routes
    PIntegration -->|"verifiedBy"| Testing
    Library -->|"includes"| Tasks

    click PIntegration "https://github.com/eichisanden/redmine_markdown_task_list/blob/main/init.rb"
    click Controller "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/app/controllers"
    click Model "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/app/models"
    click View "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/app/views"
    click Helper "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/app/helpers"
    click Assets "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/assets"
    click AImages "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/assets/images"
    click AJS "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/assets/javascripts"
    click ACSS "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/assets/stylesheets"
    click Routes "https://github.com/eichisanden/redmine_markdown_task_list/blob/main/config/routes.rb"
    click Locales "https://github.com/eichisanden/redmine_markdown_task_list/blob/main/config/locales/en.yml"
    click Database "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/db/migrate"
    click Library "https://github.com/eichisanden/redmine_markdown_task_list/blob/main/lib/markdown_task_list_plugin.rb"
    click Tasks "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/lib/tasks"
    click Testing "https://github.com/eichisanden/redmine_markdown_task_list/tree/main/test"

    classDef external fill:#f9f,stroke:#333,stroke-width:2px;
    classDef plugin fill:#ccf,stroke:#333,stroke-width:2px;
    classDef controller fill:#fcf,stroke:#333,stroke-width:2px;
    classDef helper fill:#cff,stroke:#333,stroke-width:2px;
    classDef model fill:#cfc,stroke:#333,stroke-width:2px;
    classDef view fill:#ffc,stroke:#333,stroke-width:2px;
    classDef assets fill:#efe,stroke:#333,stroke-width:2px;
    classDef config fill:#fee,stroke:#333,stroke-width:2px;
    classDef database fill:#eef,stroke:#333,stroke-width:2px;
    classDef library fill:#ddd,stroke:#333,stroke-width:2px;
    classDef testing fill:#fdd,stroke:#333,stroke-width:2px;
    classDef input fill:#fee,stroke:#333,stroke-width:2px;
```
