# harcicyang/neony architecture

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

- Interactive diagram: https://gitdiagram.com/harcicyang/neony
- Repository: https://github.com/harcicyang/neony

## Overview

Neony is a Python reactive desktop UI framework: application code composes a Page from components, launches it in a LumiView native webview, and user interaction updates reactive state and the rendered DOM. Its runtime spans component/widgets, DOM and reactivity, rendering/bridge, app/window services, and the bundled gallery. The excerpts and index establish key calls and capabilities; unsampled subsystems are included only where README or index supports their existence, with uncertain links omitted.

Main entry points: [`src/neony/application/app.py`](https://github.com/harcicyang/neony/blob/master/src/neony/application/app.py) (Window launcher), [`src/neony/application/elements/base.py`](https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/base.py) (Component base), [`src/neony/dom/bridge.py`](https://github.com/harcicyang/neony/blob/master/src/neony/dom/bridge.py) (Patch bridge), [`src/neony/gallery/core.py`](https://github.com/harcicyang/neony/blob/master/src/neony/gallery/core.py) (Gallery shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application runtime"]
  node_page["Page composition<br/>[page.py]"]
  node_launcher["Window launcher<br/>[app.py]"]
end

subgraph group_widgets["UI components"]
  node_component["Component base<br/>[base.py]"]
  node_widgetset["Controls and layouts"]
  node_data_views["Data views<br/>[datatable.py]"]
  node_chat["Chat widgets<br/>[chat.py]"]
  node_menu["Menus and overlays<br/>[menu.py]"]
end

subgraph group_dom["DOM and reactivity"]
  node_domtree["DOM elements<br/>[base.py]"]
  node_reactivity["Reactive primitives<br/>[reactive.py]"]
  node_css["CSS values<br/>[_values.py]"]
  node_snapshot["Node descriptors<br/>[nodes.py]"]
  node_bridge["Patch bridge<br/>[bridge.py]"]
  node_javascript["Browser runtime<br/>[index.js]"]
end

subgraph group_services["Themes and services"]
  node_themes["Theme presets<br/>[theme.py]"]
  node_icons["Icon catalog<br/>[icons.py]"]
  node_i18n["Localization<br/>[i18n.py]"]
  node_protocols["Custom protocols<br/>[base.py]"]
  node_layers["Positioned layers<br/>[layers.py]"]
  node_tray["System tray<br/>[tray.py]"]
end

subgraph group_gallery["Component gallery"]
  node_gallerycore["Gallery shell<br/>[core.py]"]
  node_gallerysections["Gallery sections"]
  node_galleryi18n["Gallery translations<br/>[i18n.py]"]
end

node_developer(("Python app author"))
node_native["LumiView webview"]

node_developer -->|"composes"| node_page
node_page -.->|"contains"| node_component
node_developer -->|"launches"| node_launcher
node_launcher -->|"renders"| node_page
node_launcher -->|"creates windows"| node_native
node_launcher -->|"configures"| node_bridge
node_component -->|"builds"| node_domtree
node_component -->|"binds state"| node_reactivity
node_widgetset -.->|"extends"| node_component
node_data_views -.->|"extends"| node_component
node_chat -->|"extends"| node_component
node_chat -->|"opens"| node_menu
node_domtree -->|"serializes"| node_snapshot
node_domtree -->|"uses values"| node_css
node_bridge -->|"diffs tree"| node_domtree
node_bridge -.->|"sends patches"| node_native
node_bridge -.->|"dispatches commands"| node_javascript
node_javascript -.->|"updates web DOM"| node_native
node_launcher -->|"injects theme"| node_themes
node_themes -->|"defines tokens"| node_css
node_launcher -->|"configures"| node_layers
node_launcher -->|"sets up"| node_tray
node_developer -.->|"registers handlers"| node_protocols
node_widgetset -.->|"uses tokens"| node_themes
node_icons -->|"supplies icons"| node_widgetset
node_gallerycore -->|"creates app"| node_launcher
node_gallerycore -->|"uses catalog"| node_galleryi18n
node_gallerysections -->|"uses shared shell"| node_gallerycore
node_gallerysections -->|"uses translations"| node_galleryi18n
node_gallerycore -->|"switches theme"| node_themes

click node_page "https://github.com/harcicyang/neony/blob/master/src/neony/application/page.py"
click node_launcher "https://github.com/harcicyang/neony/blob/master/src/neony/application/app.py"
click node_component "https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/base.py"
click node_widgetset "https://github.com/harcicyang/neony/tree/master/src/neony/application/elements"
click node_data_views "https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/datatable.py"
click node_chat "https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/chat.py"
click node_menu "https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/menu.py"
click node_domtree "https://github.com/harcicyang/neony/blob/master/src/neony/dom/base.py"
click node_reactivity "https://github.com/harcicyang/neony/blob/master/src/neony/dom/reactive.py"
click node_css "https://github.com/harcicyang/neony/blob/master/src/neony/dom/css/_values.py"
click node_snapshot "https://github.com/harcicyang/neony/blob/master/src/neony/dom/nodes.py"
click node_bridge "https://github.com/harcicyang/neony/blob/master/src/neony/dom/bridge.py"
click node_javascript "https://github.com/harcicyang/neony/blob/master/src/neony/javascript/index.js"
click node_themes "https://github.com/harcicyang/neony/blob/master/src/neony/application/theme.py"
click node_icons "https://github.com/harcicyang/neony/blob/master/src/neony/application/icons.py"
click node_i18n "https://github.com/harcicyang/neony/blob/master/src/neony/application/i18n.py"
click node_protocols "https://github.com/harcicyang/neony/blob/master/src/neony/application/protocols/base.py"
click node_layers "https://github.com/harcicyang/neony/blob/master/src/neony/application/layers.py"
click node_tray "https://github.com/harcicyang/neony/blob/master/src/neony/application/tray.py"
click node_gallerycore "https://github.com/harcicyang/neony/blob/master/src/neony/gallery/core.py"
click node_gallerysections "https://github.com/harcicyang/neony/tree/master/src/neony/gallery/sections"
click node_galleryi18n "https://github.com/harcicyang/neony/blob/master/src/neony/gallery/i18n.py"

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_page,node_launcher,node_native toneBlue
class node_component,node_widgetset,node_data_views,node_chat,node_menu toneAmber
class node_domtree,node_reactivity,node_css,node_snapshot,node_bridge,node_javascript toneMint
class node_themes,node_icons,node_i18n,node_protocols,node_layers,node_tray toneRose
class node_gallerycore,node_gallerysections,node_galleryi18n,node_developer toneIndigo
```

## Components

### Application runtime

- [Page composition](https://github.com/harcicyang/neony/blob/master/src/neony/application/page.py): `src/neony/application/page.py`
- [Window launcher](https://github.com/harcicyang/neony/blob/master/src/neony/application/app.py): `src/neony/application/app.py`

### UI components

- [Component base](https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/base.py): `src/neony/application/elements/base.py`
- [Controls and layouts](https://github.com/harcicyang/neony/tree/master/src/neony/application/elements): `src/neony/application/elements`
- [Data views](https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/datatable.py): `src/neony/application/elements/datatable.py`
- [Chat widgets](https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/chat.py): `src/neony/application/elements/chat.py`
- [Menus and overlays](https://github.com/harcicyang/neony/blob/master/src/neony/application/elements/menu.py): `src/neony/application/elements/menu.py`

### DOM and reactivity

- [DOM elements](https://github.com/harcicyang/neony/blob/master/src/neony/dom/base.py): `src/neony/dom/base.py`
- [Reactive primitives](https://github.com/harcicyang/neony/blob/master/src/neony/dom/reactive.py): `src/neony/dom/reactive.py`
- [CSS values](https://github.com/harcicyang/neony/blob/master/src/neony/dom/css/_values.py): `src/neony/dom/css/_values.py`
- [Node descriptors](https://github.com/harcicyang/neony/blob/master/src/neony/dom/nodes.py): `src/neony/dom/nodes.py`
- [Patch bridge](https://github.com/harcicyang/neony/blob/master/src/neony/dom/bridge.py): `src/neony/dom/bridge.py`
- [Browser runtime](https://github.com/harcicyang/neony/blob/master/src/neony/javascript/index.js): `src/neony/javascript/index.js`

### Themes and services

- [Theme presets](https://github.com/harcicyang/neony/blob/master/src/neony/application/theme.py): `src/neony/application/theme.py`
- [Icon catalog](https://github.com/harcicyang/neony/blob/master/src/neony/application/icons.py): `src/neony/application/icons.py`
- [Localization](https://github.com/harcicyang/neony/blob/master/src/neony/application/i18n.py): `src/neony/application/i18n.py`
- [Custom protocols](https://github.com/harcicyang/neony/blob/master/src/neony/application/protocols/base.py): `src/neony/application/protocols/base.py`
- [Positioned layers](https://github.com/harcicyang/neony/blob/master/src/neony/application/layers.py): `src/neony/application/layers.py`
- [System tray](https://github.com/harcicyang/neony/blob/master/src/neony/application/tray.py): `src/neony/application/tray.py`

### Component gallery

- [Gallery shell](https://github.com/harcicyang/neony/blob/master/src/neony/gallery/core.py): `src/neony/gallery/core.py`
- [Gallery sections](https://github.com/harcicyang/neony/tree/master/src/neony/gallery/sections): `src/neony/gallery/sections`
- [Gallery translations](https://github.com/harcicyang/neony/blob/master/src/neony/gallery/i18n.py): `src/neony/gallery/i18n.py`

### Other components

- **Python app author**
- **LumiView webview**

## Connections

- Python app author → Page composition: composes
- Page composition → Component base: contains
- Python app author → Window launcher: launches
- Window launcher → Page composition: renders (evidence: `src/neony/application/app.py`)
- Window launcher → LumiView webview: creates windows
- Window launcher → Patch bridge: configures (evidence: `src/neony/application/app.py`)
- Component base → DOM elements: builds (evidence: `src/neony/application/elements/base.py`)
- Component base → Reactive primitives: binds state (evidence: `src/neony/application/elements/base.py`)
- Controls and layouts → Component base: extends (evidence: `src/neony/application/elements/datatable.py`)
- Data views → Component base: extends (evidence: `src/neony/application/elements/datatable.py`)
- Chat widgets → Component base: extends (evidence: `src/neony/application/elements/chat.py`)
- Chat widgets → Menus and overlays: opens (evidence: `src/neony/application/elements/chat.py`)
- DOM elements → Node descriptors: serializes (evidence: `src/neony/dom/base.py`)
- DOM elements → CSS values: uses values (evidence: `src/neony/dom/base.py`)
- Patch bridge → DOM elements: diffs tree (evidence: `src/neony/dom/bridge.py`)
- Patch bridge → LumiView webview: sends patches
- Patch bridge → Browser runtime: dispatches commands
- Browser runtime → LumiView webview: updates web DOM
- Window launcher → Theme presets: injects theme (evidence: `src/neony/application/app.py`)
- Theme presets → CSS values: defines tokens (evidence: `src/neony/application/theme.py`)
- Window launcher → Positioned layers: configures (evidence: `src/neony/application/app.py`)
- Window launcher → System tray: sets up (evidence: `src/neony/application/app.py`)
- Python app author → Custom protocols: registers handlers
- Controls and layouts → Theme presets: uses tokens (evidence: `src/neony/application/elements/datatable.py`)
- Icon catalog → Controls and layouts: supplies icons (evidence: `src/neony/application/icons.py`)
- Gallery shell → Window launcher: creates app (evidence: `src/neony/gallery/core.py`)
- Gallery shell → Gallery translations: uses catalog (evidence: `src/neony/gallery/core.py`)
- Gallery sections → Gallery shell: uses shared shell (evidence: `src/neony/gallery/sections/interaction.py`)
- Gallery sections → Gallery translations: uses translations (evidence: `src/neony/gallery/sections/interaction.py`)
- Gallery shell → Theme presets: switches theme (evidence: `src/neony/gallery/core.py`)
