# eclipse-lmos/arc-view architecture

> Architecture diagram of the GitHub repository eclipse-lmos/arc-view, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eclipse-lmos/arc-view
- Repository: https://github.com/eclipse-lmos/arc-view

## Overview

##### Project type and purpose
- This is a multiplatform Flutter UI client ("Arc View") for interacting with a remote Arc Agent service over GraphQL.
- It runs on Android, iOS, Linux, macOS, Windows and Web. It uses Riverpod for state management, GraphQL & HTTP clients for data, and OIDC for authentication.

##### File structure
- Top-level platform folders: android/, ios/, linux/, macos/, windows/, web/ → Flutter runtimes and platform embedder code.
- lib/ → contains the entire Dart application under src/, subdivided by feature (authentication, chat, conversation, events, metrics, usecases, tools, prompts, tests, settings, audio, core UI, client services, layout).
- assets/config/app-config.yaml → runtime configuration.
- Dockerfile, .devcontainer → containerized development.
- helm/arc-view-web-chart → Kubernetes Helm chart for deploying the web build.
- CI/CD workflows (.github/workflows) → build, publish, compliance.

##### README for additional insights
- The README confirms: Flutter app, communicates with ARC Agent GraphQL endpoint, uses Riverpod, supports code-generation (build_runner), and web optimized with wasm.

