# hengshen2233/xiaomicustompresetpack architecture

> Architecture diagram of the GitHub repository hengshen2233/xiaomicustompresetpack, 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/hengshen2233/xiaomicustompresetpack
- Repository: https://github.com/hengshen2233/xiaomicustompresetpack

## Overview

The documented workflow is to configure camera parameters in the computer-side tool, generate a ZIP preset pack, then import it into Xiaomi phone Pro mode. The repository also includes Android app source, but the README does not explain how it relates to pack generation, and its implementation was not sampled. The generator’s parameter mapping and ZIP creation are visible in the Python excerpt; Android behavior and the phone’s import mechanism are not.

Main entry points: [`preset_pack_creator.py`](https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py) (Parameter controls), [`Default`](https://github.com/hengshen2233/xiaomicustompresetpack/tree/main/Default) (Default templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop pack creator"]
  node_parameter_ui["Parameter controls"]
  node_preview["Pack preview"]
  node_generator["Pack generator"]
  node_defaults["Default templates"]
  node_zip_pack["Preset ZIP"]
end

subgraph group_android["Android source"]
  node_android_app["Android app source<br/>[MainActivity.kt]"]
end

node_creator_user(("Preset creator"))
node_xiaomi_phone(("Xiaomi phone"))

node_creator_user -->|"sets parameters"| node_parameter_ui
node_parameter_ui -->|"updates preview"| node_preview
node_parameter_ui -->|"starts generation"| node_generator
node_generator -->|"copies templates"| node_defaults
node_generator -->|"writes ZIP"| node_zip_pack
node_creator_user -.->|"imports ZIP"| node_xiaomi_phone

click node_parameter_ui "https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py"
click node_preview "https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py"
click node_generator "https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py"
click node_defaults "https://github.com/hengshen2233/xiaomicustompresetpack/tree/main/Default"
click node_android_app "https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/XiaomiLutApp/java/com/example/xiaomilut/MainActivity.kt"

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_parameter_ui,node_preview,node_generator,node_defaults,node_zip_pack toneBlue
class node_android_app toneAmber
class node_creator_user,node_xiaomi_phone toneIndigo
```

## Components

### Desktop pack creator

- [Parameter controls](https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py): `preset_pack_creator.py`
- [Pack preview](https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py): `preset_pack_creator.py`
- [Pack generator](https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/preset_pack_creator.py): `preset_pack_creator.py`
- [Default templates](https://github.com/hengshen2233/xiaomicustompresetpack/tree/main/Default): `Default`
- **Preset ZIP**

### Android source

- [Android app source](https://github.com/hengshen2233/xiaomicustompresetpack/blob/main/XiaomiLutApp/java/com/example/xiaomilut/MainActivity.kt): `XiaomiLutApp/java/com/example/xiaomilut/MainActivity.kt`

### Other components

- **Preset creator**
- **Xiaomi phone**

## Connections

- Preset creator → Parameter controls: sets parameters (evidence: `preset_pack_creator.py`)
- Parameter controls → Pack preview: updates preview (evidence: `preset_pack_creator.py`)
- Parameter controls → Pack generator: starts generation (evidence: `preset_pack_creator.py`)
- Pack generator → Default templates: copies templates (evidence: `preset_pack_creator.py`)
- Pack generator → Preset ZIP: writes ZIP (evidence: `preset_pack_creator.py`)
- Preset creator → Xiaomi phone: imports ZIP (evidence: `README.md`)
