# liteldev/levilamina architecture

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

- Interactive diagram: https://gitdiagram.com/liteldev/levilamina
- Repository: https://github.com/liteldev/levilamina

## Overview

LeviLamina is a modular Minecraft Bedrock mod loader and C++ API. The documented user-to-result path is a mod developer building a C++ mod for the loader, which supplies APIs and runtime support; sampled loader code shows native-mod loading and lifecycle callbacks. Other visible branches include service management, event infrastructure, localization, and client world-storage UI. The excerpts do not establish most runtime wiring, so those relationships are omitted rather than inferred from co-location or imports alone.

Main entry points: [`src/ll/core/mod/NativeModManager.cpp`](https://github.com/liteldev/levilamina/blob/main/src/ll/core/mod/NativeModManager.cpp) (Native loader), [`src/ll/api/mod/NativeMod.h`](https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/NativeMod.h) (Mod API), [`src/mc/world/level/storage/ILevelStorageManagerConnector.h`](https://github.com/liteldev/levilamina/blob/main/src/mc/world/level/storage/ILevelStorageManagerConnector.h) (Save connectors), [`src-client/mc/client/gui/oreui/binding/facets/vanilla/WorldStorageManagerFacet.h`](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/facets/vanilla/WorldStorageManagerFacet.h) (World operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mod_runtime["Mod runtime"]
  node_mod_api["Mod API<br/>[NativeMod.h]"]
  node_native_manager["Native loader"]
  node_mod_registry["Mod registry"]
  node_mod_manager["Mod manager<br/>[ModManager.h]"]
end

subgraph group_api_services["API services"]
  node_event_bus["Event bus<br/>[EventBus.h]"]
  node_service_manager["Service manager<br/>[ServiceManager.cpp]"]
  node_service_api["Service API<br/>[Service.h]"]
  node_i18n["Localization<br/>[I18n.h]"]
  node_expected["Error results<br/>[Expected.h]"]
end

subgraph group_client_storage["Client storage"]
  node_storage_screen["Storage screen"]
  node_storage_facet["World operations"]
  node_world_query["World details"]
  node_device_query["Device storage"]
end

subgraph group_bedrock_support["Bedrock support"]
  node_level_storage["Level storage"]
  node_save_connector["Save connectors"]
  node_file_storage[("File storage<br/>[FileStorageArea.h]")]
  node_session_storage["Session storage"]
  node_atmospheric_storage["Atmosphere storage"]
  node_predefines["Bedrock definitions"]
  node_subscription["Subscriptions<br/>[Subscription.h]"]
end

node_developer(("Mod developer"))

node_developer -->|"writes C++ mods"| node_mod_api
node_mod_api -.->|"loads through"| node_native_manager
node_native_manager -->|"runs callbacks"| node_mod_api
node_native_manager -->|"formats diagnostics"| node_i18n
node_level_storage -->|"exposes connectors"| node_save_connector
node_atmospheric_storage -->|"implements"| node_session_storage
node_storage_facet -.-> node_save_connector

click node_mod_api "https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/NativeMod.h"
click node_native_manager "https://github.com/liteldev/levilamina/blob/main/src/ll/core/mod/NativeModManager.cpp"
click node_mod_registry "https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/ModManagerRegistry.cpp"
click node_mod_manager "https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/ModManager.h"
click node_event_bus "https://github.com/liteldev/levilamina/blob/main/src/ll/api/event/EventBus.h"
click node_service_manager "https://github.com/liteldev/levilamina/blob/main/src/ll/api/service/ServiceManager.cpp"
click node_service_api "https://github.com/liteldev/levilamina/blob/main/src/ll/api/service/Service.h"
click node_i18n "https://github.com/liteldev/levilamina/blob/main/src/ll/api/i18n/I18n.h"
click node_expected "https://github.com/liteldev/levilamina/blob/main/src/ll/api/Expected.h"
click node_storage_screen "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/screens/controllers/StorageManagementScreenController.h"
click node_storage_facet "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/facets/vanilla/WorldStorageManagerFacet.h"
click node_world_query "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/queries/menus/WorldStorageInfoQuery.h"
click node_device_query "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/queries/core/DeviceStorageInformationQuery.h"
click node_level_storage "https://github.com/liteldev/levilamina/blob/main/src/mc/world/level/storage/LevelStorageManager.h"
click node_save_connector "https://github.com/liteldev/levilamina/blob/main/src/mc/world/level/storage/ILevelStorageManagerConnector.h"
click node_file_storage "https://github.com/liteldev/levilamina/blob/main/src/mc/deps/core/file/FileStorageArea.h"
click node_session_storage "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/editor/serviceproviders/IClientDataTransferSessionStorage.h"
click node_atmospheric_storage "https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/renderer/AtmosphericScatteringSessionStorage.h"
click node_predefines "https://github.com/liteldev/levilamina/blob/main/src/mc/_HeaderOutputPredefine.h"
click node_subscription "https://github.com/liteldev/levilamina/blob/main/src/mc/deps/core/utility/pub_sub/Subscription.h"

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_mod_api,node_native_manager,node_mod_registry,node_mod_manager toneBlue
class node_event_bus,node_service_manager,node_service_api,node_i18n,node_expected toneAmber
class node_storage_screen,node_storage_facet,node_world_query,node_device_query toneMint
class node_level_storage,node_save_connector,node_file_storage,node_session_storage,node_atmospheric_storage,node_predefines,node_subscription toneRose
class node_developer toneIndigo
```

## Components

### Mod runtime

- [Mod API](https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/NativeMod.h): `src/ll/api/mod/NativeMod.h`
- [Native loader](https://github.com/liteldev/levilamina/blob/main/src/ll/core/mod/NativeModManager.cpp): `src/ll/core/mod/NativeModManager.cpp`
- [Mod registry](https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/ModManagerRegistry.cpp): `src/ll/api/mod/ModManagerRegistry.cpp`
- [Mod manager](https://github.com/liteldev/levilamina/blob/main/src/ll/api/mod/ModManager.h): `src/ll/api/mod/ModManager.h`

### API services

- [Event bus](https://github.com/liteldev/levilamina/blob/main/src/ll/api/event/EventBus.h): `src/ll/api/event/EventBus.h`
- [Service manager](https://github.com/liteldev/levilamina/blob/main/src/ll/api/service/ServiceManager.cpp): `src/ll/api/service/ServiceManager.cpp`
- [Service API](https://github.com/liteldev/levilamina/blob/main/src/ll/api/service/Service.h): `src/ll/api/service/Service.h`
- [Localization](https://github.com/liteldev/levilamina/blob/main/src/ll/api/i18n/I18n.h): `src/ll/api/i18n/I18n.h`
- [Error results](https://github.com/liteldev/levilamina/blob/main/src/ll/api/Expected.h): `src/ll/api/Expected.h`

### Client storage

- [Storage screen](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/screens/controllers/StorageManagementScreenController.h): `src-client/mc/client/gui/screens/controllers/StorageManagementScreenController.h`
- [World operations](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/facets/vanilla/WorldStorageManagerFacet.h): `src-client/mc/client/gui/oreui/binding/facets/vanilla/WorldStorageManagerFacet.h`
- [World details](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/queries/menus/WorldStorageInfoQuery.h): `src-client/mc/client/gui/oreui/binding/queries/menus/WorldStorageInfoQuery.h`
- [Device storage](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/gui/oreui/binding/queries/core/DeviceStorageInformationQuery.h): `src-client/mc/client/gui/oreui/binding/queries/core/DeviceStorageInformationQuery.h`

### Bedrock support

- [Level storage](https://github.com/liteldev/levilamina/blob/main/src/mc/world/level/storage/LevelStorageManager.h): `src/mc/world/level/storage/LevelStorageManager.h`
- [Save connectors](https://github.com/liteldev/levilamina/blob/main/src/mc/world/level/storage/ILevelStorageManagerConnector.h): `src/mc/world/level/storage/ILevelStorageManagerConnector.h`
- [File storage](https://github.com/liteldev/levilamina/blob/main/src/mc/deps/core/file/FileStorageArea.h): `src/mc/deps/core/file/FileStorageArea.h`
- [Session storage](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/editor/serviceproviders/IClientDataTransferSessionStorage.h): `src-client/mc/client/editor/serviceproviders/IClientDataTransferSessionStorage.h`
- [Atmosphere storage](https://github.com/liteldev/levilamina/blob/main/src-client/mc/client/renderer/AtmosphericScatteringSessionStorage.h): `src-client/mc/client/renderer/AtmosphericScatteringSessionStorage.h`
- [Bedrock definitions](https://github.com/liteldev/levilamina/blob/main/src/mc/_HeaderOutputPredefine.h): `src/mc/_HeaderOutputPredefine.h`
- [Subscriptions](https://github.com/liteldev/levilamina/blob/main/src/mc/deps/core/utility/pub_sub/Subscription.h): `src/mc/deps/core/utility/pub_sub/Subscription.h`

### Other components

- **Mod developer**

## Connections

- Mod developer → Mod API: writes C++ mods (evidence: `README.md`)
- Mod API → Native loader: loads through (evidence: `src/ll/core/mod/NativeModManager.cpp`)
- Native loader → Mod API: runs callbacks (evidence: `src/ll/core/mod/NativeModManager.cpp`)
- Native loader → Localization: formats diagnostics (evidence: `src/ll/core/mod/NativeModManager.cpp`)
- Level storage → Save connectors: exposes connectors (evidence: `src/mc/world/level/storage/LevelStorageManager.h`)
- Atmosphere storage → Session storage: implements (evidence: `src-client/mc/client/renderer/AtmosphericScatteringSessionStorage.h`)
- World operations → Save connectors
