# istresearch/kibana-object-format architecture

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

- Interactive diagram: https://gitdiagram.com/istresearch/kibana-object-format
- Repository: https://github.com/istresearch/kibana-object-format

## Overview

##### Main Components

a. Plugin Core Components:
- It to two main subsystems: Public and Server sides

b. Public Side (Frontend):
- Custom Filter Manager
- Field Mapper
- Field Template Updater
- An "Object Field Format" component with:
- Format Editor
- Templates Handler
- Object Field Filter

c. Server Side:
- A minimal server component as it mainly handles plugin registration

##### Supporting Systems

a. Utils Layer:
- System
- String Formatting
- Path Management
- UUID Generation

b. Integration Points:
- Connection points to Kibana's:
- Index Pattern Management
- Advanced Settings
- Discover Tab
- Search Tables

##### Data Flow Representation

- Configuration flow from Advanced Settings to Field Mapper
- Field formatting flow from Object Field Format to Discover/Search displays
- Filter management flow between Custom Filter Manager and Kibana's filter system

##### Specific Implementation Details

- Template System (showing the five HTML templates)
- System (showing the four highlight-related modules)
- Field Mapping Configuration (showing the index pattern mapping system)

##### Component Relationships

Key relationships:
- How the Field Mapper connects to Kibana's index pattern management
- How the Object Field Format integrates with Kibana's display system
- How the Custom Filter Manager extends Kibana's filtering capabilities

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Legend"
        L1[Public Component]:::public
        L2[Server Component]:::server
        L3[Utils Component]:::utils
        L4[Integration Point]:::integration
        L5[Template System]:::template
    end

    subgraph "Plugin Core"
        PR["Plugin Registry"]:::core
        click PR "https://github.com/istresearch/kibana-object-format/blob/master/public/plugin.ts"
    end

    subgraph "Public Side"
        subgraph "Bootstrap Module"
            BM["Bootstrap Module"]
            CFM["Custom Filter Manager"]:::public
            FM["Field Mapper"]:::public
            FTU["Field Template Updater"]:::public
            click CFM "https://github.com/istresearch/kibana-object-format/tree/master/public/bootstrap/custom_filter_manager/"
            click FM "https://github.com/istresearch/kibana-object-format/blob/master/public/bootstrap/fieldMapper.ts"
            click FTU "https://github.com/istresearch/kibana-object-format/blob/master/public/bootstrap/updateFieldTemplate.ts"
        end

        subgraph "Object Field Format"
            OFF["Object Field Format"]:::public
            FE["Format Editor"]:::public
            TH["Templates Handler"]:::template
            OFFilter["Object Field Filter"]:::public
            click OFF "https://github.com/istresearch/kibana-object-format/blob/master/public/object_field/ObjectFieldFormat.ts"
            click FE "https://github.com/istresearch/kibana-object-format/blob/master/public/object_field/ObjectFieldFormatEditor.tsx"
            click OFFilter "https://github.com/istresearch/kibana-object-format/blob/master/public/object_field/objectFieldFilter.ts"
            click TH "https://github.com/istresearch/kibana-object-format/tree/master/public/object_field/templates/"
        end
    end

    subgraph "Server Side"
        SP["Server Plugin"]:::server
        ST["Server Types"]:::server
        click SP "https://github.com/istresearch/kibana-object-format/blob/master/server/plugin.ts"
        click ST "https://github.com/istresearch/kibana-object-format/blob/master/server/types.ts"
    end

    subgraph "Utils Layer"
        HS["Highlight System"]:::utils
        SF["String Formatting"]:::utils
        PM["Path Management"]:::utils
        UUID["UUID Generation"]:::utils
        click HS "https://github.com/istresearch/kibana-object-format/tree/master/public/utils/highlight/"
        click SF "https://github.com/istresearch/kibana-object-format/blob/master/public/utils/asPrettyString.ts"
        click PM "https://github.com/istresearch/kibana-object-format/blob/master/public/utils/getFullPath.ts"
        click UUID "https://github.com/istresearch/kibana-object-format/blob/master/public/utils/uuidGenerator.ts"
    end

    subgraph "Integration Points"
        IPM["Index Pattern Management"]:::integration
        AS["Advanced Settings"]:::integration
        DT["Discover Tab"]:::integration
        ST2["Search Tables"]:::integration
    end

    subgraph "Supporting Systems"
        I18N["Translations"]:::utils
        CSS["Styling System"]:::utils
        Types["Type Definitions"]:::utils
        click I18N "https://github.com/istresearch/kibana-object-format/blob/master/translations/ja-JP.json"
        click Types "https://github.com/istresearch/kibana-object-format/blob/master/public/types.ts"
    end

    PR --> BM
    PR --> SP
    BM --> CFM
    BM --> FM
    BM --> FTU
    FM --> IPM
    OFF --> FE
    OFF --> TH
    OFF --> OFFilter
    CFM --> DT
    OFF --> DT
    OFF --> ST2
    AS --> FM
    HS --> OFF
    SF --> OFF
    PM --> OFF
    UUID --> OFF

    classDef public fill:#3498db
    classDef server fill:#2ecc71
    classDef utils fill:#f1c40f
    classDef integration fill:#e74c3c
    classDef template fill:#9b59b6
    classDef core fill:#34495e
```