##### Elements
- Clear labels: e.g., “UI: Chat Screen”, “Provider: ChatNotifier”, “Service: MessageSender”, “External: Arc Agent GraphQL API”
- From UI → Providers → Services → External APIs
- Config Loader → Services
- Helm Ingress → Web Static Assets

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Platforms
    subgraph "Client Platforms" 
        direction TB
        Android["Android"]:::platform
        iOS["iOS"]:::platform
        Linux["Linux"]:::platform
        macOS["macOS"]:::platform
        Windows["Windows"]:::platform
        Web["Web"]:::platform
    end

    %% Flutter Engine
    FlutterEngine["Flutter Engine\n(Dart VM/AOT/Wasm)"]:::engine

    Android --> FlutterEngine
    iOS --> FlutterEngine
    Linux --> FlutterEngine
    macOS --> FlutterEngine
    Windows --> FlutterEngine
    Web --> FlutterEngine

    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        ChatScreen["UI: Chat Screen"]:::presentation
        HomeScreen["UI: Home Screen"]:::presentation
        SettingsScreen["UI: Settings Screen"]:::presentation
        EventsScreen["UI: Events Screen"]:::presentation
        TestsScreen["UI: Tests Screen"]:::presentation
        MetricsScreen["UI: Metrics Screen"]:::presentation
    end

    FlutterEngine --> PresentationLayer[/"Presentation Layer"/]
    PresentationLayer --> ChatScreen
    PresentationLayer --> HomeScreen
    PresentationLayer --> SettingsScreen
    PresentationLayer --> EventsScreen
    PresentationLayer --> TestsScreen
    PresentationLayer --> MetricsScreen

    %% State Management Layer
    subgraph "State Management" 
        direction TB
        TokenNotifier["Provider: Token Notifier"]:::state
        UsecaseNotifier["Provider: Selected Usecase Notifier"]:::state
        AgentClientNotifier["Provider: Agent Client Notifier"]:::state
        AgentStreamNotifier["Provider: Agent Stream Client Notifier"]:::state
        MetricsNotifier["Provider: Agent Metrics Notifier"]:::state
        EventsNotifier["Provider: Agent Events Notifier"]:::state
        SettingsNotifier["Provider: Settings Notifier"]:::state
    end

    ChatScreen --> TokenNotifier
    HomeScreen --> TokenNotifier
    SettingsScreen --> TokenNotifier
    EventsScreen --> TokenNotifier
    TestsScreen --> TokenNotifier
    MetricsScreen --> TokenNotifier

    TokenNotifier --> UsecaseNotifier
    UsecaseNotifier --> AgentClientNotifier
    AgentClientNotifier --> AgentStreamNotifier
    AgentClientNotifier --> MetricsNotifier
    AgentClientNotifier --> EventsNotifier
    SettingsScreen --> SettingsNotifier

    %% Service/Data Layer
    subgraph "Service/Data Layer"
        direction TB
        GraphQLClient["Service: GraphQL Client\n(queries & subscriptions)"]:::service
        HttpClient["Service: HTTP Client"]:::service
        OIDCService["Service: OIDC Service"]:::service
        DesktopOIDC["Service: Desktop OIDC Service"]:::service
        AudioRecorder["Service: Audio Recorder"]:::service
        ConfigLoader["Service: Config Loader"]:::service
    end

    AgentClientNotifier --> GraphQLClient
    AgentStreamNotifier --> GraphQLClient
    MetricsNotifier --> GraphQLClient
    EventsNotifier --> GraphQLClient
    SettingsNotifier --> HttpClient
    TokenNotifier --> OIDCService
    TokenNotifier --> DesktopOIDC
    ChatScreen --> AudioRecorder
    ConfigLoader --> GraphQLClient
    ConfigLoader --> HttpClient
    ConfigLoader --> OIDCService
    ConfigLoader --> DesktopOIDC
    ConfigLoader --> AudioRecorder

    %% Domain Models & Repositories
    subgraph "Domain Models & Repositories"
        direction TB
        ConvImporter["Conversation Importer"]:::domain
        ConvExporter["Conversation Exporter"]:::domain
        TestsRepo["Tests Repository"]:::domain
        ToolsRepo["Tools Repository"]:::domain
        UsecaseRepo["Usecase Repository"]:::domain
        EnvsRepo["Settings Repository\n(envs)"]:::domain
        PromptsRepo["Prompts Repository"]:::domain
    end

    ConvImporter --> GraphQLClient
    ConvExporter --> GraphQLClient
    TestsRepo --> HttpClient
    ToolsRepo --> HttpClient
    UsecaseRepo --> GraphQLClient
    EnvsRepo --> HttpClient
    PromptsRepo --> HttpClient

    %% External Systems
    subgraph "External Systems"
        direction TB
        ArcAgentAPI["External: Arc Agent GraphQL API"]:::external
        OIDCProvider["External: OIDC Identity Provider"]:::external
        LocalAudio["Local OS Audio"]:::external
    end

    GraphQLClient --> ArcAgentAPI
    HttpClient --> OIDCProvider
    OIDCService --> OIDCProvider
    DesktopOIDC --> OIDCProvider
    AudioRecorder --> LocalAudio

    %% Deployment & DevOps
    subgraph "Dev & Deployment Tools"
        direction TB
        DockerfileNode["Dockerfile"]:::deployment
        DevContainer[".devcontainer/"]:::deployment
        HelmChart["Helm Chart"]:::deployment
        GitHubActions["GitHub Actions Workflows"]:::deployment
        Ingress["K8s Ingress"]:::deployment
        K8sService["K8s Service"]:::deployment
        StaticAssets["Web Static Assets"]:::deployment
    end

    Web --> DockerfileNode
    Web --> DevContainer
    DockerfileNode --> HelmChart
    DevContainer --> HelmChart
    HelmChart --> Ingress
    Ingress --> K8sService
    K8sService --> StaticAssets

    %% Click Events
    click Android "https://github.com/eclipse-lmos/arc-view/tree/main/android/"
    click iOS "https://github.com/eclipse-lmos/arc-view/tree/main/ios/"
    click Linux "https://github.com/eclipse-lmos/arc-view/tree/main/linux/"
    click macOS "https://github.com/eclipse-lmos/arc-view/tree/main/macos/"
    click Windows "https://github.com/eclipse-lmos/arc-view/tree/main/windows/"
    click Web "https://github.com/eclipse-lmos/arc-view/tree/main/web/"
    click ChatScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/chat/chat_screen.dart"
    click HomeScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/home/home_screen.dart"
    click SettingsScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/settings/settings_screen.dart"
    click EventsScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/events/events_screen.dart"
    click TestsScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/tests/tests_screen.dart"
    click MetricsScreen "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/metrics/charts_screen.dart"
    click TokenNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/authentication/notifier/token_notifier.dart"
    click UsecaseNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/chat/notifiers/selected_usecase_notifier.dart"
    click AgentClientNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/client/notifiers/agent_client_notifier.dart"
    click AgentStreamNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/client/notifiers/agent_stream_client_notifier.dart"
    click MetricsNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/metrics/notifiers/agent_metrics_notifier.dart"
    click EventsNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/events/notifiers/agent_events_notifier.dart"
    click SettingsNotifier "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/settings/notifiers/settings_notifier.dart"
    click GraphQLClient "https://github.com/eclipse-lmos/arc-view/tree/main/lib/src/client/graphql/"
    click HttpClient "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/client/http/http_client.dart"
    click OIDCService "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/authentication/service/oidc_service.dart"
    click DesktopOIDC "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/authentication/service/desktop_oidc_service.dart"
    click AudioRecorder "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/audio/services/voice_recorder.dart"
    click ConfigLoader "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/config_loader.dart"
    click ConvImporter "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/conversation/services/conversation_importer.dart"
    click ConvExporter "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/conversation/services/conversation_exporter.dart"
    click TestsRepo "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/tests/repositories/testcases_repository.dart"
    click ToolsRepo "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/tools/repositories/tools_repository.dart"
    click UsecaseRepo "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/usecases/repositories/usecase_repository.dart"
    click EnvsRepo "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/settings/repositories/envs_repository.dart"
    click PromptsRepo "https://github.com/eclipse-lmos/arc-view/blob/main/lib/src/prompts/repositories/history_repository.dart"
    click DockerfileNode "https://github.com/eclipse-lmos/arc-view/tree/main/Dockerfile"
    click DevContainer "https://github.com/eclipse-lmos/arc-view/tree/main/.devcontainer/"
    click HelmChart "https://github.com/eclipse-lmos/arc-view/tree/main/helm/arc-view-web-chart/"
    click GitHubActions "https://github.com/eclipse-lmos/arc-view/blob/main/.github/workflows/build.yml"
    click GitHubActions "https://github.com/eclipse-lmos/arc-view/blob/main/.github/workflows/publish.yml"

    %% Styles
    classDef platform fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1;
    classDef engine fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20;
    classDef presentation fill:#FFF9C4,stroke:#F57F17,color:#F57F17;
    classDef state fill:#FFCCBC,stroke:#E64A19,color:#E64A19;
    classDef service fill:#B2EBF2,stroke:#006064,color:#006064;
    classDef domain fill:#D1C4E9,stroke:#4A148C,color:#4A148C;
    classDef external fill:#FFECB3,stroke:#FF6F00,color:#FF6F00;
    classDef deployment fill:#F5F5F5,stroke:#616161,color:#616161;
```
