# codeinloop/talkinloop architecture

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

- Interactive diagram: https://gitdiagram.com/codeinloop/talkinloop
- Repository: https://github.com/codeinloop/talkinloop

## Overview

Talk in Loop is a live presentation system: a presenter runs a locally rendered slide deck, while audience members join from phones to react, vote, and follow links; the presenter can control slides remotely. The backstage Node server coordinates the live connections and exposes presentation metrics. The graph also preserves the configurable talk, speaker script, print/PDF, and theme capabilities documented in the README. Some deck and server interactions are documented but their implementation was not sampled; those links cite the README rather than implying inspected code.

Main entry points: [`backstage/server.ts`](https://github.com/codeinloop/talkinloop/blob/main/backstage/server.ts) (Live server), [`deck/components/Deck.tsx`](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Deck.tsx) (Slide deck), [`deck/components/Remote.tsx`](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Remote.tsx) (Presenter remote), [`deck/app/page.tsx`](https://github.com/codeinloop/talkinloop/blob/main/deck/app/page.tsx) (Audience page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_deck["Slide deck<br/>[Deck.tsx]"]
  node_slides["Talk slides<br/>[index.tsx]"]
  node_qr["Audience QR<br/>[QrCode.tsx]"]
  node_print["Print and PDF<br/>[Print.tsx]"]
end

subgraph group_live["Live interaction"]
  node_remote["Presenter remote<br/>[Remote.tsx]"]
  node_liveui["Live deck layer<br/>[Live.tsx]"]
  node_protocol["Live protocol<br/>[protocol.ts]"]
  node_audiencepage["Audience page<br/>[page.tsx]"]
  node_server["Live server<br/>[server.ts]"]
end

subgraph group_operations["Backstage services"]
  node_backstageconfig["Server configuration<br/>[config.ts]"]
  node_localization["Localization<br/>[i18n.ts]"]
  node_metrics["Metrics tracking<br/>[metrics.ts]"]
  node_metricsstore[("Metrics file<br/>[metrics.ts]")]
  node_report["Metrics report<br/>[report.ts]"]
end

subgraph group_talk["Talk authoring"]
  node_config["Talk configuration<br/>[config.ts]"]
  node_theme["Theme<br/>[theme.ts]"]
  node_script["Speaker script<br/>[roteiro.mjs]"]
end

node_presenter(("Presenter"))
node_audience(("Audience"))
node_tunnel{{"Cloudflare tunnel"}}

node_presenter -->|"presents with"| node_deck
node_presenter -->|"controls slides"| node_remote
node_slides -->|"renders in"| node_deck
node_deck -->|"shows QR"| node_qr
node_deck -->|"exports to"| node_print
node_audience -->|"joins via"| node_audiencepage
node_audiencepage -->|"sends reactions"| node_server
node_remote -->|"sends commands"| node_server
node_deck -->|"publishes live state"| node_server
node_server -->|"dispatches updates"| node_deck
node_remote -->|"uses messages"| node_protocol
node_liveui -->|"uses messages"| node_protocol
node_server -->|"loads"| node_backstageconfig
node_backstageconfig -->|"selects translations"| node_localization
node_server -->|"renders report"| node_report
node_server -->|"reports metrics"| node_metrics
node_metrics -->|"persists data"| node_metricsstore
node_config -->|"configures appearance"| node_theme
node_script -->|"provides notes"| node_presenter
node_tunnel -->|"publishes access"| node_audiencepage

click node_deck "https://github.com/codeinloop/talkinloop/blob/main/deck/components/Deck.tsx"
click node_slides "https://github.com/codeinloop/talkinloop/blob/main/deck/talks/starter/slides/index.tsx"
click node_qr "https://github.com/codeinloop/talkinloop/blob/main/deck/components/QrCode.tsx"
click node_print "https://github.com/codeinloop/talkinloop/blob/main/deck/components/Print.tsx"
click node_remote "https://github.com/codeinloop/talkinloop/blob/main/deck/components/Remote.tsx"
click node_liveui "https://github.com/codeinloop/talkinloop/blob/main/deck/components/Live.tsx"
click node_protocol "https://github.com/codeinloop/talkinloop/blob/main/backstage/protocol.ts"
click node_audiencepage "https://github.com/codeinloop/talkinloop/blob/main/deck/app/page.tsx"
click node_server "https://github.com/codeinloop/talkinloop/blob/main/backstage/server.ts"
click node_config "https://github.com/codeinloop/talkinloop/blob/main/deck/components/config.ts"
click node_theme "https://github.com/codeinloop/talkinloop/blob/main/deck/components/theme.ts"
click node_script "https://github.com/codeinloop/talkinloop/blob/main/deck/scripts/roteiro.mjs"
click node_backstageconfig "https://github.com/codeinloop/talkinloop/blob/main/backstage/config.ts"
click node_localization "https://github.com/codeinloop/talkinloop/blob/main/backstage/i18n.ts"
click node_metrics "https://github.com/codeinloop/talkinloop/blob/main/backstage/metrics.ts"
click node_metricsstore "https://github.com/codeinloop/talkinloop/blob/main/backstage/metrics.ts"
click node_report "https://github.com/codeinloop/talkinloop/blob/main/backstage/report.ts"

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_deck,node_slides,node_qr,node_print toneBlue
class node_remote,node_liveui,node_protocol,node_audiencepage,node_server toneAmber
class node_backstageconfig,node_localization,node_metrics,node_metricsstore,node_report toneMint
class node_config,node_theme,node_script toneRose
class node_presenter,node_audience,node_tunnel toneIndigo
```

## Components

### Presentation

- [Slide deck](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Deck.tsx): `deck/components/Deck.tsx`
- [Talk slides](https://github.com/codeinloop/talkinloop/blob/main/deck/talks/starter/slides/index.tsx): `deck/talks/starter/slides/index.tsx`
- [Audience QR](https://github.com/codeinloop/talkinloop/blob/main/deck/components/QrCode.tsx): `deck/components/QrCode.tsx`
- [Print and PDF](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Print.tsx): `deck/components/Print.tsx`

### Live interaction

- [Presenter remote](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Remote.tsx): `deck/components/Remote.tsx`
- [Live deck layer](https://github.com/codeinloop/talkinloop/blob/main/deck/components/Live.tsx): `deck/components/Live.tsx`
- [Live protocol](https://github.com/codeinloop/talkinloop/blob/main/backstage/protocol.ts): `backstage/protocol.ts`
- [Audience page](https://github.com/codeinloop/talkinloop/blob/main/deck/app/page.tsx): `deck/app/page.tsx`
- [Live server](https://github.com/codeinloop/talkinloop/blob/main/backstage/server.ts): `backstage/server.ts`

### Backstage services

- [Server configuration](https://github.com/codeinloop/talkinloop/blob/main/backstage/config.ts): `backstage/config.ts`
- [Localization](https://github.com/codeinloop/talkinloop/blob/main/backstage/i18n.ts): `backstage/i18n.ts`
- [Metrics tracking](https://github.com/codeinloop/talkinloop/blob/main/backstage/metrics.ts): `backstage/metrics.ts`
- [Metrics file](https://github.com/codeinloop/talkinloop/blob/main/backstage/metrics.ts): `backstage/metrics.ts`
- [Metrics report](https://github.com/codeinloop/talkinloop/blob/main/backstage/report.ts): `backstage/report.ts`

### Talk authoring

- [Talk configuration](https://github.com/codeinloop/talkinloop/blob/main/deck/components/config.ts): `deck/components/config.ts`
- [Theme](https://github.com/codeinloop/talkinloop/blob/main/deck/components/theme.ts): `deck/components/theme.ts`
- [Speaker script](https://github.com/codeinloop/talkinloop/blob/main/deck/scripts/roteiro.mjs): `deck/scripts/roteiro.mjs`

### Other components

- **Presenter**
- **Audience**
- **Cloudflare tunnel**

## Connections

- Presenter → Slide deck: presents with (evidence: `README.md`)
- Presenter → Presenter remote: controls slides (evidence: `README.md`)
- Talk slides → Slide deck: renders in (evidence: `README.md`)
- Slide deck → Audience QR: shows QR (evidence: `README.md`)
- Slide deck → Print and PDF: exports to (evidence: `README.md`)
- Audience → Audience page: joins via (evidence: `README.md`)
- Audience page → Live server: sends reactions (evidence: `README.md`)
- Presenter remote → Live server: sends commands (evidence: `README.md`)
- Slide deck → Live server: publishes live state (evidence: `README.md`)
- Live server → Slide deck: dispatches updates (evidence: `README.md`)
- Presenter remote → Live protocol: uses messages (evidence: `deck/components/Remote.tsx`)
- Live deck layer → Live protocol: uses messages (evidence: `deck/components/Live.tsx`)
- Live server → Server configuration: loads (evidence: `backstage/server.ts`)
- Server configuration → Localization: selects translations (evidence: `backstage/config.ts`)
- Live server → Metrics report: renders report (evidence: `backstage/server.ts`)
- Live server → Metrics tracking: reports metrics (evidence: `backstage/server.ts`)
- Metrics tracking → Metrics file: persists data (evidence: `backstage/metrics.ts`)
- Talk configuration → Theme: configures appearance (evidence: `README.md`)
- Speaker script → Presenter: provides notes (evidence: `README.md`)
- Cloudflare tunnel → Audience page: publishes access (evidence: `README.md`)
