# lebrops/sporbels-inventions architecture

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

- Interactive diagram: https://gitdiagram.com/lebrops/sporbels-inventions
- Repository: https://github.com/lebrops/sporbels-inventions

## Overview

#### Purpose and Runtime
This is a data-driven Mindustry mod, not a standalone application. Mindustry loads the mod manifest, then discovers JSON content definitions and packaged campaign maps. The current repository provides an unfinished military/industrial content set and example `.msav` maps; the stated next major feature is a Thrahe campaign.

#### Mod Entry Point and Content Loading
`mod.json` is the runtime entry point and establishes the mod for the Mindustry loader. There is no source-code layer in the tree: behavior is expressed through Mindustry content schemas, references among definitions, and saved maps.
- `mod.json`
- `content/`
- `maps/`

#### Resource and Production Economy
Item and liquid definitions establish the economy consumed or produced by blocks. Production blocks form the transformation layer, covering raw extraction, metal/alloy processing, Hyperion materials, weapons, and recycling.
- `content/items/iron.json`
- `content/items/hyperion.json`
- `content/liquids/liquidhyperion.json`
- `content/blocks/drill/deepextractor1.json`
- `content/blocks/production/hyperionfactory.json`
- `content/blocks/production/recycler.json`

Primary flow is extraction → item/liquid logistics supplied by the base game → factories convert inputs into intermediate and advanced materials → output supports construction, power, defenses, and units. Recipe references are the key coupling boundary: renaming an item requires updating dependent block definitions.

#### Power and Infrastructure
Nuclear/reactor block definitions provide a power-progression subsystem, while builders and walls turn produced materials into base expansion and fortification capabilities.
- `content/blocks/power/tinynuclearreactor.json`
- `content/blocks/power/hyperionreactor.json`
- `content/blocks/unit/groundbuilder.json`
- `content/blocks/wall/hyperionwall.json`

This content relies on Mindustry’s native power network, placement, health, building, and resource-transport systems rather than custom infrastructure code.

#### Combat Payloads and Defenses
The mod’s military layer comprises turret blocks, crafted ammunition/payload items, status effects, and combat units. Factories such as missile, shell, and nuclear production feed defensive or offensive capabilities defined elsewhere in the content graph.
- `content/blocks/turret/nuclearlauncher.json`
- `content/blocks/turret/skybreaker.json`
- `content/blocks/production/missilefactory.json`
- `content/items/nuke.json`
- `content/status/sabotaged.json`

Combat execution is delegated to Mindustry’s built-in projectile, targeting, damage, and status-effect runtime.

#### Unit Catalog
Units are organized by thematic families—aircraft, ground forces, Hyperion, RT Jet, apathy, and novelty content—rather than a single explicit progression hierarchy. Unit-production blocks are separate from these definitions and likely provide the bridge from base economy to deployable units.
- `content/units/Real Life Aircraft/f22.json`
- `content/units/Real Life Ground/t34.json`
- `content/units/Hyperion/hyperionbug.json`
- `content/units/RT Jet/rtjet1.json`
- `content/blocks/unit/airbuilder.json`

#### Campaign and Map Boundary
Campaign content is currently represented by prebuilt Mindustry save maps, which serve as examples and playable scenarios. No planet, sector, or campaign `.hjson` definitions are present; adding Thrahe requires introducing those declarative campaign assets and linking its sectors/levels to map content.
- `maps/A New Path.msav`
- `maps/First Hyperion Threat.msav`
- `maps/Hyperion Cancer.msav`

The major external dependency is the Mindustry engine/editor: it interprets content JSON, serializes maps as `.msav`, and provides the planned campaign runtime.

