# thiagofal1/captura architecture

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

- Interactive diagram: https://gitdiagram.com/thiagofal1/captura
- Repository: https://github.com/thiagofal1/captura

## Overview

Captura is a static, browser-based screen recorder. The main workflow is to configure quality and audio, choose a screen/window/tab through the browser, record with pause/resume and live status, then create a local downloadable video. The README also describes responsive studio UI and private, on-device processing. Source evidence is limited to README documentation and the excerpted script.js; index.html and style.css were not sampled, so UI wiring beyond the script’s selectors is not mapped.

Main entry points: [`script.js`](https://github.com/thiagofal1/captura/blob/main/script.js) (Screen and audio capture), [`index.html`](https://github.com/thiagofal1/captura/blob/main/index.html) (Quality and audio controls), [`style.css`](https://github.com/thiagofal1/captura/blob/main/style.css) (Studio interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and recording"]
  node_controls["Quality and audio controls<br/>[index.html]"]
  node_screen["Screen and audio capture<br/>[script.js]"]
  node_recorder["Media recording<br/>[script.js]"]
  node_pause["Pause and resume<br/>[script.js]"]
end

subgraph group_experience["Recording experience"]
  node_preview["Live preview<br/>[script.js]"]
  node_timer["Recording timer<br/>[script.js]"]
  node_status["Status and feedback<br/>[script.js]"]
  node_studio["Studio interface<br/>[style.css]"]
end

subgraph group_export["Local export"]
  node_video[("Recorded video chunks<br/>[script.js]")]
  node_file["Downloadable video<br/>[script.js]"]
end

node_user(("User"))
node_browser["Browser media APIs"]

node_user -->|"configures"| node_controls
node_user -->|"starts capture"| node_screen
node_controls -->|"sets options"| node_screen
node_screen -->|"requests streams"| node_browser
node_screen -->|"builds recording stream"| node_recorder
node_recorder -->|"records via API"| node_browser
node_user -->|"pauses or resumes"| node_pause
node_pause -->|"controls state"| node_recorder
node_screen -->|"sets preview stream"| node_preview
node_recorder -->|"collects chunks"| node_video
node_recorder -->|"updates elapsed time"| node_timer
node_screen -->|"reports state"| node_status
node_pause -->|"reports state"| node_status
node_user -->|"uses"| node_studio
node_video -->|"creates Blob URL"| node_file
node_user -->|"downloads"| node_file

click node_controls "https://github.com/thiagofal1/captura/blob/main/index.html"
click node_screen "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_recorder "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_pause "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_preview "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_timer "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_status "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_studio "https://github.com/thiagofal1/captura/blob/main/style.css"
click node_video "https://github.com/thiagofal1/captura/blob/main/script.js"
click node_file "https://github.com/thiagofal1/captura/blob/main/script.js"

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_controls,node_screen,node_recorder,node_pause,node_user,node_browser toneBlue
class node_preview,node_timer,node_status,node_studio toneAmber
class node_video,node_file toneMint
```

## Components

### Capture and recording

- [Quality and audio controls](https://github.com/thiagofal1/captura/blob/main/index.html): `index.html`
- [Screen and audio capture](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Media recording](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Pause and resume](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`

### Recording experience

- [Live preview](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Recording timer](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Status and feedback](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Studio interface](https://github.com/thiagofal1/captura/blob/main/style.css): `style.css`

### Local export

- [Recorded video chunks](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`
- [Downloadable video](https://github.com/thiagofal1/captura/blob/main/script.js): `script.js`

### Other components

- **User**
- **Browser media APIs**

## Connections

- User → Quality and audio controls: configures (evidence: `README.md`)
- User → Screen and audio capture: starts capture (evidence: `README.md`)
- Quality and audio controls → Screen and audio capture: sets options (evidence: `script.js`)
- Screen and audio capture → Browser media APIs: requests streams (evidence: `script.js`)
- Screen and audio capture → Media recording: builds recording stream (evidence: `script.js`)
- Media recording → Browser media APIs: records via API (evidence: `script.js`)
- User → Pause and resume: pauses or resumes (evidence: `script.js`)
- Pause and resume → Media recording: controls state (evidence: `script.js`)
- Screen and audio capture → Live preview: sets preview stream (evidence: `script.js`)
- Media recording → Recorded video chunks: collects chunks (evidence: `script.js`)
- Media recording → Recording timer: updates elapsed time (evidence: `script.js`)
- Screen and audio capture → Status and feedback: reports state (evidence: `script.js`)
- Pause and resume → Status and feedback: reports state (evidence: `script.js`)
- User → Studio interface: uses (evidence: `README.md`)
- Recorded video chunks → Downloadable video: creates Blob URL (evidence: `script.js`)
- User → Downloadable video: downloads (evidence: `README.md`)
