# amazon-connect/touchpoint architecture

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

- Interactive diagram: https://gitdiagram.com/amazon-connect/touchpoint
- Repository: https://github.com/amazon-connect/touchpoint

## Overview

Touchpoint is a browser-embeddable conversational UI and SDK for Amazon Connect Customer. A caller creates a widget (or mounts the custom element); the UI selects chat, full-screen voice, or voice-mini, while the Connect adapter obtains contact details and manages the conversation. Messages, prompts, and modality-specific content are presented in the widget. Optional Live Sync gathers page context and applies assistant actions to the page. The playground configures and launches the widget. Some subsystem links are documented capabilities rather than inspected call sites; those are marked dashed.

Main entry points: [`src/App.tsx`](https://github.com/amazon-connect/touchpoint/blob/main/src/App.tsx) (Conversation controller), [`src/playground/App.tsx`](https://github.com/amazon-connect/touchpoint/blob/main/src/playground/App.tsx) (Playground configuration), [`src/connect/index.ts`](https://github.com/amazon-connect/touchpoint/blob/main/src/connect/index.ts) (Connect adapter), [`src/index.tsx`](https://github.com/amazon-connect/touchpoint/blob/main/src/index.tsx) (SDK and element API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["SDK entry"]
  node_sdk["SDK and element API<br/>[index.tsx]"]
end

subgraph group_conversation["Conversation UI"]
  node_app["Conversation controller<br/>[App.tsx]"]
  node_providers["Theme and providers<br/>[ProviderStack.tsx]"]
  node_messages["Chat transcript<br/>[Messages.tsx]"]
  node_input["Chat input<br/>[Input.tsx]"]
  node_announcements["Guides and announcements<br/>[Announcements.tsx]"]
  node_modalities["Rich modalities"]
  node_voice["Voice experiences"]
  node_voice_mini["Voice mini<br/>[VoiceMini.tsx]"]
end

subgraph group_connect["Connect runtime"]
  node_connector["Connect adapter<br/>[index.ts]"]
  node_conversation_runtime["Conversation runtime<br/>[conversation.ts]"]
  node_renderer["Connect view renderer<br/>[viewRenderer.ts]"]
  node_sync_runtime["Live Sync connection<br/>[liveSync.ts]"]
end

subgraph group_sync["Live Sync"]
  node_context["Page context gathering"]
  node_form_analysis["Page form analysis"]
  node_actions["Page action handler<br/>[actionHandler.ts]"]
end

subgraph group_playground["Playground"]
  node_playground["Playground configuration<br/>[App.tsx]"]
  node_playground_launch["Widget launch hook<br/>[useTouchpoint.ts]"]
  node_playground_router["Playground routes<br/>[Router.tsx]"]
end

node_developer(("Widget integrator"))
node_playground_user(("Playground user"))

node_developer -->|"creates or mounts"| node_sdk
node_sdk -->|"renders"| node_app
node_app -->|"uses"| node_providers
node_app -->|"renders"| node_messages
node_app -->|"renders"| node_input
node_app -->|"renders"| node_announcements
node_app -->|"selects"| node_modalities
node_app -->|"renders"| node_voice
node_app -->|"renders"| node_voice_mini
node_connector -->|"creates"| node_conversation_runtime
node_connector -.->|"uses"| node_renderer
node_conversation_runtime -->|"uses"| node_sync_runtime
node_context -->|"analyzes forms"| node_form_analysis
node_context -->|"uses"| node_connector
node_playground_user -->|"configures"| node_playground
node_playground -->|"launches"| node_playground_launch
node_playground_launch -->|"creates widget"| node_sdk
node_playground -->|"routes pages"| node_playground_router

click node_sdk "https://github.com/amazon-connect/touchpoint/blob/main/src/index.tsx"
click node_app "https://github.com/amazon-connect/touchpoint/blob/main/src/App.tsx"
click node_providers "https://github.com/amazon-connect/touchpoint/blob/main/src/ProviderStack.tsx"
click node_messages "https://github.com/amazon-connect/touchpoint/blob/main/src/components/Messages.tsx"
click node_input "https://github.com/amazon-connect/touchpoint/blob/main/src/components/Input.tsx"
click node_announcements "https://github.com/amazon-connect/touchpoint/blob/main/src/components/Announcements.tsx"
click node_modalities "https://github.com/amazon-connect/touchpoint/tree/main/src/components/defaultModalities"
click node_voice "https://github.com/amazon-connect/touchpoint/blob/main/src/components/FullscreenVoice.tsx"
click node_voice_mini "https://github.com/amazon-connect/touchpoint/blob/main/src/components/VoiceMini.tsx"
click node_connector "https://github.com/amazon-connect/touchpoint/blob/main/src/connect/index.ts"
click node_conversation_runtime "https://github.com/amazon-connect/touchpoint/blob/main/src/connect/conversation.ts"
click node_renderer "https://github.com/amazon-connect/touchpoint/blob/main/src/connect/viewRenderer.ts"
click node_sync_runtime "https://github.com/amazon-connect/touchpoint/blob/main/src/connect/liveSync.ts"
click node_context "https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/automaticContext.ts"
click node_form_analysis "https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/analyzePageForms.ts"
click node_actions "https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/actionHandler.ts"
click node_playground "https://github.com/amazon-connect/touchpoint/blob/main/src/playground/App.tsx"
click node_playground_launch "https://github.com/amazon-connect/touchpoint/blob/main/src/playground/useTouchpoint.ts"
click node_playground_router "https://github.com/amazon-connect/touchpoint/blob/main/src/playground/Router.tsx"

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_sdk,node_playground_user toneBlue
class node_app,node_providers,node_messages,node_input,node_announcements,node_modalities,node_voice,node_voice_mini toneAmber
class node_connector,node_conversation_runtime,node_renderer,node_sync_runtime toneMint
class node_context,node_form_analysis,node_actions toneRose
class node_playground,node_playground_launch,node_playground_router,node_developer toneIndigo
```

## Components

### SDK entry

- [SDK and element API](https://github.com/amazon-connect/touchpoint/blob/main/src/index.tsx): `src/index.tsx`

### Conversation UI

- [Conversation controller](https://github.com/amazon-connect/touchpoint/blob/main/src/App.tsx): `src/App.tsx`
- [Theme and providers](https://github.com/amazon-connect/touchpoint/blob/main/src/ProviderStack.tsx): `src/ProviderStack.tsx`
- [Chat transcript](https://github.com/amazon-connect/touchpoint/blob/main/src/components/Messages.tsx): `src/components/Messages.tsx`
- [Chat input](https://github.com/amazon-connect/touchpoint/blob/main/src/components/Input.tsx): `src/components/Input.tsx`
- [Guides and announcements](https://github.com/amazon-connect/touchpoint/blob/main/src/components/Announcements.tsx): `src/components/Announcements.tsx`
- [Rich modalities](https://github.com/amazon-connect/touchpoint/tree/main/src/components/defaultModalities): `src/components/defaultModalities`
- [Voice experiences](https://github.com/amazon-connect/touchpoint/blob/main/src/components/FullscreenVoice.tsx): `src/components/FullscreenVoice.tsx`
- [Voice mini](https://github.com/amazon-connect/touchpoint/blob/main/src/components/VoiceMini.tsx): `src/components/VoiceMini.tsx`

### Connect runtime

- [Connect adapter](https://github.com/amazon-connect/touchpoint/blob/main/src/connect/index.ts): `src/connect/index.ts`
- [Conversation runtime](https://github.com/amazon-connect/touchpoint/blob/main/src/connect/conversation.ts): `src/connect/conversation.ts`
- [Connect view renderer](https://github.com/amazon-connect/touchpoint/blob/main/src/connect/viewRenderer.ts): `src/connect/viewRenderer.ts`
- [Live Sync connection](https://github.com/amazon-connect/touchpoint/blob/main/src/connect/liveSync.ts): `src/connect/liveSync.ts`

### Live Sync

- [Page context gathering](https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/automaticContext.ts): `src/liveSync/automaticContext.ts`
- [Page form analysis](https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/analyzePageForms.ts): `src/liveSync/analyzePageForms.ts`
- [Page action handler](https://github.com/amazon-connect/touchpoint/blob/main/src/liveSync/actionHandler.ts): `src/liveSync/actionHandler.ts`

### Playground

- [Playground configuration](https://github.com/amazon-connect/touchpoint/blob/main/src/playground/App.tsx): `src/playground/App.tsx`
- [Widget launch hook](https://github.com/amazon-connect/touchpoint/blob/main/src/playground/useTouchpoint.ts): `src/playground/useTouchpoint.ts`
- [Playground routes](https://github.com/amazon-connect/touchpoint/blob/main/src/playground/Router.tsx): `src/playground/Router.tsx`

### Other components

- **Widget integrator**
- **Playground user**

## Connections

- Widget integrator → SDK and element API: creates or mounts (evidence: `src/index.tsx`)
- SDK and element API → Conversation controller: renders (evidence: `src/index.tsx`)
- Conversation controller → Theme and providers: uses (evidence: `src/App.tsx`)
- Conversation controller → Chat transcript: renders (evidence: `src/App.tsx`)
- Conversation controller → Chat input: renders (evidence: `src/App.tsx`)
- Conversation controller → Guides and announcements: renders (evidence: `src/App.tsx`)
- Conversation controller → Rich modalities: selects (evidence: `src/App.tsx`)
- Conversation controller → Voice experiences: renders (evidence: `src/App.tsx`)
- Conversation controller → Voice mini: renders (evidence: `src/App.tsx`)
- Connect adapter → Conversation runtime: creates (evidence: `src/connect/index.ts`)
- Connect adapter → Connect view renderer: uses (evidence: `src/connect/index.ts`)
- Conversation runtime → Live Sync connection: uses (evidence: `src/connect/conversation.ts`)
- Page context gathering → Page form analysis: analyzes forms (evidence: `src/liveSync/automaticContext.ts`)
- Page context gathering → Connect adapter: uses (evidence: `src/liveSync/automaticContext.ts`)
- Playground user → Playground configuration: configures (evidence: `src/playground/App.tsx`)
- Playground configuration → Widget launch hook: launches
- Widget launch hook → SDK and element API: creates widget (evidence: `src/playground/useTouchpoint.ts`)
- Playground configuration → Playground routes: routes pages (evidence: `src/playground/Router.tsx`)
