# qycottage/levilauncher-android-mod-template architecture

> Architecture diagram of the GitHub repository qycottage/levilauncher-android-mod-template, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qycottage/levilauncher-android-mod-template
- Repository: https://github.com/qycottage/levilauncher-android-mod-template

## Overview

This is a LeviLauncher Android native-mod starter template. Its runtime workflow registers a long-lived mod instance, runs its load/enable/disable/unload lifecycle, and loads typed configuration during load. A separate host-side generator produces default config and schema JSON. The graph focuses on those product behaviors; packaging and build machinery are omitted. Relationships are supported by the excerpts or README; external loader internals are not shown.

Main entry points: [`src/main.cpp`](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/main.cpp) (Mod registration), [`src/mod/MyMod.cpp`](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/MyMod.cpp) (Mod lifecycle), [`src/mod/Config.cpp`](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.cpp) (Config JSON helpers), [`src/mod/Config.h`](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.h) (Config model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Mod lifecycle"]
  node_registration["Mod registration<br/>[main.cpp]"]
  node_mod["Mod lifecycle<br/>[MyMod.cpp]"]
end

subgraph group_configuration["Typed configuration"]
  node_config["Config model<br/>[Config.h]"]
  node_config_helpers["Config JSON helpers<br/>[Config.cpp]"]
  node_generator["Config generator"]
end

node_launcher(("LeviLauncher"))

node_launcher -->|"loads mod"| node_registration
node_registration -->|"registers instance"| node_mod
node_mod -->|"loads typed config"| node_config
node_generator -->|"writes defaults/schema"| node_config_helpers
node_config_helpers -->|"derives JSON/schema"| node_config

click node_registration "https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/main.cpp"
click node_mod "https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/MyMod.cpp"
click node_config "https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.h"
click node_config_helpers "https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.cpp"
click node_generator "https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/config_generator.cpp"

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_registration,node_mod toneBlue
class node_config,node_config_helpers,node_generator toneAmber
class node_launcher toneIndigo
```

## Components

### Mod lifecycle

- [Mod registration](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/main.cpp): `src/main.cpp`
- [Mod lifecycle](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/MyMod.cpp): `src/mod/MyMod.cpp`

### Typed configuration

- [Config model](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.h): `src/mod/Config.h`
- [Config JSON helpers](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/mod/Config.cpp): `src/mod/Config.cpp`
- [Config generator](https://github.com/qycottage/levilauncher-android-mod-template/blob/main/src/config_generator.cpp): `src/config_generator.cpp`

### Other components

- **LeviLauncher**

## Connections

- LeviLauncher → Mod registration: loads mod (evidence: `README.md`)
- Mod registration → Mod lifecycle: registers instance (evidence: `src/main.cpp`)
- Mod lifecycle → Config model: loads typed config (evidence: `src/mod/MyMod.cpp`)
- Config generator → Config JSON helpers: writes defaults/schema (evidence: `src/config_generator.cpp`)
- Config JSON helpers → Config model: derives JSON/schema (evidence: `src/mod/Config.cpp`)
