# orange-cyberdefense/ocd-mindmaps architecture

> Architecture diagram of the GitHub repository orange-cyberdefense/ocd-mindmaps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/orange-cyberdefense/ocd-mindmaps
- Repository: https://github.com/orange-cyberdefense/ocd-mindmaps

## Overview

##### Project type and purpose
- The README and file layout show it is not a full-stack web app but a command-line generator for infosec mindmaps.

##### File structure
- Top-level:
- LICENSE, index.md, readme.md → documentation
- _config.yml → site config for GitHub Pages
- src/ → example XMind source
- excalimap/ → core Python package
- excalimap/:
- main.py → entrypoint/CLI
- config.py, utils.py → shared configuration and helpers
- parsermd.py, parserjson.py → two parser modules for Markdown and JSON sources
- output/ → output directory (placeholders)
- mindmap/ → example mindmap content (ad, example) with conf.yml + .md files
- doc/ → user documentation and images
- gen_all.sh, gen_all_svg.sh → orchestration scripts to batch-generate maps
- Dependencies:
- requirements.txt → Python dependencies

##### README for additional insights
- Minimal; points at the hosted mindmap site.

##### Elements
- Blue rectangles for modules/packages
- Green parallelograms for I/O (input files, output directory)

##### Final advice
- Be detailed: show each phase and how it hooks into the next.
- Configuration (config.py + conf.yml) as its own component since it influences parsing and rendering.
- Don’t overcomplicate: the strength of this tool is its linear pipeline and modularity.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input Layer
    subgraph "Input Layer"
        direction TB
        MD["Markdown Sources"]:::io
        XMind["XMind File"]:::io
        JSONSrc["JSON Sources"]:::io
    end

    %% Parser Layer
    subgraph "Parser Layer"
        direction TB
        MDParser["parsermd.py"]:::module
        JSONParser["parserjson.py"]:::module
    end

    %% Model Layer
    subgraph "Core Model Layer"
        direction TB
        Models["models Package"]:::module
        ConfigUtils["config.py & utils.py"]:::module
    end

    %% Renderer / Output Layer
    subgraph "Renderer & Output Layer"
        direction TB
        Renderer["Renderer"]:::module
        OutDir["output Directory"]:::io
    end

    %% CLI & Orchestration
    subgraph "CLI & Orchestration"
        direction TB
        CLI["main.py"]:::module
        GenAll["gen_all.sh"]:::script
        GenSVG["gen_all_svg.sh"]:::script
    end

    %% Configuration
    subgraph "Configuration"
        direction TB
        PackageConf["excalimap/config.py"]:::config
        ADConf["mindmap/ad/conf.yml"]:::config
        ExampleConf["mindmap/example/conf.yml"]:::config
        SiteConf["_config.yml"]:::config
    end

    %% Documentation & Assets
    subgraph "Documentation & Assets"
        direction TB
        Docs["doc Directory"]:::module
        Icons["icon Directory"]:::module
        RootDocs["README.md & index.md"]:::module
        PackageDocs["excalimap/README.md"]:::module
    end

    %% Connections
    MD -->|reads| MDParser
    JSONSrc -->|reads| JSONParser
    XMind -->|reads| MDParser
    MDParser -->|produces| Models
    JSONParser -->|produces| Models
    Models -->|uses| ConfigUtils
    Models -->|passes data| Renderer
    Renderer -->|writes| OutDir
    CLI -->|orchestrates| MDParser
    CLI -->|orchestrates| JSONParser
    CLI -->|orchestrates| Renderer
    GenAll -->|calls CLI| CLI
    GenSVG -->|calls CLI| CLI
    PackageConf -->|configures| MDParser
    PackageConf -->|configures| JSONParser
    ADConf -->|drives| MDParser
    ExampleConf -->|drives| MDParser
    SiteConf -->|site config| RootDocs
    Docs -->|reference| CLI
    Icons -->|assets for| Renderer
    RootDocs -->|intro| CLI
    PackageDocs -->|details| Models

    %% Click Events
    click MD "https://github.com/orange-cyberdefense/ocd-mindmaps/tree/main/excalimap/mindmap/"
    click XMind "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/src/Pentesting_Active_directory_dark.xmind"
    click MDParser "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/parsermd.py"
    click JSONParser "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/parserjson.py"
    click Models "https://github.com/orange-cyberdefense/ocd-mindmaps/tree/main/excalimap/models/"
    click ConfigUtils "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/config.py"
    click OutDir "https://github.com/orange-cyberdefense/ocd-mindmaps/tree/main/excalimap/output/"
    click CLI "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/main.py"
    click GenAll "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/gen_all.sh"
    click GenSVG "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/gen_all_svg.sh"
    click PackageConf "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/config.py"
    click ADConf "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/mindmap/ad/conf.yml"
    click ExampleConf "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/mindmap/example/conf.yml"
    click SiteConf "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/_config.yml"
    click Docs "https://github.com/orange-cyberdefense/ocd-mindmaps/tree/main/excalimap/doc/"
    click Icons "https://github.com/orange-cyberdefense/ocd-mindmaps/tree/main/excalimap/icon/"
    click RootDocs "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/README.md"
    click PackageDocs "https://github.com/orange-cyberdefense/ocd-mindmaps/blob/main/excalimap/README.md"

    %% Styles
    classDef io fill:#ccffcc,stroke:#006600,stroke-width:1px
    classDef module fill:#cce5ff,stroke:#003399,stroke-width:1px
    classDef script stroke-dasharray: 5 5,stroke:#666666,fill:#ffffff
    classDef config fill:#ffe5cc,stroke:#cc6600,stroke-width:1px
```
