# haris16-code/kryonos architecture

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

- Interactive diagram: https://gitdiagram.com/haris16-code/kryonos
- Repository: https://github.com/haris16-code/kryonos

## Overview

KryonOS is an embedded GUI operating system and JavaScript app platform for ESP32 boards. The user-facing flow begins at the device launcher, where users can open installed apps or browse and install apps; the kernel and JavaScript runtime provide execution, while filesystem and hardware services support apps. Separate product branches provide settings, cloud and AI features, web-based file management, and firmware updates. The boot excerpt shows initialization and UI dispatch; some feature relationships are documented in the README, but their internal call paths were not sampled.

Main entry points: [`src/Kernel/Core/HarixKernel.cpp`](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Core/HarixKernel.cpp) (Harix Kernel), [`src/Kernel/WiFiManager.cpp`](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/WiFiManager.cpp) (Wi-Fi Manager), [`src/FileSystem/FileSystem.cpp`](https://github.com/haris16-code/kryonos/blob/main/src/FileSystem/FileSystem.cpp) (File System), [`src/Runtime/JSBindings.cpp`](https://github.com/haris16-code/kryonos/blob/main/src/Runtime/JSBindings.cpp) (JavaScript APIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Device Interface"]
  node_launcher["Launcher<br/>[LauncherUI.cpp]"]
  node_appstore["App Store<br/>[AppStoreUI.cpp]"]
  node_installer["App Installer<br/>[InstallerUI.cpp]"]
  node_settings["Settings<br/>[SettingsUI.cpp]"]
  node_help["Help Center<br/>[HelpCenterUI.cpp]"]
  node_cloudui["Cloud UI<br/>[KryonCloudUI.cpp]"]
end

subgraph group_runtime["App Runtime"]
  node_kernel["Harix Kernel<br/>[HarixKernel.cpp]"]
  node_jsbindings["JavaScript APIs<br/>[JSBindings.cpp]"]
  node_duktape["Duktape Engine<br/>[duktape.c]"]
  node_hardware["Board HAL<br/>[Board.h]"]
  node_webserver["App HTTP Server"]
end

subgraph group_services["OS Services"]
  node_filesystem[("File System<br/>[FileSystem.cpp]")]
  node_crypto["Crypto Engine<br/>[CryptoEngine.cpp]"]
  node_wifi["Wi-Fi Manager<br/>[WiFiManager.cpp]"]
  node_time["Time Manager<br/>[TimeManager.cpp]"]
  node_notifications["Notifications"]
end

subgraph group_integrations["Network Features"]
  node_cloud["Kryon Cloud"]
  node_ota["OTA Updater<br/>[OTAManager.cpp]"]
  node_webmanager["Web Management<br/>[WebManager.cpp]"]
  node_webfileui["Web File Manager<br/>[filemanager_html.h]"]
end

node_user(("Device User"))
node_external(("Cloud Services"))

node_user -->|"opens apps"| node_launcher
node_launcher -.->|"browses apps"| node_appstore
node_appstore -.->|"installs apps"| node_installer
node_installer -->|"registers app"| node_kernel
node_kernel -->|"initializes engine"| node_duktape
node_kernel -.->|"exposes APIs"| node_jsbindings
node_jsbindings -.->|"controls hardware"| node_hardware
node_jsbindings -.->|"accesses storage"| node_filesystem
node_user -->|"configures device"| node_settings
node_user -->|"opens help"| node_help
node_user -->|"opens cloud"| node_cloudui
node_cloudui -.->|"uses services"| node_cloud
node_cloud -->|"connects to"| node_external
node_settings -->|"manages Wi-Fi"| node_wifi
node_wifi -->|"syncs clock"| node_time
node_wifi -->|"persists credentials"| node_filesystem
node_wifi -->|"decrypts credentials"| node_crypto
node_user -.->|"updates firmware"| node_ota
node_ota -->|"fetches updates"| node_external
node_user -->|"manages files"| node_webmanager
node_webmanager -->|"serves interface"| node_webfileui
node_webmanager -->|"reads and writes"| node_filesystem
node_webserver -->|"serves static files"| node_filesystem
node_kernel -->|"renders alerts"| node_notifications

click node_launcher "https://github.com/haris16-code/kryonos/blob/main/src/Launcher/LauncherUI.cpp"
click node_appstore "https://github.com/haris16-code/kryonos/blob/main/src/Launcher/AppStoreUI.cpp"
click node_installer "https://github.com/haris16-code/kryonos/blob/main/src/Launcher/InstallerUI.cpp"
click node_settings "https://github.com/haris16-code/kryonos/blob/main/src/Settings/SettingsUI.cpp"
click node_help "https://github.com/haris16-code/kryonos/blob/main/src/Launcher/HelpCenterUI.cpp"
click node_kernel "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Core/HarixKernel.cpp"
click node_jsbindings "https://github.com/haris16-code/kryonos/blob/main/src/Runtime/JSBindings.cpp"
click node_duktape "https://github.com/haris16-code/kryonos/blob/main/src/Runtime/duktape.c"
click node_hardware "https://github.com/haris16-code/kryonos/blob/main/src/Hal/Boards/Board.h"
click node_filesystem "https://github.com/haris16-code/kryonos/blob/main/src/FileSystem/FileSystem.cpp"
click node_crypto "https://github.com/haris16-code/kryonos/blob/main/src/Hal/Crypto/CryptoEngine.cpp"
click node_wifi "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/WiFiManager.cpp"
click node_time "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/TimeManager.cpp"
click node_notifications "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/NotificationManager.cpp"
click node_cloud "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/KryonCloud/KryonCloudManager.cpp"
click node_cloudui "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/KryonCloud/KryonCloudUI.cpp"
click node_ota "https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/OTA/OTAManager.cpp"
click node_webmanager "https://github.com/haris16-code/kryonos/blob/main/src/WebManager/WebManager.cpp"
click node_webserver "https://github.com/haris16-code/kryonos/blob/main/src/Runtime/HTTPServerEngine.cpp"
click node_webfileui "https://github.com/haris16-code/kryonos/blob/main/src/WebManager/filemanager_html.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_launcher,node_appstore,node_installer,node_settings,node_help,node_cloudui,node_user toneBlue
class node_kernel,node_jsbindings,node_duktape,node_hardware,node_webserver toneAmber
class node_filesystem,node_crypto,node_wifi,node_time,node_notifications toneMint
class node_cloud,node_ota,node_webmanager,node_webfileui toneRose
class node_external toneIndigo
```

## Components

### Device Interface

- [Launcher](https://github.com/haris16-code/kryonos/blob/main/src/Launcher/LauncherUI.cpp): `src/Launcher/LauncherUI.cpp`
- [App Store](https://github.com/haris16-code/kryonos/blob/main/src/Launcher/AppStoreUI.cpp): `src/Launcher/AppStoreUI.cpp`
- [App Installer](https://github.com/haris16-code/kryonos/blob/main/src/Launcher/InstallerUI.cpp): `src/Launcher/InstallerUI.cpp`
- [Settings](https://github.com/haris16-code/kryonos/blob/main/src/Settings/SettingsUI.cpp): `src/Settings/SettingsUI.cpp`
- [Help Center](https://github.com/haris16-code/kryonos/blob/main/src/Launcher/HelpCenterUI.cpp): `src/Launcher/HelpCenterUI.cpp`
- [Cloud UI](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/KryonCloud/KryonCloudUI.cpp): `src/Kernel/Services/KryonCloud/KryonCloudUI.cpp`

### App Runtime

- [Harix Kernel](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Core/HarixKernel.cpp): `src/Kernel/Core/HarixKernel.cpp`
- [JavaScript APIs](https://github.com/haris16-code/kryonos/blob/main/src/Runtime/JSBindings.cpp): `src/Runtime/JSBindings.cpp`
- [Duktape Engine](https://github.com/haris16-code/kryonos/blob/main/src/Runtime/duktape.c): `src/Runtime/duktape.c`
- [Board HAL](https://github.com/haris16-code/kryonos/blob/main/src/Hal/Boards/Board.h): `src/Hal/Boards/Board.h`
- [App HTTP Server](https://github.com/haris16-code/kryonos/blob/main/src/Runtime/HTTPServerEngine.cpp): `src/Runtime/HTTPServerEngine.cpp`

### OS Services

- [File System](https://github.com/haris16-code/kryonos/blob/main/src/FileSystem/FileSystem.cpp): `src/FileSystem/FileSystem.cpp`
- [Crypto Engine](https://github.com/haris16-code/kryonos/blob/main/src/Hal/Crypto/CryptoEngine.cpp): `src/Hal/Crypto/CryptoEngine.cpp`
- [Wi-Fi Manager](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/WiFiManager.cpp): `src/Kernel/WiFiManager.cpp`
- [Time Manager](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/TimeManager.cpp): `src/Kernel/TimeManager.cpp`
- [Notifications](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/NotificationManager.cpp): `src/Kernel/Services/NotificationManager.cpp`

### Network Features

- [Kryon Cloud](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/KryonCloud/KryonCloudManager.cpp): `src/Kernel/Services/KryonCloud/KryonCloudManager.cpp`
- [OTA Updater](https://github.com/haris16-code/kryonos/blob/main/src/Kernel/Services/OTA/OTAManager.cpp): `src/Kernel/Services/OTA/OTAManager.cpp`
- [Web Management](https://github.com/haris16-code/kryonos/blob/main/src/WebManager/WebManager.cpp): `src/WebManager/WebManager.cpp`
- [Web File Manager](https://github.com/haris16-code/kryonos/blob/main/src/WebManager/filemanager_html.h): `src/WebManager/filemanager_html.h`

### Other components

- **Device User**
- **Cloud Services**

## Connections

- Device User → Launcher: opens apps (evidence: `README.md`)
- Launcher → App Store: browses apps
- App Store → App Installer: installs apps
- App Installer → Harix Kernel: registers app (evidence: `src/Launcher/InstallerUI.cpp`)
- Harix Kernel → Duktape Engine: initializes engine
- Harix Kernel → JavaScript APIs: exposes APIs
- JavaScript APIs → Board HAL: controls hardware (evidence: `README.md`)
- JavaScript APIs → File System: accesses storage (evidence: `README.md`)
- Device User → Settings: configures device
- Device User → Help Center: opens help
- Device User → Cloud UI: opens cloud
- Cloud UI → Kryon Cloud: uses services
- Kryon Cloud → Cloud Services: connects to (evidence: `README.md`)
- Settings → Wi-Fi Manager: manages Wi-Fi (evidence: `src/Settings/SettingsUI.cpp`)
- Wi-Fi Manager → Time Manager: syncs clock (evidence: `src/Kernel/WiFiManager.cpp`)
- Wi-Fi Manager → File System: persists credentials (evidence: `src/Kernel/WiFiManager.cpp`)
- Wi-Fi Manager → Crypto Engine: decrypts credentials (evidence: `src/Kernel/WiFiManager.cpp`)
- Device User → OTA Updater: updates firmware (evidence: `README.md`)
- OTA Updater → Cloud Services: fetches updates (evidence: `README.md`)
- Device User → Web Management: manages files (evidence: `README.md`)
- Web Management → Web File Manager: serves interface (evidence: `src/WebManager/WebManager.cpp`)
- Web Management → File System: reads and writes (evidence: `src/WebManager/WebManager.cpp`)
- App HTTP Server → File System: serves static files (evidence: `src/Runtime/HTTPServerEngine.cpp`)
- Harix Kernel → Notifications: renders alerts
