# vishaalpillay/oneclick architecture

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

- Interactive diagram: https://gitdiagram.com/vishaalpillay/oneclick
- Repository: https://github.com/vishaalpillay/oneclick

## Overview

OneClick turns a complaint and, when available, a Samsung SIIS article into a grounded troubleshooting plan with verified Settings deeplinks. The API routes requests into the engine pipeline; its documented stages normalize and enrich the input, segment and extract article instructions, ground and organize actions, resolve links, and compile the final goals. Requests without an article can use remembered plans or articles. The console demonstrates the workflow and can stream stage events. Source excerpts were partial, so edges between internal stages are limited to documented orchestration and capabilities.

Main entry points: [`api/app/pipeline/run.py`](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/run.py) (Pipeline runner), [`api/app/main.py`](https://github.com/vishaalpillay/oneclick/blob/main/api/app/main.py) (API entrypoint), [`api/app/screengraph/resolver.py`](https://github.com/vishaalpillay/oneclick/blob/main/api/app/screengraph/resolver.py) (Deeplink resolver), [`api/app/routes/troubleshoot.py`](https://github.com/vishaalpillay/oneclick/blob/main/api/app/routes/troubleshoot.py) (Troubleshoot route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_console["Web console<br/>[page.tsx]"]
  node_live["Live stream client<br/>[stream.ts]"]
end

subgraph group_engine["Troubleshooting engine"]
  node_api["API entrypoint<br/>[main.py]"]
  node_troubleshoot["Troubleshoot route<br/>[troubleshoot.py]"]
  node_stream["Streaming route<br/>[stream.py]"]
  node_runner["Pipeline runner<br/>[run.py]"]
  node_normalize["Normalize and slots<br/>[normalize.py]"]
  node_enrich["Enrich complaint<br/>[enrich.py]"]
  node_segment["Segment article<br/>[segment.py]"]
  node_extract["Extract actions<br/>[extract.py]"]
  node_ground["Ground actions<br/>[ground.py]"]
  node_organize["Organize intents<br/>[order.py]"]
  node_compile["Compile plan<br/>[compile.py]"]
end

subgraph group_knowledge["Knowledge and resolution"]
  node_resolver["Deeplink resolver<br/>[resolver.py]"]
  node_retrieval["Hybrid retrieval<br/>[fuse.py]"]
  node_screen["Screen Graph<br/>[build.py]"]
end

subgraph group_services["Models and state"]
  node_cache["Plan cache<br/>[__init__.py]"]
  node_noarticle["No-article fallback<br/>[no_siis.py]"]
  node_store[("SQLite cache store<br/>[store.py]")]
  node_llm["Model router<br/>[router.py]"]
end

subgraph group_operations["Operations"]
  node_obs["Metrics and traces<br/>[trace.py]"]
end

node_user(("User"))
node_providers["Model providers"]

node_user -->|"enters complaint"| node_console
node_console -->|"starts live request"| node_live
node_live -->|"streams request"| node_stream
node_user -->|"submits complaint"| node_troubleshoot
node_api -->|"serves endpoint"| node_troubleshoot
node_api -->|"serves endpoint"| node_stream
node_troubleshoot -->|"runs pipeline"| node_runner
node_stream -->|"runs pipeline"| node_runner
node_runner -->|"checks cached plans"| node_cache
node_runner -->|"looks up no-article fallback"| node_noarticle
node_cache -->|"reads and writes"| node_store
node_noarticle -->|"reads and writes"| node_store
node_runner -->|"normalizes input"| node_normalize
node_runner -->|"enriches complaint"| node_enrich
node_runner -->|"segments article"| node_segment
node_runner -->|"extracts instructions"| node_extract
node_runner -->|"grounds steps"| node_ground
node_runner -->|"orders intents"| node_organize
node_runner -->|"resolves screen links"| node_resolver
node_runner -->|"compiles goals"| node_compile
node_resolver -->|"retrieves candidates"| node_retrieval
node_resolver -->|"checks screen paths"| node_screen
node_enrich -.->|"requests model output"| node_llm
node_extract -.->|"requests model output"| node_llm
node_llm -.->|"calls configured models"| node_providers
node_api -->|"exposes observability"| node_obs

click node_console "https://github.com/vishaalpillay/oneclick/blob/main/console/app/page.tsx"
click node_live "https://github.com/vishaalpillay/oneclick/blob/main/console/lib/stream.ts"
click node_api "https://github.com/vishaalpillay/oneclick/blob/main/api/app/main.py"
click node_troubleshoot "https://github.com/vishaalpillay/oneclick/blob/main/api/app/routes/troubleshoot.py"
click node_stream "https://github.com/vishaalpillay/oneclick/blob/main/api/app/routes/stream.py"
click node_runner "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/run.py"
click node_normalize "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/normalize.py"
click node_enrich "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/enrich.py"
click node_segment "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/segment.py"
click node_extract "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/extract.py"
click node_ground "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/ground.py"
click node_organize "https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/order.py"
click node_compile "https://github.com/vishaalpillay/oneclick/blob/main/api/app/compiler/compile.py"
click node_resolver "https://github.com/vishaalpillay/oneclick/blob/main/api/app/screengraph/resolver.py"
click node_retrieval "https://github.com/vishaalpillay/oneclick/blob/main/api/app/retrieval/fuse.py"
click node_screen "https://github.com/vishaalpillay/oneclick/blob/main/api/app/screengraph/build.py"
click node_cache "https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/__init__.py"
click node_noarticle "https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/no_siis.py"
click node_store "https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/store.py"
click node_llm "https://github.com/vishaalpillay/oneclick/blob/main/api/app/llm/router.py"
click node_obs "https://github.com/vishaalpillay/oneclick/blob/main/api/app/obs/trace.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_console,node_live,node_user toneBlue
class node_api,node_troubleshoot,node_stream,node_runner,node_normalize,node_enrich,node_segment,node_extract,node_ground,node_organize,node_compile toneAmber
class node_resolver,node_retrieval,node_screen toneMint
class node_cache,node_noarticle,node_store,node_llm toneRose
class node_obs,node_providers toneIndigo
```

## Components

### User experience

- [Web console](https://github.com/vishaalpillay/oneclick/blob/main/console/app/page.tsx): `console/app/page.tsx`
- [Live stream client](https://github.com/vishaalpillay/oneclick/blob/main/console/lib/stream.ts): `console/lib/stream.ts`

### Troubleshooting engine

- [API entrypoint](https://github.com/vishaalpillay/oneclick/blob/main/api/app/main.py): `api/app/main.py`
- [Troubleshoot route](https://github.com/vishaalpillay/oneclick/blob/main/api/app/routes/troubleshoot.py): `api/app/routes/troubleshoot.py`
- [Streaming route](https://github.com/vishaalpillay/oneclick/blob/main/api/app/routes/stream.py): `api/app/routes/stream.py`
- [Pipeline runner](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/run.py): `api/app/pipeline/run.py`
- [Normalize and slots](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/normalize.py): `api/app/pipeline/normalize.py`
- [Enrich complaint](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/enrich.py): `api/app/pipeline/enrich.py`
- [Segment article](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/segment.py): `api/app/pipeline/segment.py`
- [Extract actions](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/extract.py): `api/app/pipeline/extract.py`
- [Ground actions](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/ground.py): `api/app/pipeline/ground.py`
- [Organize intents](https://github.com/vishaalpillay/oneclick/blob/main/api/app/pipeline/order.py): `api/app/pipeline/order.py`
- [Compile plan](https://github.com/vishaalpillay/oneclick/blob/main/api/app/compiler/compile.py): `api/app/compiler/compile.py`

### Knowledge and resolution

- [Deeplink resolver](https://github.com/vishaalpillay/oneclick/blob/main/api/app/screengraph/resolver.py): `api/app/screengraph/resolver.py`
- [Hybrid retrieval](https://github.com/vishaalpillay/oneclick/blob/main/api/app/retrieval/fuse.py): `api/app/retrieval/fuse.py`
- [Screen Graph](https://github.com/vishaalpillay/oneclick/blob/main/api/app/screengraph/build.py): `api/app/screengraph/build.py`

### Models and state

- [Plan cache](https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/__init__.py): `api/app/cache/__init__.py`
- [No-article fallback](https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/no_siis.py): `api/app/cache/no_siis.py`
- [SQLite cache store](https://github.com/vishaalpillay/oneclick/blob/main/api/app/cache/store.py): `api/app/cache/store.py`
- [Model router](https://github.com/vishaalpillay/oneclick/blob/main/api/app/llm/router.py): `api/app/llm/router.py`

### Operations

- [Metrics and traces](https://github.com/vishaalpillay/oneclick/blob/main/api/app/obs/trace.py): `api/app/obs/trace.py`

### Other components

- **User**
- **Model providers**

## Connections

- User → Web console: enters complaint
- Web console → Live stream client: starts live request
- Live stream client → Streaming route: streams request
- User → Troubleshoot route: submits complaint
- API entrypoint → Troubleshoot route: serves endpoint
- API entrypoint → Streaming route: serves endpoint
- Troubleshoot route → Pipeline runner: runs pipeline
- Streaming route → Pipeline runner: runs pipeline
- Pipeline runner → Plan cache: checks cached plans
- Pipeline runner → No-article fallback: looks up no-article fallback
- Plan cache → SQLite cache store: reads and writes
- No-article fallback → SQLite cache store: reads and writes
- Pipeline runner → Normalize and slots: normalizes input
- Pipeline runner → Enrich complaint: enriches complaint
- Pipeline runner → Segment article: segments article
- Pipeline runner → Extract actions: extracts instructions
- Pipeline runner → Ground actions: grounds steps
- Pipeline runner → Organize intents: orders intents
- Pipeline runner → Deeplink resolver: resolves screen links
- Pipeline runner → Compile plan: compiles goals
- Deeplink resolver → Hybrid retrieval: retrieves candidates
- Deeplink resolver → Screen Graph: checks screen paths
- Enrich complaint → Model router: requests model output
- Extract actions → Model router: requests model output
- Model router → Model providers: calls configured models
- API entrypoint → Metrics and traces: exposes observability
