# jrtrj/live-stream architecture

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

- Interactive diagram: https://gitdiagram.com/jrtrj/live-stream
- Repository: https://github.com/jrtrj/live-stream

## Overview

VoxAction is a browser call app that turns spoken SEND, BOOK, and SHARE phrases into action cards and receipts. The principal path is call setup, transcript publication, intent extraction and gating, dispatch, then action display. The README describes replay through a shared event bus and several future storage and speech integrations; the current app excerpt still uses fake transcription, and the documented storage upgrades are not implemented here. Some backend and integration links are therefore omitted or marked unverified.

Main entry points: [`src/app.ts`](https://github.com/jrtrj/live-stream/blob/main/src/app.ts) (App composition), [`src/core/bus.ts`](https://github.com/jrtrj/live-stream/blob/main/src/core/bus.ts) (Event bus), [`src/ui/App.tsx`](https://github.com/jrtrj/live-stream/blob/main/src/ui/App.tsx) (Call and action UI), [`src/core/webrtc.ts`](https://github.com/jrtrj/live-stream/blob/main/src/core/webrtc.ts) (WebRTC peers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_call["Live call"]
  node_app["App composition<br/>[app.ts]"]
  node_peer["Peer interface<br/>[peer.ts]"]
  node_webrtc["WebRTC peers<br/>[webrtc.ts]"]
  node_signaling["Signalling server<br/>[signal.ts]"]
  node_rooms["Room management<br/>[room.ts]"]
  node_transcriber["Fake transcription<br/>[transcriber.ts]"]
end

subgraph group_pipeline["Event and intent pipeline"]
  node_contract["Event contract<br/>[events.ts]"]
  node_payload["Payload schemas<br/>[payload.ts]"]
  node_bus["Event bus<br/>[bus.ts]"]
  node_store[("In-memory event store<br/>[store.ts]")]
  node_extractor["Intent extraction<br/>[extractor.ts]"]
  node_gates["Intent gates<br/>[gates.ts]"]
end

subgraph group_actions["Action handlers"]
  node_dispatcher["Action dispatcher<br/>[dispatcher.ts]"]
  node_calendar["Calendar booking<br/>[calendar.ts]"]
  node_dateparse["Date parsing<br/>[when.ts]"]
  node_share["Code sharing<br/>[share.ts]"]
end

subgraph group_interface["Call interface"]
  node_ui["Call and action UI<br/>[App.tsx]"]
end

subgraph group_services["Optional services"]
  node_stt["Speech service<br/>[server.py]"]
  node_modelclient["HTTP model client<br/>[modelClient.ts]"]
  node_modelserver["Model proxy<br/>[model.ts]"]
end

node_caller(("Call participant"))

node_caller -->|"starts call"| node_ui
node_ui -->|"creates app"| node_app
node_app -->|"creates bus"| node_bus
node_app -->|"joins peers"| node_webrtc
node_app -->|"transcribes audio"| node_transcriber
node_app -->|"extracts intents"| node_extractor
node_app -->|"configures client"| node_modelclient
node_app -->|"creates dispatcher"| node_dispatcher
node_app -->|"registers handler"| node_calendar
node_app -->|"registers handler"| node_share
node_webrtc -->|"implements"| node_peer
node_webrtc -->|"exchanges signals"| node_signaling
node_signaling -->|"uses rooms"| node_rooms
node_transcriber -->|"publishes transcript"| node_bus
node_app -->|"subscribes transcripts"| node_bus
node_bus -->|"persists events"| node_store
node_bus -->|"uses event types"| node_contract
node_app -->|"publishes intents"| node_bus
node_extractor -->|"validates results"| node_gates
node_gates -->|"checks schema"| node_payload
node_app -->|"dispatches intents"| node_bus
node_dispatcher -->|"uses event types"| node_contract
node_app -->|"publishes actions"| node_bus
node_calendar -->|"resolves dates"| node_dateparse
node_ui -->|"renders event log"| node_bus
node_ui -->|"filters event types"| node_contract
node_app -.->|"configures proxy URL"| node_modelserver
node_transcriber -.->|"could use service"| node_stt

click node_app "https://github.com/jrtrj/live-stream/blob/main/src/app.ts"
click node_peer "https://github.com/jrtrj/live-stream/blob/main/src/core/peer.ts"
click node_webrtc "https://github.com/jrtrj/live-stream/blob/main/src/core/webrtc.ts"
click node_signaling "https://github.com/jrtrj/live-stream/blob/main/server/signal.ts"
click node_rooms "https://github.com/jrtrj/live-stream/blob/main/server/room.ts"
click node_transcriber "https://github.com/jrtrj/live-stream/blob/main/src/core/transcriber.ts"
click node_stt "https://github.com/jrtrj/live-stream/blob/main/services/stt/server.py"
click node_contract "https://github.com/jrtrj/live-stream/blob/main/src/contract/events.ts"
click node_payload "https://github.com/jrtrj/live-stream/blob/main/src/contract/payload.ts"
click node_bus "https://github.com/jrtrj/live-stream/blob/main/src/core/bus.ts"
click node_store "https://github.com/jrtrj/live-stream/blob/main/src/core/store.ts"
click node_extractor "https://github.com/jrtrj/live-stream/blob/main/src/core/extractor.ts"
click node_gates "https://github.com/jrtrj/live-stream/blob/main/src/core/gates.ts"
click node_modelclient "https://github.com/jrtrj/live-stream/blob/main/src/core/modelClient.ts"
click node_modelserver "https://github.com/jrtrj/live-stream/blob/main/server/model.ts"
click node_dispatcher "https://github.com/jrtrj/live-stream/blob/main/src/core/dispatcher.ts"
click node_calendar "https://github.com/jrtrj/live-stream/blob/main/src/core/calendar.ts"
click node_dateparse "https://github.com/jrtrj/live-stream/blob/main/src/core/when.ts"
click node_share "https://github.com/jrtrj/live-stream/blob/main/src/core/share.ts"
click node_ui "https://github.com/jrtrj/live-stream/blob/main/src/ui/App.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_app,node_peer,node_webrtc,node_signaling,node_rooms,node_transcriber toneBlue
class node_contract,node_payload,node_bus,node_store,node_extractor,node_gates toneAmber
class node_dispatcher,node_calendar,node_dateparse,node_share toneMint
class node_ui toneRose
class node_stt,node_modelclient,node_modelserver,node_caller toneIndigo
```

## Components

### Live call

- [App composition](https://github.com/jrtrj/live-stream/blob/main/src/app.ts): `src/app.ts`
- [Peer interface](https://github.com/jrtrj/live-stream/blob/main/src/core/peer.ts): `src/core/peer.ts`
- [WebRTC peers](https://github.com/jrtrj/live-stream/blob/main/src/core/webrtc.ts): `src/core/webrtc.ts`
- [Signalling server](https://github.com/jrtrj/live-stream/blob/main/server/signal.ts): `server/signal.ts`
- [Room management](https://github.com/jrtrj/live-stream/blob/main/server/room.ts): `server/room.ts`
- [Fake transcription](https://github.com/jrtrj/live-stream/blob/main/src/core/transcriber.ts): `src/core/transcriber.ts`

### Event and intent pipeline

- [Event contract](https://github.com/jrtrj/live-stream/blob/main/src/contract/events.ts): `src/contract/events.ts`
- [Payload schemas](https://github.com/jrtrj/live-stream/blob/main/src/contract/payload.ts): `src/contract/payload.ts`
- [Event bus](https://github.com/jrtrj/live-stream/blob/main/src/core/bus.ts): `src/core/bus.ts`
- [In-memory event store](https://github.com/jrtrj/live-stream/blob/main/src/core/store.ts): `src/core/store.ts`
- [Intent extraction](https://github.com/jrtrj/live-stream/blob/main/src/core/extractor.ts): `src/core/extractor.ts`
- [Intent gates](https://github.com/jrtrj/live-stream/blob/main/src/core/gates.ts): `src/core/gates.ts`

### Action handlers

- [Action dispatcher](https://github.com/jrtrj/live-stream/blob/main/src/core/dispatcher.ts): `src/core/dispatcher.ts`
- [Calendar booking](https://github.com/jrtrj/live-stream/blob/main/src/core/calendar.ts): `src/core/calendar.ts`
- [Date parsing](https://github.com/jrtrj/live-stream/blob/main/src/core/when.ts): `src/core/when.ts`
- [Code sharing](https://github.com/jrtrj/live-stream/blob/main/src/core/share.ts): `src/core/share.ts`

### Call interface

- [Call and action UI](https://github.com/jrtrj/live-stream/blob/main/src/ui/App.tsx): `src/ui/App.tsx`

### Optional services

- [Speech service](https://github.com/jrtrj/live-stream/blob/main/services/stt/server.py): `services/stt/server.py`
- [HTTP model client](https://github.com/jrtrj/live-stream/blob/main/src/core/modelClient.ts): `src/core/modelClient.ts`
- [Model proxy](https://github.com/jrtrj/live-stream/blob/main/server/model.ts): `server/model.ts`

### Other components

- **Call participant**

## Connections

- Call participant → Call and action UI: starts call (evidence: `src/ui/App.tsx`)
- Call and action UI → App composition: creates app (evidence: `src/ui/App.tsx`)
- App composition → Event bus: creates bus (evidence: `src/app.ts`)
- App composition → WebRTC peers: joins peers (evidence: `src/app.ts`)
- App composition → Fake transcription: transcribes audio (evidence: `src/app.ts`)
- App composition → Intent extraction: extracts intents (evidence: `src/app.ts`)
- App composition → HTTP model client: configures client (evidence: `src/app.ts`)
- App composition → Action dispatcher: creates dispatcher (evidence: `src/app.ts`)
- App composition → Calendar booking: registers handler (evidence: `src/app.ts`)
- App composition → Code sharing: registers handler (evidence: `src/app.ts`)
- WebRTC peers → Peer interface: implements (evidence: `src/core/webrtc.ts`)
- WebRTC peers → Signalling server: exchanges signals (evidence: `src/core/webrtc.ts`)
- Signalling server → Room management: uses rooms (evidence: `server/signal.ts`)
- Fake transcription → Event bus: publishes transcript (evidence: `src/app.ts`)
- App composition → Event bus: subscribes transcripts (evidence: `src/app.ts`)
- Event bus → In-memory event store: persists events (evidence: `src/core/bus.ts`)
- Event bus → Event contract: uses event types (evidence: `src/core/bus.ts`)
- App composition → Event bus: publishes intents (evidence: `src/app.ts`)
- Intent extraction → Intent gates: validates results (evidence: `src/core/extractor.ts`)
- Intent gates → Payload schemas: checks schema (evidence: `src/core/gates.ts`)
- App composition → Event bus: dispatches intents (evidence: `src/app.ts`)
- Action dispatcher → Event contract: uses event types (evidence: `src/core/dispatcher.ts`)
- App composition → Event bus: publishes actions (evidence: `src/app.ts`)
- Calendar booking → Date parsing: resolves dates (evidence: `src/core/calendar.ts`)
- Call and action UI → Event bus: renders event log (evidence: `src/ui/App.tsx`)
- Call and action UI → Event contract: filters event types (evidence: `src/ui/App.tsx`)
- App composition → Model proxy: configures proxy URL
- Fake transcription → Speech service: could use service
