# jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock architecture

> Architecture diagram of the GitHub repository jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock
- Repository: https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock

## Overview

This repository’s executable product is a Node.js exporter for legacy Minecraft Macro Mod (MKB) scripts. The workflow is: invoke the CLI, scan MKB source files for function definitions and calls, resolve and order dependencies, then write per-function exports and optionally update target production files. The `mkbSource/` tree contains the script library being processed; `mkbDist/` is the exported library. The README describes a broader collection of SkyBlock scripts, but the sampled runtime implements export and import generation, not those scripts’ in-game behavior. Relationships below are limited to the CLI and sampled source evidence.

Main entry points: [`src/index.js`](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/index.js) (Export orchestration), [`src/struct/fn/fnDefinition.js`](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fn/fnDefinition.js) (Function definitions), [`src/struct/fileSystem/directory.js`](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/directory.js) (Directory scanner), [`src/struct/fileSystem/outFile.js`](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/outFile.js) (Target-file parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and orchestration"]
  node_cli["Export command<br/>[index.js]"]
  node_exporter["Export orchestration<br/>[index.js]"]
  node_paths["Source/output paths<br/>[constants.js]"]
end

subgraph group_parse["Parsing and dependencies"]
  node_definition["Function definitions<br/>[fnDefinition.js]"]
  node_call["Function calls<br/>[fnCall.js]"]
  node_formatting["Whitespace formatting<br/>[whitespace.js]"]
end

subgraph group_files["File handling"]
  node_source_tree["MKB source library"]
  node_dist_tree["Exported functions"]
  node_targets["Production target files"]
  node_directory["Directory scanner<br/>[directory.js]"]
  node_file["File parser<br/>[file.js]"]
  node_out_file["Target-file parser<br/>[outFile.js]"]
end

node_operator(("Script maintainer"))

node_operator -->|"runs export"| node_cli
node_cli -->|"calls main"| node_exporter
node_exporter -->|"reads paths"| node_paths
node_exporter -->|"scans source"| node_directory
node_directory -.->|"reads files"| node_source_tree
node_directory -->|"creates files"| node_file
node_file -->|"parses definitions"| node_definition
node_definition -->|"extracts calls"| node_call
node_definition -->|"formats text"| node_formatting
node_exporter -->|"writes exports"| node_dist_tree
node_exporter -->|"parses targets"| node_out_file
node_out_file -.->|"reads target"| node_targets
node_out_file -->|"resolves calls"| node_definition
node_exporter -.->|"updates imports"| node_targets

click node_cli "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/bin/index.js"
click node_exporter "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/index.js"
click node_paths "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/constants.js"
click node_source_tree "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/tree/master/mkbSource"
click node_dist_tree "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/tree/master/mkbDist"
click node_directory "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/directory.js"
click node_file "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/file.js"
click node_out_file "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/outFile.js"
click node_definition "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fn/fnDefinition.js"
click node_call "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fn/fnCall.js"
click node_formatting "https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/util/whitespace.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_exporter,node_paths toneBlue
class node_definition,node_call,node_formatting toneAmber
class node_source_tree,node_dist_tree,node_targets,node_directory,node_file,node_out_file toneMint
class node_operator toneIndigo
```

## Components

### CLI and orchestration

- [Export command](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/bin/index.js): `bin/index.js`
- [Export orchestration](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/index.js): `src/index.js`
- [Source/output paths](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/constants.js): `src/constants.js`

### Parsing and dependencies

- [Function definitions](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fn/fnDefinition.js): `src/struct/fn/fnDefinition.js`
- [Function calls](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fn/fnCall.js): `src/struct/fn/fnCall.js`
- [Whitespace formatting](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/util/whitespace.js): `src/util/whitespace.js`

### File handling

- [MKB source library](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/tree/master/mkbSource): `mkbSource`
- [Exported functions](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/tree/master/mkbDist): `mkbDist`
- **Production target files**
- [Directory scanner](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/directory.js): `src/struct/fileSystem/directory.js`
- [File parser](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/file.js): `src/struct/fileSystem/file.js`
- [Target-file parser](https://github.com/jamesonknutson/coincartel-mkb-scripts-hypixel-skyblock/blob/master/src/struct/fileSystem/outFile.js): `src/struct/fileSystem/outFile.js`

### Other components

- **Script maintainer**

## Connections

- Script maintainer → Export command: runs export (evidence: `bin/index.js`)
- Export command → Export orchestration: calls main (evidence: `bin/index.js`)
- Export orchestration → Source/output paths: reads paths (evidence: `src/index.js`)
- Export orchestration → Directory scanner: scans source (evidence: `src/index.js`)
- Directory scanner → MKB source library: reads files
- Directory scanner → File parser: creates files (evidence: `src/struct/fileSystem/directory.js`)
- File parser → Function definitions: parses definitions (evidence: `src/struct/fileSystem/file.js`)
- Function definitions → Function calls: extracts calls (evidence: `src/struct/fn/fnDefinition.js`)
- Function definitions → Whitespace formatting: formats text (evidence: `src/struct/fn/fnDefinition.js`)
- Export orchestration → Exported functions: writes exports (evidence: `src/index.js`)
- Export orchestration → Target-file parser: parses targets (evidence: `src/index.js`)
- Target-file parser → Production target files: reads target
- Target-file parser → Function definitions: resolves calls (evidence: `src/struct/fileSystem/outFile.js`)
- Export orchestration → Production target files: updates imports
