# koz39/gfskel2json architecture

> Architecture diagram of the GitHub repository koz39/gfskel2json, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/koz39/gfskel2json
- Repository: https://github.com/koz39/gfskel2json

## Overview

This repository is a small, single-purpose conversion utility: it ports logic from a JavaScript implementation into Python 3.8+ so the same skeleton-to-JSON transformation can be run from Python.

1. **Primary purpose**
   - The project exists to translate skeleton-related data into JSON, based on an upstream JavaScript source.
   - The core architectural boundary is between **input skeleton/binary data** and **JSON output**.

2. **Main code surface**
   - There is only one source file of interest: `src/gfskel2json.py`.
   - That makes this a **single-module tool**, not a multi-package application.

3. **Execution model**
   - The README indicates it is meant to be run directly from source with Python 3.8+.
   - There is no evidence of a service runtime, web server, or background worker; this is a **local command-line/script-style utility**.

4. **Core subsystem**
   - The script likely contains the full conversion pipeline: parsing source data, transforming it into an intermediate structure, and serializing JSON.
   - Since there are no additional modules, all parsing and transformation logic is concentrated in one place.

5. **External dependency boundary**
   - The implementation is derived from `cullus/gfSpinePiXi`, specifically `SkeletonBinary.js`.
   - Architecturally, that upstream JavaScript file is the reference implementation, while this repo is the Python port.

6. **Data flow**
   - The expected flow is: source skeleton/binary-like input → Python conversion logic → JSON output.
   - Any file I/O, if present, is likely handled directly inside `gfskel2json.py` rather than through a layered architecture.

7. **Repository structure**
   - The repository is intentionally minimal:
     - `src/gfskel2json.py` for the implementation
     - `README.md` for usage/context
     - `LICENSE` and `.gitattributes` for project metadata
   - There are no visible tests, packaging files, or dependency manifests, which suggests low architectural complexity.

8. **Technology profile**
   - Runtime: Python 3.8+
   - Source lineage: JavaScript-to-Python port
   - No additional frameworks or libraries are documented in the README, so the tool appears to depend primarily on the Python standard runtime.

9. **Operational boundary**
   - The project is self-contained and likely produces artifacts directly on the local machine.
   - There is no sign of external services, databases, network APIs, or distributed components.

10. **What to draw in an architecture diagram**
   - A single Python conversion component in the center.
   - One inbound arrow from skeleton/binary source data.
   - One outbound arrow to JSON output.
   - A dashed “reference/source origin” link to the upstream `SkeletonBinary.js` implementation in `gfSpinePiXi`.

11. **Overall shape**
   - Think of this repo as a **standalone translator/adapter** rather than an application platform.
   - Its architecture is dominated by one transformation path, with almost no supporting subsystems.

Main entry points: [`src/gfskel2json.py`](https://github.com/koz39/gfskel2json/blob/dev/src/gfskel2json.py) (gfskel2json)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_local["Local tool"]
  node_input_data[("Skeleton input<br/>input data")]
  node_converter["gfskel2json<br/>Python converter<br/>[gfskel2json.py]"]
  node_json_output["JSON output<br/>artifact"]
end

subgraph group_upstream["Upstream reference"]
  node_upstream_js["SkeletonBinary.js<br/>reference impl"]
end

node_input_data -->|"parse"| node_converter
node_converter -->|"emit"| node_json_output
node_upstream_js -.->|"port source"| node_converter

click node_converter "https://github.com/koz39/gfskel2json/blob/dev/src/gfskel2json.py"

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_input_data,node_converter,node_json_output toneBlue
class node_upstream_js toneAmber
```

## Components

### Local tool

Single-module Python converter shipped in this repository.

- **Skeleton input**: input data · Skeleton or binary-like source data fed into the conversion pipeline.
- [gfskel2json](https://github.com/koz39/gfskel2json/blob/dev/src/gfskel2json.py): Python converter · Single-file Python 3.8+ transformation logic for parsing and serializing. · `src/gfskel2json.py`
- **JSON output**: artifact · Converted JSON produced by the script.

### Upstream reference

JavaScript implementation that the Python port follows.

- **SkeletonBinary.js**: reference impl · Upstream JavaScript implementation in cullus/gfSpinePiXi that serves as the porting reference.

## Connections

- Skeleton input → gfskel2json: parse · The script consumes skeleton-related input data.
- gfskel2json → JSON output: emit · The converter serializes the transformed structure as JSON.
- SkeletonBinary.js → gfskel2json: port source · The Python implementation is derived from the upstream JavaScript logic.
