# brainiq-tech/nexos-browser architecture

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

- Interactive diagram: https://gitdiagram.com/brainiq-tech/nexos-browser
- Repository: https://github.com/brainiq-tech/nexos-browser

## Overview

NexOS Browser is a cross-platform, privacy-focused Chromium browser with custom-drawn UI, local profile data, and an optional local AI assistant. The main workflow is user input through the desktop app and browser UI, into core tab/navigation state and the CEF engine, then back as rendered page pixels composed with browser chrome. Privacy enforcement, browser-owned pages, profile features, and optional AI and weather capabilities are represented as separate branches. Some relationships are documented in the README; unsampled modules are included only where the README or source index supports their role.

Main entry points: [`app/src/lib.rs`](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/lib.rs) (Desktop app), [`ui/src/draw.rs`](https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/draw.rs) (Browser UI), [`app/src/cef_engine.rs`](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/cef_engine.rs) (Chromium adapter), [`ui/src/pages.rs`](https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/pages.rs) (Browser pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop and UI"]
  node_app["Desktop app<br/>[lib.rs]"]
  node_ui["Browser UI<br/>[draw.rs]"]
  node_home["Start page<br/>[home.rs]"]
  node_pages["Browser pages<br/>[pages.rs]"]
  node_paint["Drawing primitives<br/>[shapes.rs]"]
end

subgraph group_browser["Browser Runtime"]
  node_tabs["Tab state<br/>[tabs.rs]"]
  node_omnibox["Address and search<br/>[omnibox.rs]"]
  node_engine["Engine interface<br/>[engine.rs]"]
  node_cef["Chromium adapter<br/>[cef_engine.rs]"]
  node_cefapp["CEF application<br/>[cefapp.rs]"]
end

subgraph group_protection["Privacy and Profile"]
  node_store[("Profile store<br/>[store.rs]")]
  node_blocker["Ad and tracker blocking<br/>[blocker.rs]"]
  node_safety["Connection safety<br/>[safety.rs]"]
  node_vault["Password encryption<br/>[lib.rs]"]
  node_netlog["Network transparency<br/>[netlog.rs]"]
end

subgraph group_capabilities["Browser Features"]
  node_assistant["AI assistant<br/>[assistant.rs]"]
  node_llm["Local model runtime<br/>[llm.rs]"]
  node_gguf["GGUF model parser<br/>[lib.rs]"]
  node_infer["Model inference<br/>[lib.rs]"]
  node_weather["Weather service<br/>[lib.rs]"]
end

node_user(("Browser user"))

node_user -->|"uses"| node_app
node_app -->|"presents"| node_ui
node_ui -->|"renders"| node_home
node_ui -->|"renders"| node_pages
node_ui -->|"draws with"| node_paint
node_app -->|"manages"| node_tabs
node_app -->|"resolves input"| node_omnibox
node_app -->|"uses interface"| node_engine
node_cef -->|"implements"| node_engine
node_cefapp -->|"configures"| node_cef
node_cef -->|"checks requests"| node_blocker
node_app -->|"starts protections"| node_safety
node_app -->|"opens profile data"| node_store
node_pages -.->|"shows saved data"| node_store
node_pages -.->|"supports passwords"| node_vault
node_app -->|"hosts assistant"| node_assistant
node_assistant -.->|"requests inference"| node_llm
node_llm -.->|"loads model"| node_gguf
node_llm -.->|"runs model"| node_infer
node_home -.->|"shows forecast"| node_weather
node_blocker -->|"records downloads"| node_netlog
node_cef -.->|"records page requests"| node_netlog

click node_app "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/lib.rs"
click node_ui "https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/draw.rs"
click node_home "https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/home.rs"
click node_pages "https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/pages.rs"
click node_tabs "https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/tabs.rs"
click node_omnibox "https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/omnibox.rs"
click node_engine "https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/engine.rs"
click node_cef "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/cef_engine.rs"
click node_cefapp "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/cefapp.rs"
click node_store "https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/store.rs"
click node_blocker "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/blocker.rs"
click node_safety "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/safety.rs"
click node_vault "https://github.com/brainiq-tech/nexos-browser/blob/main/shared/vault/src/lib.rs"
click node_assistant "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/assistant.rs"
click node_llm "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/llm.rs"
click node_gguf "https://github.com/brainiq-tech/nexos-browser/blob/main/shared/gguf/src/lib.rs"
click node_infer "https://github.com/brainiq-tech/nexos-browser/blob/main/shared/infer/src/lib.rs"
click node_weather "https://github.com/brainiq-tech/nexos-browser/blob/main/shared/weather/src/lib.rs"
click node_paint "https://github.com/brainiq-tech/nexos-browser/blob/main/shared/paint/src/shapes.rs"
click node_netlog "https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/netlog.rs"

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_app,node_ui,node_home,node_pages,node_paint,node_user toneBlue
class node_tabs,node_omnibox,node_engine,node_cef,node_cefapp toneAmber
class node_store,node_blocker,node_safety,node_vault,node_netlog toneMint
class node_assistant,node_llm,node_gguf,node_infer,node_weather toneRose
```

## Components

### Desktop and UI

- [Desktop app](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/lib.rs): `app/src/lib.rs`
- [Browser UI](https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/draw.rs): `ui/src/draw.rs`
- [Start page](https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/home.rs): `ui/src/home.rs`
- [Browser pages](https://github.com/brainiq-tech/nexos-browser/blob/main/ui/src/pages.rs): `ui/src/pages.rs`
- [Drawing primitives](https://github.com/brainiq-tech/nexos-browser/blob/main/shared/paint/src/shapes.rs): `shared/paint/src/shapes.rs`

### Browser Runtime

- [Tab state](https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/tabs.rs): `core/src/tabs.rs`
- [Address and search](https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/omnibox.rs): `core/src/omnibox.rs`
- [Engine interface](https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/engine.rs): `core/src/engine.rs`
- [Chromium adapter](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/cef_engine.rs): `app/src/cef_engine.rs`
- [CEF application](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/cefapp.rs): `app/src/cefapp.rs`

### Privacy and Profile

- [Profile store](https://github.com/brainiq-tech/nexos-browser/blob/main/core/src/store.rs): `core/src/store.rs`
- [Ad and tracker blocking](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/blocker.rs): `app/src/blocker.rs`
- [Connection safety](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/safety.rs): `app/src/safety.rs`
- [Password encryption](https://github.com/brainiq-tech/nexos-browser/blob/main/shared/vault/src/lib.rs): `shared/vault/src/lib.rs`
- [Network transparency](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/netlog.rs): `app/src/netlog.rs`

### Browser Features

- [AI assistant](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/assistant.rs): `app/src/assistant.rs`
- [Local model runtime](https://github.com/brainiq-tech/nexos-browser/blob/main/app/src/llm.rs): `app/src/llm.rs`
- [GGUF model parser](https://github.com/brainiq-tech/nexos-browser/blob/main/shared/gguf/src/lib.rs): `shared/gguf/src/lib.rs`
- [Model inference](https://github.com/brainiq-tech/nexos-browser/blob/main/shared/infer/src/lib.rs): `shared/infer/src/lib.rs`
- [Weather service](https://github.com/brainiq-tech/nexos-browser/blob/main/shared/weather/src/lib.rs): `shared/weather/src/lib.rs`

### Other components

- **Browser user**

## Connections

- Browser user → Desktop app: uses
- Desktop app → Browser UI: presents
- Browser UI → Start page: renders (evidence: `ui/src/draw.rs`)
- Browser UI → Browser pages: renders (evidence: `ui/src/draw.rs`)
- Browser UI → Drawing primitives: draws with (evidence: `ui/src/draw.rs`)
- Desktop app → Tab state: manages
- Desktop app → Address and search: resolves input
- Desktop app → Engine interface: uses interface
- Chromium adapter → Engine interface: implements (evidence: `app/src/cef_engine.rs`)
- CEF application → Chromium adapter: configures (evidence: `app/src/cefapp.rs`)
- Chromium adapter → Ad and tracker blocking: checks requests (evidence: `app/src/cef_engine.rs`)
- Desktop app → Connection safety: starts protections (evidence: `app/src/lib.rs`)
- Desktop app → Profile store: opens profile data (evidence: `app/src/lib.rs`)
- Browser pages → Profile store: shows saved data
- Browser pages → Password encryption: supports passwords
- Desktop app → AI assistant: hosts assistant (evidence: `app/src/lib.rs`)
- AI assistant → Local model runtime: requests inference
- Local model runtime → GGUF model parser: loads model
- Local model runtime → Model inference: runs model
- Start page → Weather service: shows forecast
- Ad and tracker blocking → Network transparency: records downloads (evidence: `app/src/blocker.rs`)
- Chromium adapter → Network transparency: records page requests (evidence: `app/src/cef_engine.rs`)
