# thiyaanes/clyx-app-fixed architecture

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

- Interactive diagram: https://gitdiagram.com/thiyaanes/clyx-app-fixed
- Repository: https://github.com/thiyaanes/clyx-app-fixed

## Overview

CLYX is an Electron desktop app for opening web apps inside an embedded browser. The main workflow is the CLYX interface invoking Electron capabilities through a preload bridge, with the main process managing the embedded view and navigation. A separate documented capability is Google sign-in via the system browser and a local OAuth callback. The README also describes a local proxy, but no proxy implementation is present in the supplied tree; its details and wiring cannot be verified here.

Main entry points: [`main.js`](https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js) (Embedded app view), [`preload.js`](https://github.com/thiyaanes/clyx-app-fixed/blob/main/preload.js) (IPC bridge), [`clyx.html`](https://github.com/thiyaanes/clyx-app-fixed/blob/main/clyx.html) (CLYX interface), [`view-preload.js`](https://github.com/thiyaanes/clyx-app-fixed/blob/main/view-preload.js) (View compatibility)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_ui["CLYX interface<br/>[clyx.html]"]
  node_bridge["IPC bridge<br/>[preload.js]"]
  node_main["Electron main<br/>[main.js]"]
  node_view["Embedded app view<br/>[main.js]"]
  node_viewpreload["View compatibility<br/>[view-preload.js]"]
end

subgraph group_auth["Authentication"]
  node_systembrowser(("System browser"))
  node_oauth["OAuth callback server<br/>[main.js]"]
  node_backend(("CLYX backend"))
end

node_user(("User"))
node_webapps(("Web apps"))
node_proxy["Local proxy"]

node_user -->|"uses"| node_ui
node_bridge -->|"invokes IPC"| node_main
node_main -->|"loads URL"| node_view
node_view -->|"configures"| node_viewpreload
node_view -->|"loads apps"| node_webapps
node_main -->|"handles callback"| node_oauth
node_oauth -->|"opens sign-in"| node_systembrowser
node_oauth -->|"exchanges code"| node_backend
node_view -.->|"loads through"| node_proxy
node_proxy -.->|"forwards requests"| node_webapps

click node_ui "https://github.com/thiyaanes/clyx-app-fixed/blob/main/clyx.html"
click node_bridge "https://github.com/thiyaanes/clyx-app-fixed/blob/main/preload.js"
click node_main "https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js"
click node_view "https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js"
click node_viewpreload "https://github.com/thiyaanes/clyx-app-fixed/blob/main/view-preload.js"
click node_oauth "https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js"

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_bridge,node_main,node_view,node_viewpreload,node_user toneBlue
class node_systembrowser,node_oauth,node_backend toneAmber
class node_webapps,node_proxy toneIndigo
```

## Components

### Desktop experience

- [CLYX interface](https://github.com/thiyaanes/clyx-app-fixed/blob/main/clyx.html): `clyx.html`
- [IPC bridge](https://github.com/thiyaanes/clyx-app-fixed/blob/main/preload.js): `preload.js`
- [Electron main](https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js): `main.js`
- [Embedded app view](https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js): `main.js`
- [View compatibility](https://github.com/thiyaanes/clyx-app-fixed/blob/main/view-preload.js): `view-preload.js`

### Authentication

- **System browser**
- [OAuth callback server](https://github.com/thiyaanes/clyx-app-fixed/blob/main/main.js): `main.js`
- **CLYX backend**

### Other components

- **User**
- **Web apps**
- **Local proxy**

## Connections

- User → CLYX interface: uses (evidence: `README.md`)
- IPC bridge → Electron main: invokes IPC (evidence: `preload.js`)
- Electron main → Embedded app view: loads URL (evidence: `main.js`)
- Embedded app view → View compatibility: configures (evidence: `main.js`)
- Embedded app view → Web apps: loads apps (evidence: `README.md`)
- Electron main → OAuth callback server: handles callback (evidence: `main.js`)
- OAuth callback server → System browser: opens sign-in (evidence: `main.js`)
- OAuth callback server → CLYX backend: exchanges code (evidence: `main.js`)
- Embedded app view → Local proxy: loads through (evidence: `README.md`)
- Local proxy → Web apps: forwards requests (evidence: `README.md`)
