# kapil-goel952/kapilos architecture

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

- Interactive diagram: https://gitdiagram.com/kapil-goel952/kapilos
- Repository: https://github.com/kapil-goel952/kapilos

## Overview

KapilOS is presented as a custom Linux distribution, while the supplied runtime source chiefly implements a graphical desktop shell and launchable applications. The main workflow is desktop UI initialization and drawing, user launch selection, application-manager dispatch, and rendering of open apps. The tree also shows calculator, terminal, browser, file, settings, and code-editor capabilities. Evidence is limited to the README, tree, and sampled/indexed files; unsampled subsystem links are omitted or marked unverified rather than treated as inspected.

Main entry points: [`Source/ApplicationManager/ApplicationManager.cpp`](https://github.com/kapil-goel952/kapilos/blob/main/Source/ApplicationManager/ApplicationManager.cpp) (Application manager), [`Source/UI/UIManager/UIManager.cpp`](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/UIManager/UIManager.cpp) (UI manager), [`Source/Applications/Application/Application.cpp`](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Application/Application.cpp) (Application lifecycle), [`Source/UI/Sidebar/SidebarUI.h`](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Sidebar/SidebarUI.h) (Sidebar launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Shell"]
  node_ui["UI manager<br/>[UIManager.cpp]"]
  node_desktop_surface["Desktop surface<br/>[DesktopUI.h]"]
  node_topbar["Top bar<br/>[TopBarUI.h]"]
  node_sidebar["Sidebar launcher<br/>[SidebarUI.h]"]
  node_dock["Dock launcher<br/>[DockUI.h]"]
  node_widgets["Desktop widgets"]
  node_layout["Layout and style<br/>[LayoutManager.cpp]"]
end

subgraph group_apps["Applications"]
  node_app_manager["Application manager"]
  node_app_base["Application lifecycle<br/>[Application.cpp]"]
  node_file_explorer["File explorer"]
  node_settings["Settings app<br/>[SettingsApp.cpp]"]
  node_browser["Browser app<br/>[BrowserApp.cpp]"]
  node_terminal["Terminal app<br/>[TerminalApp.cpp]"]
  node_calculator["Calculator app<br/>[CalculatorApp.cpp]"]
  node_code_editor["Code editor<br/>[CodeEditorApp.cpp]"]
end

subgraph group_services["Runtime Services"]
  node_browser_engine["Browser engine<br/>[BrowserEngine.cpp]"]
  node_calculator_engine["Calculator engine"]
  node_terminal_engine["Terminal engine<br/>[TerminalEngine.cpp]"]
  node_asset_manager["Asset manager<br/>[AssetManager.cpp]"]
  node_icon_manager["Icon manager<br/>[IconManager.cpp]"]
  node_theme_manager["Theme manager<br/>[ThemeManager.cpp]"]
end

subgraph group_platform["System Platform"]
  node_boot_manager["Boot manager<br/>[BootManager.cpp]"]
  node_graphics["Graphics runtime<br/>[Graphics.cpp]"]
  node_linux_stack{{"Linux platform"}}
end

node_user(("Desktop user"))

node_user -->|"uses desktop"| node_ui
node_ui -->|"updates layout"| node_layout
node_ui -->|"draws"| node_desktop_surface
node_ui -->|"draws"| node_topbar
node_ui -->|"draws"| node_sidebar
node_ui -->|"draws"| node_dock
node_ui -->|"draws"| node_widgets
node_sidebar -->|"launches apps"| node_app_manager
node_dock -->|"launches apps"| node_app_manager
node_ui -->|"draws open apps"| node_app_manager
node_app_manager -->|"opens and draws"| node_file_explorer
node_app_manager -->|"opens and draws"| node_settings
node_app_manager -->|"opens and draws"| node_browser
node_app_manager -->|"opens and draws"| node_terminal
node_app_manager -->|"opens and draws"| node_calculator
node_app_manager -->|"opens and draws"| node_code_editor
node_app_base -.->|"provides lifecycle"| node_file_explorer
node_app_base -.->|"provides lifecycle"| node_settings
node_app_base -.->|"provides lifecycle"| node_browser
node_app_base -.->|"provides lifecycle"| node_terminal
node_app_base -.->|"provides lifecycle"| node_calculator
node_app_base -.->|"provides lifecycle"| node_code_editor
node_icon_manager -.->|"uses assets"| node_asset_manager
node_boot_manager -.->|"starts system"| node_linux_stack
node_graphics -.->|"renders on"| node_linux_stack

click node_ui "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/UIManager/UIManager.cpp"
click node_desktop_surface "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Desktop/DesktopUI.h"
click node_topbar "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/TopBar/TopBarUI.h"
click node_sidebar "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Sidebar/SidebarUI.h"
click node_dock "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Dock/DockUI.h"
click node_widgets "https://github.com/kapil-goel952/kapilos/tree/main/Source/UI/Widgets"
click node_layout "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Layout/LayoutManager.cpp"
click node_app_manager "https://github.com/kapil-goel952/kapilos/blob/main/Source/ApplicationManager/ApplicationManager.cpp"
click node_app_base "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Application/Application.cpp"
click node_file_explorer "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/FileExplorer/FileExplorerApp.cpp"
click node_settings "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Settings/SettingsApp.cpp"
click node_browser "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Browser/BrowserApp.cpp"
click node_terminal "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Terminal/TerminalApp.cpp"
click node_calculator "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Calculator/CalculatorApp.cpp"
click node_code_editor "https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/CodeEditor/CodeEditorApp.cpp"
click node_browser_engine "https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/BrowserEngine/BrowserEngine.cpp"
click node_calculator_engine "https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/CalculatorEngine/CalculatorEngine.cpp"
click node_terminal_engine "https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/TerminalEngine/TerminalEngine.cpp"
click node_asset_manager "https://github.com/kapil-goel952/kapilos/blob/main/Source/AssetManager/AssetManager.cpp"
click node_icon_manager "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Icon/IconManager.cpp"
click node_theme_manager "https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Theme/ThemeManager.cpp"
click node_boot_manager "https://github.com/kapil-goel952/kapilos/blob/main/Source/Boot/BootManager.cpp"
click node_graphics "https://github.com/kapil-goel952/kapilos/blob/main/Source/Graphics/Graphics.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_ui,node_desktop_surface,node_topbar,node_sidebar,node_dock,node_widgets,node_layout,node_user toneBlue
class node_app_manager,node_app_base,node_file_explorer,node_settings,node_browser,node_terminal,node_calculator,node_code_editor toneAmber
class node_browser_engine,node_calculator_engine,node_terminal_engine,node_asset_manager,node_icon_manager,node_theme_manager toneMint
class node_boot_manager,node_graphics,node_linux_stack toneRose
```

## Components

### Desktop Shell

- [UI manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/UIManager/UIManager.cpp): `Source/UI/UIManager/UIManager.cpp`
- [Desktop surface](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Desktop/DesktopUI.h): `Source/UI/Desktop/DesktopUI.h`
- [Top bar](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/TopBar/TopBarUI.h): `Source/UI/TopBar/TopBarUI.h`
- [Sidebar launcher](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Sidebar/SidebarUI.h): `Source/UI/Sidebar/SidebarUI.h`
- [Dock launcher](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Dock/DockUI.h): `Source/UI/Dock/DockUI.h`
- [Desktop widgets](https://github.com/kapil-goel952/kapilos/tree/main/Source/UI/Widgets): `Source/UI/Widgets`
- [Layout and style](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Layout/LayoutManager.cpp): `Source/UI/Layout/LayoutManager.cpp`

### Applications

- [Application manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/ApplicationManager/ApplicationManager.cpp): `Source/ApplicationManager/ApplicationManager.cpp`
- [Application lifecycle](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Application/Application.cpp): `Source/Applications/Application/Application.cpp`
- [File explorer](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/FileExplorer/FileExplorerApp.cpp): `Source/Applications/FileExplorer/FileExplorerApp.cpp`
- [Settings app](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Settings/SettingsApp.cpp): `Source/Applications/Settings/SettingsApp.cpp`
- [Browser app](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Browser/BrowserApp.cpp): `Source/Applications/Browser/BrowserApp.cpp`
- [Terminal app](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Terminal/TerminalApp.cpp): `Source/Applications/Terminal/TerminalApp.cpp`
- [Calculator app](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/Calculator/CalculatorApp.cpp): `Source/Applications/Calculator/CalculatorApp.cpp`
- [Code editor](https://github.com/kapil-goel952/kapilos/blob/main/Source/Applications/CodeEditor/CodeEditorApp.cpp): `Source/Applications/CodeEditor/CodeEditorApp.cpp`

### Runtime Services

- [Browser engine](https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/BrowserEngine/BrowserEngine.cpp): `Source/Core/BrowserEngine/BrowserEngine.cpp`
- [Calculator engine](https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/CalculatorEngine/CalculatorEngine.cpp): `Source/Core/CalculatorEngine/CalculatorEngine.cpp`
- [Terminal engine](https://github.com/kapil-goel952/kapilos/blob/main/Source/Core/TerminalEngine/TerminalEngine.cpp): `Source/Core/TerminalEngine/TerminalEngine.cpp`
- [Asset manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/AssetManager/AssetManager.cpp): `Source/AssetManager/AssetManager.cpp`
- [Icon manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Icon/IconManager.cpp): `Source/UI/Icon/IconManager.cpp`
- [Theme manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/UI/Theme/ThemeManager.cpp): `Source/UI/Theme/ThemeManager.cpp`

### System Platform

- [Boot manager](https://github.com/kapil-goel952/kapilos/blob/main/Source/Boot/BootManager.cpp): `Source/Boot/BootManager.cpp`
- [Graphics runtime](https://github.com/kapil-goel952/kapilos/blob/main/Source/Graphics/Graphics.cpp): `Source/Graphics/Graphics.cpp`
- **Linux platform**

### Other components

- **Desktop user**

## Connections

- Desktop user → UI manager: uses desktop (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Layout and style: updates layout (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Desktop surface: draws (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Top bar: draws (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Sidebar launcher: draws (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Dock launcher: draws (evidence: `Source/UI/UIManager/UIManager.cpp`)
- UI manager → Desktop widgets: draws (evidence: `Source/UI/UIManager/UIManager.cpp`)
- Sidebar launcher → Application manager: launches apps
- Dock launcher → Application manager: launches apps
- UI manager → Application manager: draws open apps (evidence: `Source/UI/UIManager/UIManager.cpp`)
- Application manager → File explorer: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application manager → Settings app: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application manager → Browser app: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application manager → Terminal app: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application manager → Calculator app: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application manager → Code editor: opens and draws (evidence: `Source/ApplicationManager/ApplicationManager.cpp`)
- Application lifecycle → File explorer: provides lifecycle
- Application lifecycle → Settings app: provides lifecycle
- Application lifecycle → Browser app: provides lifecycle
- Application lifecycle → Terminal app: provides lifecycle
- Application lifecycle → Calculator app: provides lifecycle
- Application lifecycle → Code editor: provides lifecycle
- Icon manager → Asset manager: uses assets
- Boot manager → Linux platform: starts system
- Graphics runtime → Linux platform: renders on
