# cogwheel0/conduit architecture

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

- Interactive diagram: https://gitdiagram.com/cogwheel0/conduit
- Repository: https://github.com/cogwheel0/conduit

## Overview

Conduit is a native Flutter mobile client for Open WebUI, compatible model endpoints, and self-hosted Hermes agents. Users connect an endpoint, authenticate when needed, then chat with streaming responses, attachments, and voice; they can also use workspace tools and other server-enabled features. Flutter feature modules implement the product, while Android and iOS bridges provide platform services such as background streaming, speech, widgets, and sharing. The README documents the main capabilities and integrations; several feature implementations were not sampled, so their internal call paths are not asserted.

Main entry points: [`lib/features/chat/views/chat_page.dart`](https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/views/chat_page.dart) (Chat interface), [`lib/features/chat/services/chat_transport_dispatch.dart`](https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/services/chat_transport_dispatch.dart) (Chat transport), [`lib/features/chat/providers`](https://github.com/cogwheel0/conduit/tree/main/lib/features/chat/providers) (Chat orchestration), [`lib/features/auth/views`](https://github.com/cogwheel0/conduit/tree/main/lib/features/auth/views) (Connection setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_connection["Connection and Auth"]
  node_connect["Connection setup"]
  node_auth["Authentication"]
  node_openwebui["Open WebUI"]
  node_direct["Direct providers"]
  node_hermes["Hermes agent"]
end

subgraph group_conversation["Chat and Voice"]
  node_chatui["Chat interface<br/>[chat_page.dart]"]
  node_chatflow["Chat orchestration"]
  node_transport["Chat transport"]
  node_render["Message rendering"]
  node_attachments["Media attachments"]
  node_voice["Voice services"]
end

subgraph group_capabilities["Product Features"]
  node_workspace["Workspace"]
  node_channels["Channels"]
  node_notes["Notes"]
  node_terminal["Terminal"]
end

subgraph group_platform["Native Platform"]
  node_background["Background streaming"]
  node_nativeapp["Android app bridge<br/>[MainActivity.kt]"]
  node_iosapp["iOS app bridge<br/>[AppDelegate.swift]"]
  node_nativevoice["Native speech"]
  node_iosshare["Share extension"]
  node_sharestore[("Share envelope store")]
  node_ioswidget["iOS widget"]
end

subgraph group_foundation["App Foundation"]
  node_storage[("Local persistence")]
  node_router["App navigation<br/>[app_router.dart]"]
end

node_user(("Mobile user"))

node_user -->|"chooses connection"| node_connect
node_connect -->|"starts sign-in"| node_auth
node_auth -->|"authenticates with"| node_openwebui
node_user -->|"starts conversation"| node_chatui
node_chatui -->|"submits prompt"| node_chatflow
node_chatflow -.->|"dispatches request"| node_transport
node_transport -->|"sends requests"| node_openwebui
node_transport -->|"sends requests"| node_direct
node_transport -->|"connects agent"| node_hermes
node_chatui -->|"shows replies"| node_render
node_chatui -->|"accepts media"| node_attachments
node_chatui -->|"offers voice"| node_voice
node_chatui -->|"opens workspace"| node_workspace
node_chatui -->|"opens channels"| node_channels
node_chatui -->|"opens notes"| node_notes
node_chatui -->|"opens terminal"| node_terminal
node_chatflow -->|"persists chats"| node_storage
node_user -.->|"navigates app"| node_router
node_nativeapp -->|"configures streaming"| node_background
node_iosapp -->|"configures speech"| node_nativevoice
node_iosshare -->|"publishes envelope"| node_sharestore
node_ioswidget -->|"opens app links"| node_iosapp

click node_connect "https://github.com/cogwheel0/conduit/tree/main/lib/features/auth/views"
click node_auth "https://github.com/cogwheel0/conduit/tree/main/lib/features/auth/views"
click node_direct "https://github.com/cogwheel0/conduit/tree/main/packages/conduit_core/lib/features/direct_connections"
click node_hermes "https://github.com/cogwheel0/conduit/tree/main/lib/features/hermes"
click node_chatui "https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/views/chat_page.dart"
click node_chatflow "https://github.com/cogwheel0/conduit/tree/main/lib/features/chat/providers"
click node_transport "https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/services/chat_transport_dispatch.dart"
click node_render "https://github.com/cogwheel0/conduit/tree/main/packages/conduit_markdown/lib"
click node_attachments "https://github.com/cogwheel0/conduit/tree/main/lib/features/chat/services"
click node_voice "https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/services/voice_input_service.dart"
click node_workspace "https://github.com/cogwheel0/conduit/tree/main/lib/features/workspace"
click node_channels "https://github.com/cogwheel0/conduit/tree/main/lib/features/channels"
click node_notes "https://github.com/cogwheel0/conduit/tree/main/lib/features/notes"
click node_terminal "https://github.com/cogwheel0/conduit/tree/main/lib/features/terminal"
click node_background "https://github.com/cogwheel0/conduit/blob/main/android/app/src/main/kotlin/app/cogwheel/conduit/BackgroundStreamingHandler.kt"
click node_nativeapp "https://github.com/cogwheel0/conduit/blob/main/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt"
click node_iosapp "https://github.com/cogwheel0/conduit/blob/main/ios/Runner/AppDelegate.swift"
click node_nativevoice "https://github.com/cogwheel0/conduit/blob/main/ios/Runner/NativeSttBridge.swift"
click node_iosshare "https://github.com/cogwheel0/conduit/blob/main/ios/ShareExtension/ShareViewController.swift"
click node_sharestore "https://github.com/cogwheel0/conduit/blob/main/ios/ShareExtension/NativeShareEnvelopeStore.swift"
click node_ioswidget "https://github.com/cogwheel0/conduit/blob/main/ios/ConduitWidget/ConduitWidget.swift"
click node_storage "https://github.com/cogwheel0/conduit/tree/main/packages/conduit_core/lib/database"
click node_router "https://github.com/cogwheel0/conduit/blob/main/lib/core/router/app_router.dart"

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_connect,node_auth,node_openwebui,node_direct,node_hermes,node_user toneBlue
class node_chatui,node_chatflow,node_transport,node_render,node_attachments,node_voice toneAmber
class node_workspace,node_channels,node_notes,node_terminal toneMint
class node_background,node_nativeapp,node_iosapp,node_nativevoice,node_iosshare,node_sharestore,node_ioswidget toneRose
class node_storage,node_router toneIndigo
```

## Components

### Connection and Auth

- [Connection setup](https://github.com/cogwheel0/conduit/tree/main/lib/features/auth/views): `lib/features/auth/views`
- [Authentication](https://github.com/cogwheel0/conduit/tree/main/lib/features/auth/views): `lib/features/auth/views`
- **Open WebUI**
- [Direct providers](https://github.com/cogwheel0/conduit/tree/main/packages/conduit_core/lib/features/direct_connections): `packages/conduit_core/lib/features/direct_connections`
- [Hermes agent](https://github.com/cogwheel0/conduit/tree/main/lib/features/hermes): `lib/features/hermes`

### Chat and Voice

- [Chat interface](https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/views/chat_page.dart): `lib/features/chat/views/chat_page.dart`
- [Chat orchestration](https://github.com/cogwheel0/conduit/tree/main/lib/features/chat/providers): `lib/features/chat/providers`
- [Chat transport](https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/services/chat_transport_dispatch.dart): `lib/features/chat/services/chat_transport_dispatch.dart`
- [Message rendering](https://github.com/cogwheel0/conduit/tree/main/packages/conduit_markdown/lib): `packages/conduit_markdown/lib`
- [Media attachments](https://github.com/cogwheel0/conduit/tree/main/lib/features/chat/services): `lib/features/chat/services`
- [Voice services](https://github.com/cogwheel0/conduit/blob/main/lib/features/chat/services/voice_input_service.dart): `lib/features/chat/services/voice_input_service.dart`

### Product Features

- [Workspace](https://github.com/cogwheel0/conduit/tree/main/lib/features/workspace): `lib/features/workspace`
- [Channels](https://github.com/cogwheel0/conduit/tree/main/lib/features/channels): `lib/features/channels`
- [Notes](https://github.com/cogwheel0/conduit/tree/main/lib/features/notes): `lib/features/notes`
- [Terminal](https://github.com/cogwheel0/conduit/tree/main/lib/features/terminal): `lib/features/terminal`

### Native Platform

- [Background streaming](https://github.com/cogwheel0/conduit/blob/main/android/app/src/main/kotlin/app/cogwheel/conduit/BackgroundStreamingHandler.kt): `android/app/src/main/kotlin/app/cogwheel/conduit/BackgroundStreamingHandler.kt`
- [Android app bridge](https://github.com/cogwheel0/conduit/blob/main/android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt): `android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt`
- [iOS app bridge](https://github.com/cogwheel0/conduit/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Native speech](https://github.com/cogwheel0/conduit/blob/main/ios/Runner/NativeSttBridge.swift): `ios/Runner/NativeSttBridge.swift`
- [Share extension](https://github.com/cogwheel0/conduit/blob/main/ios/ShareExtension/ShareViewController.swift): `ios/ShareExtension/ShareViewController.swift`
- [Share envelope store](https://github.com/cogwheel0/conduit/blob/main/ios/ShareExtension/NativeShareEnvelopeStore.swift): `ios/ShareExtension/NativeShareEnvelopeStore.swift`
- [iOS widget](https://github.com/cogwheel0/conduit/blob/main/ios/ConduitWidget/ConduitWidget.swift): `ios/ConduitWidget/ConduitWidget.swift`

### App Foundation

- [Local persistence](https://github.com/cogwheel0/conduit/tree/main/packages/conduit_core/lib/database): `packages/conduit_core/lib/database`
- [App navigation](https://github.com/cogwheel0/conduit/blob/main/lib/core/router/app_router.dart): `lib/core/router/app_router.dart`

### Other components

- **Mobile user**

## Connections

- Mobile user → Connection setup: chooses connection (evidence: `README.md`)
- Connection setup → Authentication: starts sign-in (evidence: `README.md`)
- Authentication → Open WebUI: authenticates with (evidence: `README.md`)
- Mobile user → Chat interface: starts conversation (evidence: `README.md`)
- Chat interface → Chat orchestration: submits prompt (evidence: `README.md`)
- Chat orchestration → Chat transport: dispatches request
- Chat transport → Open WebUI: sends requests (evidence: `README.md`)
- Chat transport → Direct providers: sends requests (evidence: `README.md`)
- Chat transport → Hermes agent: connects agent (evidence: `README.md`)
- Chat interface → Message rendering: shows replies (evidence: `README.md`)
- Chat interface → Media attachments: accepts media (evidence: `README.md`)
- Chat interface → Voice services: offers voice (evidence: `README.md`)
- Chat interface → Workspace: opens workspace (evidence: `README.md`)
- Chat interface → Channels: opens channels (evidence: `README.md`)
- Chat interface → Notes: opens notes (evidence: `README.md`)
- Chat interface → Terminal: opens terminal (evidence: `README.md`)
- Chat orchestration → Local persistence: persists chats (evidence: `README.md`)
- Mobile user → App navigation: navigates app
- Android app bridge → Background streaming: configures streaming (evidence: `android/app/src/main/kotlin/app/cogwheel/conduit/MainActivity.kt`)
- iOS app bridge → Native speech: configures speech (evidence: `ios/Runner/AppDelegate.swift`)
- Share extension → Share envelope store: publishes envelope (evidence: `ios/ShareExtension/ShareViewController.swift`)
- iOS widget → iOS app bridge: opens app links (evidence: `README.md`)