Main entry points: [`content/items/hyperion.json`](https://github.com/lebrops/sporbels-inventions/blob/main/content/items/hyperion.json) (Hyperion material), [`content/blocks/production/hyperionfactory.json`](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/hyperionfactory.json) (Hyperion factory), [`content/items/iron.json`](https://github.com/lebrops/sporbels-inventions/blob/main/content/items/iron.json) (Iron), [`content/blocks/turret/nuclearlauncher.json`](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/turret/nuclearlauncher.json) (Turret defenses)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Mindustry Runtime"]
  node_manifest["Mod manifest<br/>entry point<br/>[mod.json]"]
  node_engine{{"Mindustry engine<br/>external runtime"}}
  node_content["Content definitions<br/>content root"]
  node_logistics["Native logistics<br/>engine subsystem"]
end

subgraph group_economy["Economy &amp; Infrastructure"]
  node_iron["Iron<br/>item<br/>[iron.json]"]
  node_hyperion["Hyperion material<br/>item<br/>[hyperion.json]"]
  node_liquid_hyperion["Liquid Hyperion"]
  node_extractor["Deep extractor<br/>drill block"]
  node_processing["Hyperion factory<br/>production block"]
  node_recycler["Recycler<br/>production block<br/>[recycler.json]"]
  node_power["Nuclear power<br/>power blocks"]
  node_fortification["Base construction<br/>builder and wall blocks<br/>[hyperionwall.json]"]
end

subgraph group_combat["Combat &amp; Units"]
  node_ammo_factory["Missile factory<br/>production block"]
  node_nuke["Nuclear payload<br/>item<br/>[nuke.json]"]
  node_turrets["Turret defenses<br/>turret blocks"]
  node_status["Sabotaged status<br/>status effect<br/>[sabotaged.json]"]
  node_units["Unit families<br/>unit catalog<br/>[hyperionbug.json]"]
  node_unit_builder["Air builder<br/>unit production block<br/>[airbuilder.json]"]
end

subgraph group_campaign["Maps &amp; Campaign"]
  node_maps["Playable save maps<br/>packaged scenarios"]
  node_thrahe["Planned Thrahe campaign<br/>future campaign assets"]
end

node_manifest -->|"loaded by"| node_engine
node_engine -->|"discovers"| node_content
node_engine -->|"loads"| node_maps
node_content -->|"defines"| node_iron
node_content -->|"defines"| node_hyperion
node_content -->|"defines"| node_liquid_hyperion
node_content -->|"defines"| node_extractor
node_content -->|"defines"| node_processing
node_content -->|"defines"| node_turrets
node_content -->|"defines"| node_units
node_extractor -->|"extracts"| node_iron
node_iron -->|"recipe input"| node_processing
node_liquid_hyperion -->|"recipe input"| node_processing
node_processing -->|"produces"| node_hyperion
node_recycler -->|"returns materials through"| node_logistics
node_hyperion -->|"supports construction"| node_power
node_hyperion -->|"builds"| node_fortification
node_hyperion -->|"recipe input"| node_ammo_factory
node_ammo_factory -->|"crafts"| node_nuke
node_nuke -->|"payload"| node_turrets
node_turrets -->|"applies"| node_status
node_hyperion -->|"supports production"| node_unit_builder
node_unit_builder -->|"deploys"| node_units
node_logistics -->|"supplies inputs"| node_processing
node_logistics -->|"connects"| node_power
node_maps -.->|"future sector links"| node_thrahe
node_engine -.->|"future campaign runtime"| node_thrahe

click node_manifest "https://github.com/lebrops/sporbels-inventions/blob/main/mod.json"
click node_iron "https://github.com/lebrops/sporbels-inventions/blob/main/content/items/iron.json"
click node_hyperion "https://github.com/lebrops/sporbels-inventions/blob/main/content/items/hyperion.json"
click node_liquid_hyperion "https://github.com/lebrops/sporbels-inventions/blob/main/content/liquids/liquidhyperion.json"
click node_extractor "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/drill/deepextractor1.json"
click node_processing "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/hyperionfactory.json"
click node_recycler "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/recycler.json"
click node_power "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/power/hyperionreactor.json"
click node_fortification "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/wall/hyperionwall.json"
click node_ammo_factory "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/missilefactory.json"
click node_nuke "https://github.com/lebrops/sporbels-inventions/blob/main/content/items/nuke.json"
click node_turrets "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/turret/nuclearlauncher.json"
click node_status "https://github.com/lebrops/sporbels-inventions/blob/main/content/status/sabotaged.json"
click node_units "https://github.com/lebrops/sporbels-inventions/blob/main/content/units/Hyperion/hyperionbug.json"
click node_unit_builder "https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/unit/airbuilder.json"

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_manifest,node_engine,node_content,node_logistics toneBlue
class node_iron,node_hyperion,node_liquid_hyperion,node_extractor,node_processing,node_recycler,node_power,node_fortification toneAmber
class node_ammo_factory,node_nuke,node_turrets,node_status,node_units,node_unit_builder toneMint
class node_maps,node_thrahe toneRose
```

## Components

### Mindustry Runtime

- [Mod manifest](https://github.com/lebrops/sporbels-inventions/blob/main/mod.json): entry point · Registers the mod with Mindustry. · `mod.json`
- **Mindustry engine**: external runtime · Loads content and supplies native simulation systems.
- **Content definitions**: content root · Declarative blocks, items, liquids, units, and statuses.
- **Native logistics**: engine subsystem · Base-game item, liquid, placement, and power networks.

### Economy & Infrastructure

- [Iron](https://github.com/lebrops/sporbels-inventions/blob/main/content/items/iron.json): item · `content/items/iron.json`
- [Hyperion material](https://github.com/lebrops/sporbels-inventions/blob/main/content/items/hyperion.json): item · `content/items/hyperion.json`
- [Liquid Hyperion](https://github.com/lebrops/sporbels-inventions/blob/main/content/liquids/liquidhyperion.json): liquid · `content/liquids/liquidhyperion.json`
- [Deep extractor](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/drill/deepextractor1.json): drill block · Extracts raw resources. · `content/blocks/drill/deepextractor1.json`
- [Hyperion factory](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/hyperionfactory.json): production block · Converts recipe inputs into advanced materials. · `content/blocks/production/hyperionfactory.json`
- [Recycler](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/recycler.json): production block · `content/blocks/production/recycler.json`
- [Nuclear power](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/power/hyperionreactor.json): power blocks · Progression power generation. · `content/blocks/power/hyperionreactor.json`
- [Base construction](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/wall/hyperionwall.json): builder and wall blocks · Expansion and defensive fortification. · `content/blocks/wall/hyperionwall.json`

### Combat & Units

- [Missile factory](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/production/missilefactory.json): production block · Crafts combat payloads. · `content/blocks/production/missilefactory.json`
- [Nuclear payload](https://github.com/lebrops/sporbels-inventions/blob/main/content/items/nuke.json): item · `content/items/nuke.json`
- [Turret defenses](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/turret/nuclearlauncher.json): turret blocks · Consumes payloads for defensive or offensive fire. · `content/blocks/turret/nuclearlauncher.json`
- [Sabotaged status](https://github.com/lebrops/sporbels-inventions/blob/main/content/status/sabotaged.json): status effect · `content/status/sabotaged.json`
- [Unit families](https://github.com/lebrops/sporbels-inventions/blob/main/content/units/Hyperion/hyperionbug.json): unit catalog · Aircraft, ground, Hyperion, RT Jet, apathy, and novelty units. · `content/units/Hyperion/hyperionbug.json`
- [Air builder](https://github.com/lebrops/sporbels-inventions/blob/main/content/blocks/unit/airbuilder.json): unit production block · Bridges base economy to deployable units. · `content/blocks/unit/airbuilder.json`

### Maps & Campaign

- **Playable save maps**: packaged scenarios · Prebuilt Mindustry map saves.
- **Planned Thrahe campaign**: future campaign assets · Requires planet and sector definitions linked to maps.

## Connections

- Mod manifest → Mindustry engine: loaded by
- Mindustry engine → Content definitions: discovers
- Mindustry engine → Playable save maps: loads
- Content definitions → Iron: defines
- Content definitions → Hyperion material: defines
- Content definitions → Liquid Hyperion: defines
- Content definitions → Deep extractor: defines
- Content definitions → Hyperion factory: defines
- Content definitions → Turret defenses: defines
- Content definitions → Unit families: defines
- Deep extractor → Iron: extracts
- Iron → Hyperion factory: recipe input
- Liquid Hyperion → Hyperion factory: recipe input
- Hyperion factory → Hyperion material: produces
- Recycler → Native logistics: returns materials through
- Hyperion material → Nuclear power: supports construction
- Hyperion material → Base construction: builds
- Hyperion material → Missile factory: recipe input
- Missile factory → Nuclear payload: crafts
- Nuclear payload → Turret defenses: payload
- Turret defenses → Sabotaged status: applies
- Hyperion material → Air builder: supports production
- Air builder → Unit families: deploys
- Native logistics → Hyperion factory: supplies inputs
- Native logistics → Nuclear power: connects
- Playable save maps → Planned Thrahe campaign: future sector links
- Mindustry engine → Planned Thrahe campaign: future campaign runtime
